mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
cam: PMT_REPLY parsing
Not used yet
This commit is contained in:
parent
dfdbb87813
commit
25cb359ddb
1 changed files with 44 additions and 0 deletions
|
@ -190,6 +190,46 @@ handle_conditional_access_info_reply (CamConditionalAccess * cas,
|
||||||
return CAM_RETURN_OK;
|
return CAM_RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static CamReturn
|
||||||
data_impl (CamALApplication * application, CamSLSession * session,
|
data_impl (CamALApplication * application, CamSLSession * session,
|
||||||
guint tag, guint8 * buffer, guint length)
|
guint tag, guint8 * buffer, guint length)
|
||||||
|
@ -201,7 +241,11 @@ data_impl (CamALApplication * application, CamSLSession * session,
|
||||||
case TAG_CONDITIONAL_ACCESS_INFO_REPLY:
|
case TAG_CONDITIONAL_ACCESS_INFO_REPLY:
|
||||||
ret = handle_conditional_access_info_reply (cas, session, buffer, length);
|
ret = handle_conditional_access_info_reply (cas, session, buffer, length);
|
||||||
break;
|
break;
|
||||||
|
case TAG_CONDITIONAL_ACCESS_PMT_REPLY:
|
||||||
|
ret = handle_conditional_access_pmt_reply (cas, session, buffer, length);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
GST_WARNING ("Got unknown callback, tag 0x%x", tag);
|
||||||
g_return_val_if_reached (CAM_RETURN_ERROR);
|
g_return_val_if_reached (CAM_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue