mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mpegts: use getter for egde linkage descriptor type
https://bugzilla.gnome.org/show_bug.cgi?id=730914
This commit is contained in:
parent
dc1eeec7df
commit
43dd0ec62a
4 changed files with 68 additions and 7 deletions
|
@ -309,6 +309,9 @@ GstMpegtsDVBLinkageEvent
|
|||
GstMpegtsDVBLinkageExtendedEvent
|
||||
GstMpegtsDVBLinkageDescriptor
|
||||
gst_mpegts_dvb_linkage_descriptor_free
|
||||
gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
|
||||
gst_mpegts_dvb_linkage_descriptor_get_event
|
||||
gst_mpegts_dvb_linkage_descriptor_get_extended_event
|
||||
gst_mpegts_descriptor_parse_dvb_linkage
|
||||
<SUBSECTION private_data_specifier>
|
||||
gst_mpegts_descriptor_parse_dvb_private_data_specifier
|
||||
|
|
|
@ -770,6 +770,57 @@ fail:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over:
|
||||
* @desc: the #GstMpegtsDVBLinkageDescriptor
|
||||
*
|
||||
* Returns: The #GstMpegtsDVBLinkageMobileHandOver or %NULL if an error happened
|
||||
*/
|
||||
const GstMpegtsDVBLinkageMobileHandOver *
|
||||
gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over (const
|
||||
GstMpegtsDVBLinkageDescriptor * desc)
|
||||
{
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (desc->linkage_type ==
|
||||
GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER, NULL);
|
||||
|
||||
return (const GstMpegtsDVBLinkageMobileHandOver *) desc->linkage_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_mpegts_dvb_linkage_descriptor_get_event:
|
||||
* @desc: the #GstMpegtsDVBLinkageDescriptor
|
||||
*
|
||||
* Returns: The #GstMpegtsDVBLinkageEvent or %NULL if an error happened
|
||||
*/
|
||||
const GstMpegtsDVBLinkageEvent *
|
||||
gst_mpegts_dvb_linkage_descriptor_get_event (const GstMpegtsDVBLinkageDescriptor
|
||||
* desc)
|
||||
{
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (desc->linkage_type ==
|
||||
GST_MPEGTS_DVB_LINKAGE_EVENT, NULL);
|
||||
|
||||
return (const GstMpegtsDVBLinkageEvent *) desc->linkage_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_mpegts_dvb_linkage_descriptor_get_extended_event:
|
||||
* @desc: the #GstMpegtsDVBLinkageDescriptor
|
||||
*
|
||||
* Returns: (element-type GstMpegtsDVBLinkageExtendedEvent): an #GstMpegtsDVBLinkageExtendedEvent array or %NULL if an error happened
|
||||
*/
|
||||
const GPtrArray *
|
||||
gst_mpegts_dvb_linkage_descriptor_get_extended_event (const
|
||||
GstMpegtsDVBLinkageDescriptor * desc)
|
||||
{
|
||||
g_return_val_if_fail (desc != NULL, NULL);
|
||||
g_return_val_if_fail (desc->linkage_type ==
|
||||
GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT, NULL);
|
||||
|
||||
return (const GPtrArray *) desc->linkage_data;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_SHORT_EVENT (0x4D) */
|
||||
/**
|
||||
* gst_mpegts_descriptor_parse_dvb_short_event:
|
||||
|
|
|
@ -434,7 +434,6 @@ struct _GstMpegtsDVBLinkageExtendedEvent
|
|||
* @original_network_id: the original network id
|
||||
* @service_id: the service id
|
||||
* @linkage_type: the type which %linkage_data has
|
||||
* @linkage_data: the linkage structure depending from %linkage_type
|
||||
* @private_data_length: the length for %private_data_bytes
|
||||
* @private_data_bytes: additional data bytes
|
||||
*/
|
||||
|
@ -444,7 +443,9 @@ struct _GstMpegtsDVBLinkageDescriptor
|
|||
guint16 original_network_id;
|
||||
guint16 service_id;
|
||||
GstMpegtsDVBLinkageType linkage_type;
|
||||
/*< private >*/
|
||||
gpointer linkage_data;
|
||||
/*< public >*/
|
||||
guint8 private_data_length;
|
||||
guint8 *private_data_bytes;
|
||||
};
|
||||
|
@ -454,7 +455,12 @@ struct _GstMpegtsDVBLinkageDescriptor
|
|||
GType gst_mpegts_dvb_linkage_descriptor_get_type (void);
|
||||
|
||||
void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source);
|
||||
|
||||
const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
|
||||
(const GstMpegtsDVBLinkageDescriptor * desc);
|
||||
const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event
|
||||
(const GstMpegtsDVBLinkageDescriptor * desc);
|
||||
const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event
|
||||
(const GstMpegtsDVBLinkageDescriptor * desc);
|
||||
gboolean gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor,
|
||||
GstMpegtsDVBLinkageDescriptor ** res);
|
||||
|
||||
|
|
|
@ -328,8 +328,8 @@ dump_linkage (GstMpegtsDescriptor * desc, guint spacing)
|
|||
switch (res->linkage_type) {
|
||||
case GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER:
|
||||
{
|
||||
GstMpegtsDVBLinkageMobileHandOver *linkage =
|
||||
(GstMpegtsDVBLinkageMobileHandOver *) res->linkage_data;
|
||||
const GstMpegtsDVBLinkageMobileHandOver *linkage =
|
||||
gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over (res);
|
||||
g_printf ("%*s hand_over_type : 0x%02x (%s)\n", spacing,
|
||||
"", linkage->hand_over_type,
|
||||
enum_name (GST_TYPE_MPEGTS_DVB_LINKAGE_HAND_OVER_TYPE,
|
||||
|
@ -344,8 +344,8 @@ dump_linkage (GstMpegtsDescriptor * desc, guint spacing)
|
|||
}
|
||||
case GST_MPEGTS_DVB_LINKAGE_EVENT:
|
||||
{
|
||||
GstMpegtsDVBLinkageEvent *linkage =
|
||||
(GstMpegtsDVBLinkageEvent *) res->linkage_data;
|
||||
const GstMpegtsDVBLinkageEvent *linkage =
|
||||
gst_mpegts_dvb_linkage_descriptor_get_event (res);
|
||||
g_printf ("%*s target_event_id : 0x%04x\n", spacing, "",
|
||||
linkage->target_event_id);
|
||||
g_printf ("%*s target_listed : %s\n", spacing, "",
|
||||
|
@ -357,7 +357,8 @@ dump_linkage (GstMpegtsDescriptor * desc, guint spacing)
|
|||
case GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT:
|
||||
{
|
||||
guint i;
|
||||
GPtrArray *items = (GPtrArray *) res->linkage_data;
|
||||
const GPtrArray *items =
|
||||
gst_mpegts_dvb_linkage_descriptor_get_extended_event (res);
|
||||
|
||||
for (i = 0; i < items->len; i++) {
|
||||
GstMpegtsDVBLinkageExtendedEvent *linkage =
|
||||
|
|
Loading…
Reference in a new issue