diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-06-29 18:01:15 +0200 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-08-14 19:06:25 +0200 |
commit | 25cb359ddb0c4c23f69a5154efc2b7b34a18a4b6 (patch) | |
tree | 9c5051e026d0312cbaefef577bc7b9feeaa3445f /sys/dvb | |
parent | dfdbb87813e161a978b85c14294014bbdb8e8138 (diff) | |
download | gstreamer-plugins-bad-25cb359ddb0c4c23f69a5154efc2b7b34a18a4b6.tar.gz |
cam: PMT_REPLY parsing
Not used yet
Diffstat (limited to 'sys/dvb')
-rw-r--r-- | sys/dvb/camconditionalaccess.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/dvb/camconditionalaccess.c b/sys/dvb/camconditionalaccess.c index fbb8a39f9..6d8bf2974 100644 --- a/sys/dvb/camconditionalaccess.c +++ b/sys/dvb/camconditionalaccess.c @@ -191,6 +191,46 @@ handle_conditional_access_info_reply (CamConditionalAccess * cas, } static CamReturn +handle_conditional_access_pmt_reply (CamConditionalAccess * cas, + CamSLSession * session, guint8 * buffer, guint length) +{ + guint16 program_num; + guint8 version_num, current_next_indicator; + + GST_INFO ("conditional access PMT reply"); + + program_num = GST_READ_UINT16_BE (buffer); + buffer += 2; + + GST_INFO ("program_number : %d", program_num); + + version_num = *buffer >> 1 & 0x1f; + current_next_indicator = *buffer & 0x1; + buffer++; + + GST_INFO ("version_num:%d, current_next_indicator:%d", + version_num, current_next_indicator); + + GST_INFO ("CA_enable : %d (0x%x)", *buffer >> 7 ? *buffer & 0x7f : 0, + *buffer); + buffer++; + + length -= 4; + + while (length > 0) { + guint16 PID = GST_READ_UINT16_BE (buffer); + buffer += 2; + GST_INFO ("PID 0x%x CA_enable : %d (0x%x)", PID, + *buffer >> 7 ? *buffer & 0x7f : 0, *buffer); + buffer++; + + length -= 3; + } + + return CAM_RETURN_OK; +} + +static CamReturn data_impl (CamALApplication * application, CamSLSession * session, guint tag, guint8 * buffer, guint length) { @@ -201,7 +241,11 @@ data_impl (CamALApplication * application, CamSLSession * session, case TAG_CONDITIONAL_ACCESS_INFO_REPLY: ret = handle_conditional_access_info_reply (cas, session, buffer, length); break; + case TAG_CONDITIONAL_ACCESS_PMT_REPLY: + ret = handle_conditional_access_pmt_reply (cas, session, buffer, length); + break; default: + GST_WARNING ("Got unknown callback, tag 0x%x", tag); g_return_val_if_reached (CAM_RETURN_ERROR); } |