summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2018-11-08 08:15:41 +0000
committerSebastian Dröge <sebastian@centricular.com>2018-11-08 10:31:21 +0200
commit982f839486fba2536cd21fc45d0f65b6fcfcc3ea (patch)
treea3d1b6b3968b632b777bda372d67e9837bf56948
parent6bd75a5f1436ec4009dff7c5c0c59accae07741b (diff)
downloadgstreamer-plugins-bad-982f839486fba2536cd21fc45d0f65b6fcfcc3ea.tar.gz
mpegts: Register a number of new boxed types to support auto generation of bindings.
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c246
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.h71
-rw-r--r--gst-libs/gst/mpegts/gstmpegtsdescriptor.c34
-rw-r--r--gst-libs/gst/mpegts/gstmpegtsdescriptor.h10
4 files changed, 331 insertions, 30 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index 351733a64..8c535a6ce 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -53,6 +53,18 @@
#define BCD_28(a) (BCD_DEC(a[3]) + 10 * BCD(a[2]) + 1000 * BCD(a[1]) + 100000 * BCD(a[0]))
#define BCD_32(a) (BCD(a[3]) + 100 * BCD(a[2]) + 10000 * BCD(a[1]) + 1000000 * BCD(a[0]))
+#define DEFINE_STATIC_COPY_FUNCTION(type, name) \
+static type * _##name##_copy (type * source) \
+{ \
+ return g_slice_dup (type, source); \
+}
+
+#define DEFINE_STATIC_FREE_FUNCTION(type, name) \
+static void _##name##_free (type * source) \
+{ \
+ g_slice_free (type, source); \
+}
+
/* GST_MTS_DESC_DVB_NETWORK_NAME (0x40) */
/**
* gst_mpegts_descriptor_parse_dvb_network_name:
@@ -115,11 +127,17 @@ gst_mpegts_descriptor_from_dvb_network_name (const gchar * name)
}
/* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
-static void
-_gst_mpegts_dvb_service_list_item_free (GstMpegtsDVBServiceListItem * item)
-{
- g_slice_free (GstMpegtsDVBServiceListItem, item);
-}
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsDVBServiceListItem,
+ gst_mpegts_dvb_service_list_item);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsDVBServiceListItem,
+ gst_mpegts_dvb_service_list_item);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsDVBServiceListItem,
+ gst_mpegts_dvb_service_list_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_service_list_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_service_list_item_free);
/**
* gst_mpegts_descriptor_parse_dvb_service_list:
@@ -188,6 +206,18 @@ gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegtsDescriptor *
}
/* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsSatelliteDeliverySystemDescriptor,
+ gst_mpegts_satellite_delivery_system_descriptor);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsSatelliteDeliverySystemDescriptor,
+ gst_mpegts_satellite_delivery_system_descriptor);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsSatelliteDeliverySystemDescriptor,
+ gst_mpegts_satellite_delivery_system_descriptor,
+ (GBoxedCopyFunc) _gst_mpegts_satellite_delivery_system_descriptor_copy,
+ (GFreeFunc) _gst_mpegts_satellite_delivery_system_descriptor_free);
+
/**
* gst_mpegts_descriptor_parse_satellite_delivery_system:
* @descriptor: a %GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM #GstMpegtsDescriptor
@@ -290,16 +320,9 @@ gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor
}
/* GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM (0x44) */
-static GstMpegtsCableDeliverySystemDescriptor
- * _gst_mpegts_dvb_cable_delivery_system_descriptor_copy
- (GstMpegtsCableDeliverySystemDescriptor * source)
-{
- GstMpegtsCableDeliverySystemDescriptor *copy;
- copy = g_slice_dup (GstMpegtsCableDeliverySystemDescriptor, source);
-
- return copy;
-}
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsCableDeliverySystemDescriptor,
+ gst_mpegts_dvb_cable_delivery_system_descriptor);
void gst_mpegts_dvb_cable_delivery_system_descriptor_free
(GstMpegtsCableDeliverySystemDescriptor * source)
@@ -606,12 +629,38 @@ G_DEFINE_BOXED_TYPE (GstMpegtsDVBLinkageDescriptor,
(GBoxedCopyFunc) _gst_mpegts_dvb_linkage_descriptor_copy,
(GFreeFunc) gst_mpegts_dvb_linkage_descriptor_free);
-static void
-_gst_mpegts_dvb_linkage_extened_event_free (GstMpegtsDVBLinkageExtendedEvent *
- item)
-{
- g_slice_free (GstMpegtsDVBLinkageExtendedEvent, item);
-}
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsDVBLinkageMobileHandOver,
+ gst_mpegts_dvb_linkage_mobile_hand_over);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsDVBLinkageMobileHandOver,
+ gst_mpegts_dvb_linkage_mobile_hand_over);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsDVBLinkageMobileHandOver,
+ gst_mpegts_dvb_linkage_mobile_hand_over,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_linkage_mobile_hand_over_copy,
+ (GFreeFunc) _gst_mpegts_dvb_linkage_mobile_hand_over_free);
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsDVBLinkageEvent,
+ gst_mpegts_dvb_linkage_event);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsDVBLinkageEvent,
+ gst_mpegts_dvb_linkage_event);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsDVBLinkageEvent,
+ gst_mpegts_dvb_linkage_event,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_linkage_event_copy,
+ (GFreeFunc) _gst_mpegts_dvb_linkage_event_free);
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsDVBLinkageExtendedEvent,
+ gst_mpegts_dvb_linkage_extended_event);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsDVBLinkageExtendedEvent,
+ gst_mpegts_dvb_linkage_extended_event);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsDVBLinkageExtendedEvent,
+ gst_mpegts_dvb_linkage_extended_event,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_linkage_extended_event_copy,
+ (GFreeFunc) _gst_mpegts_dvb_linkage_extended_event_free);
/**
* gst_mpegts_descriptor_parse_dvb_linkage:
@@ -705,7 +754,7 @@ gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor,
case GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT:{
GPtrArray *ext_events;
ext_events = g_ptr_array_new_with_free_func ((GDestroyNotify)
- _gst_mpegts_dvb_linkage_extened_event_free);
+ _gst_mpegts_dvb_linkage_extended_event_free);
res->linkage_data = (gpointer) ext_events;
@@ -1061,6 +1110,16 @@ G_DEFINE_BOXED_TYPE (GstMpegtsExtendedEventDescriptor,
(GBoxedCopyFunc) _gst_mpegts_extended_event_descriptor_copy,
(GFreeFunc) gst_mpegts_extended_event_descriptor_free);
+static GstMpegtsExtendedEventItem *
+_gst_mpegts_extended_event_item_copy (GstMpegtsExtendedEventItem * source)
+{
+ GstMpegtsExtendedEventItem *copy =
+ g_slice_dup (GstMpegtsExtendedEventItem, source);
+ copy->item_description = g_strdup (source->item_description);
+ copy->item = g_strdup (source->item);
+ return copy;
+}
+
static void
_gst_mpegts_extended_event_item_free (GstMpegtsExtendedEventItem * item)
{
@@ -1069,6 +1128,11 @@ _gst_mpegts_extended_event_item_free (GstMpegtsExtendedEventItem * item)
g_slice_free (GstMpegtsExtendedEventItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsExtendedEventItem,
+ gst_mpegts_extended_event_item,
+ (GBoxedCopyFunc) _gst_mpegts_extended_event_item_copy,
+ (GFreeFunc) _gst_mpegts_extended_event_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_extended_event:
* @descriptor: a %GST_MTS_DESC_DVB_EXTENDED_EVENT #GstMpegtsDescriptor
@@ -1278,11 +1342,15 @@ gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegtsDescriptor *
}
/* GST_MTS_DESC_DVB_CONTENT (0x54) */
-static void
-_gst_mpegts_content_free (GstMpegtsContent * content)
-{
- g_slice_free (GstMpegtsContent, content);
-}
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsContent, gst_mpegts_content);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsContent, gst_mpegts_content);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsContent,
+ gst_mpegts_content,
+ (GBoxedCopyFunc) _gst_mpegts_content_copy,
+ (GFreeFunc) _gst_mpegts_content_free);
/**
* gst_mpegts_descriptor_parse_dvb_content:
@@ -1325,6 +1393,17 @@ gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor
}
/* GST_MTS_DESC_DVB_PARENTAL_RATING (0x55) */
+
+static GstMpegtsDVBParentalRatingItem *
+_gst_mpegts_dvb_parental_rating_item_copy (GstMpegtsDVBParentalRatingItem *
+ source)
+{
+ GstMpegtsDVBParentalRatingItem *copy =
+ g_slice_dup (GstMpegtsDVBParentalRatingItem, source);
+ copy->country_code = g_strdup (source->country_code);
+ return copy;
+}
+
static void
_gst_mpegts_dvb_parental_rating_item_free (GstMpegtsDVBParentalRatingItem *
item)
@@ -1333,6 +1412,11 @@ _gst_mpegts_dvb_parental_rating_item_free (GstMpegtsDVBParentalRatingItem *
g_slice_free (GstMpegtsDVBParentalRatingItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsDVBParentalRatingItem,
+ gst_mpegts_dvb_parental_rating_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_parental_rating_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_parental_rating_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_parental_rating:
* @descriptor: a %GST_MTS_DESC_DVB_PARENTAL_RATING #GstMpegtsDescriptor
@@ -1403,6 +1487,19 @@ gst_mpegts_descriptor_parse_dvb_parental_rating (const GstMpegtsDescriptor
}
/* GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM (0x5A) */
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsTerrestrialDeliverySystemDescriptor,
+ gst_mpegts_terrestrial_delivery_system_descriptor);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsTerrestrialDeliverySystemDescriptor,
+ gst_mpegts_terrestrial_delivery_system_descriptor);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsTerrestrialDeliverySystemDescriptor,
+ gst_mpegts_terrestrial_delivery_system_descriptor,
+ (GBoxedCopyFunc) _gst_mpegts_terrestrial_delivery_system_descriptor_copy,
+ (GFreeFunc) _gst_mpegts_terrestrial_delivery_system_descriptor_free);
+
+
/**
* gst_mpegts_descriptor_parse_terrestrial_delivery_system:
* @descriptor: a %GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM #GstMpegtsDescriptor
@@ -1579,6 +1676,18 @@ gst_mpegts_descriptor_parse_terrestrial_delivery_system (const
}
/* GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME (0x5B) */
+
+static GstMpegtsDvbMultilingualNetworkNameItem
+ * _gst_mpegts_dvb_multilingual_network_name_item_copy
+ (GstMpegtsDvbMultilingualNetworkNameItem * source)
+{
+ GstMpegtsDvbMultilingualNetworkNameItem *copy =
+ g_slice_dup (GstMpegtsDvbMultilingualNetworkNameItem, source);
+ copy->language_code = g_strdup (source->language_code);
+ copy->network_name = g_strdup (source->network_name);
+ return copy;
+}
+
static void
_gst_mpegts_dvb_multilingual_network_name_item_free
(GstMpegtsDvbMultilingualNetworkNameItem * item)
@@ -1588,6 +1697,11 @@ static void
g_slice_free (GstMpegtsDvbMultilingualNetworkNameItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsDvbMultilingualNetworkNameItem,
+ gst_mpegts_dvb_multilingual_network_name_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_multilingual_network_name_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_multilingual_network_name_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_multilingual_network_name:
* @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME
@@ -1634,6 +1748,18 @@ gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const
}
/* GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME (0x5C) */
+
+static GstMpegtsDvbMultilingualBouquetNameItem
+ * _gst_mpegts_dvb_multilingual_bouquet_name_item_copy
+ (GstMpegtsDvbMultilingualBouquetNameItem * source)
+{
+ GstMpegtsDvbMultilingualBouquetNameItem *copy =
+ g_slice_dup (GstMpegtsDvbMultilingualBouquetNameItem, source);
+ copy->bouquet_name = g_strdup (source->bouquet_name);
+ copy->language_code = g_strdup (source->language_code);
+ return copy;
+}
+
static void
_gst_mpegts_dvb_multilingual_bouquet_name_item_free
(GstMpegtsDvbMultilingualBouquetNameItem * item)
@@ -1643,6 +1769,11 @@ static void
g_slice_free (GstMpegtsDvbMultilingualBouquetNameItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsDvbMultilingualBouquetNameItem,
+ gst_mpegts_dvb_multilingual_bouquet_name_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_multilingual_bouquet_name_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_multilingual_bouquet_name_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name:
* @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME
@@ -1689,6 +1820,19 @@ gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const
}
/* GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME (0x5D) */
+
+static GstMpegtsDvbMultilingualServiceNameItem
+ * _gst_mpegts_dvb_multilingual_service_name_item_copy
+ (GstMpegtsDvbMultilingualServiceNameItem * source)
+{
+ GstMpegtsDvbMultilingualServiceNameItem *copy =
+ g_slice_dup (GstMpegtsDvbMultilingualServiceNameItem, source);
+ copy->language_code = g_strdup (source->language_code);
+ copy->service_name = g_strdup (source->service_name);
+ copy->provider_name = g_strdup (source->provider_name);
+ return copy;
+}
+
static void
_gst_mpegts_dvb_multilingual_service_name_item_free
(GstMpegtsDvbMultilingualServiceNameItem * item)
@@ -1699,6 +1843,11 @@ static void
g_slice_free (GstMpegtsDvbMultilingualServiceNameItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsDvbMultilingualServiceNameItem,
+ gst_mpegts_dvb_multilingual_service_name_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_multilingual_service_name_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_multilingual_service_name_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_multilingual_service_name:
* @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME
@@ -1751,6 +1900,18 @@ gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const
}
/* GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT (0x5E) */
+
+static GstMpegtsDvbMultilingualComponentItem
+ * _gst_mpegts_dvb_multilingual_component_item_copy
+ (GstMpegtsDvbMultilingualComponentItem * source)
+{
+ GstMpegtsDvbMultilingualComponentItem *copy =
+ g_slice_dup (GstMpegtsDvbMultilingualComponentItem, source);
+ copy->description = g_strdup (source->description);
+ copy->language_code = g_strdup (source->language_code);
+ return copy;
+}
+
static void
_gst_mpegts_dvb_multilingual_component_item_free
(GstMpegtsDvbMultilingualComponentItem * item)
@@ -1760,6 +1921,11 @@ static void
g_slice_free (GstMpegtsDvbMultilingualComponentItem, item);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsDvbMultilingualComponentItem,
+ gst_mpegts_dvb_multilingual_component_item,
+ (GBoxedCopyFunc) _gst_mpegts_dvb_multilingual_component_item_copy,
+ (GFreeFunc) _gst_mpegts_dvb_multilingual_component_item_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_multilingual_component:
* @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT
@@ -2080,11 +2246,26 @@ G_DEFINE_BOXED_TYPE (GstMpegtsT2DeliverySystemDescriptor,
(GBoxedCopyFunc) _gst_mpegts_t2_delivery_system_descriptor_copy,
(GFreeFunc) gst_mpegts_t2_delivery_system_descriptor_free);
-static void
- _gst_mpegts_t2_delivery_system_cell_extension_free
- (GstMpegtsT2DeliverySystemCellExtension * ext)
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsT2DeliverySystemCellExtension,
+ gst_mpegts_t2_delivery_system_cell_extension);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsT2DeliverySystemCellExtension,
+ gst_mpegts_t2_delivery_system_cell_extension);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsT2DeliverySystemCellExtension,
+ gst_mpegts_t2_delivery_system_cell_extension,
+ (GBoxedCopyFunc) _gst_mpegts_t2_delivery_system_cell_extension_copy,
+ (GFreeFunc) _gst_mpegts_t2_delivery_system_cell_extension_free);
+
+static GstMpegtsT2DeliverySystemCell *
+_gst_mpegts_t2_delivery_system_cell_copy (GstMpegtsT2DeliverySystemCell
+ * source)
{
- g_slice_free (GstMpegtsT2DeliverySystemCellExtension, ext);
+ GstMpegtsT2DeliverySystemCell *copy =
+ g_slice_dup (GstMpegtsT2DeliverySystemCell, source);
+ copy->centre_frequencies = g_array_ref (source->centre_frequencies);
+ copy->sub_cells = g_ptr_array_ref (source->sub_cells);
+ return copy;
}
static void
@@ -2095,6 +2276,11 @@ _gst_mpegts_t2_delivery_system_cell_free (GstMpegtsT2DeliverySystemCell * cell)
g_slice_free (GstMpegtsT2DeliverySystemCell, cell);
}
+G_DEFINE_BOXED_TYPE (GstMpegtsT2DeliverySystemCell,
+ gst_mpegts_t2_delivery_system_cell,
+ (GBoxedCopyFunc) _gst_mpegts_t2_delivery_system_cell_copy,
+ (GFreeFunc) _gst_mpegts_t2_delivery_system_cell_free);
+
/**
* gst_mpegts_descriptor_parse_dvb_t2_delivery_system:
* @descriptor: a %GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM #GstMpegtsDescriptor
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index 8b87a1d47..5bf3a00ba 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -254,6 +254,11 @@ struct _GstMpegtsSatelliteDeliverySystemDescriptor
GstMpegtsDVBCodeRate fec_inner;
};
+#define GST_TYPE_MPEGTS_SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_satellite_delivery_system_descriptor_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_satellite_delivery_system_descriptor_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor *descriptor,
GstMpegtsSatelliteDeliverySystemDescriptor *res);
@@ -295,6 +300,7 @@ GType gst_mpegts_dvb_cable_delivery_system_descriptor_get_type (void);
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegtsDescriptor *descriptor,
GstMpegtsCableDeliverySystemDescriptor *res);
+
GST_MPEGTS_API
void gst_mpegts_dvb_cable_delivery_system_descriptor_free (GstMpegtsCableDeliverySystemDescriptor * source);
@@ -372,6 +378,11 @@ struct _GstMpegtsDVBServiceListItem
GstMpegtsDVBServiceType type;
};
+#define GST_TYPE_MPEGTS_DVB_SERVICE_LIST_ITEM (gst_mpegts_dvb_service_list_item_get_type ())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_service_list_item_get_type (void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegtsDescriptor * descriptor,
GPtrArray ** list);
@@ -478,14 +489,29 @@ GType gst_mpegts_dvb_linkage_descriptor_get_type (void);
GST_MPEGTS_API
void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source);
+#define GST_TYPE_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER (gst_mpegts_dvb_linkage_mobile_hand_over_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_linkage_mobile_hand_over_get_type (void);
+
GST_MPEGTS_API
const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over
(const GstMpegtsDVBLinkageDescriptor * desc);
+#define GST_TYPE_MPEGTS_DVB_LINKAGE_EVENT (gst_mpegts_dvb_linkage_event_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_linkage_event_get_type (void);
+
GST_MPEGTS_API
const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event
(const GstMpegtsDVBLinkageDescriptor * desc);
+#define GST_TYPE_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT (gst_mpegts_dvb_linkage_extended_event_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_linkage_extended_event_get_type (void);
+
GST_MPEGTS_API
const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event
(const GstMpegtsDVBLinkageDescriptor * desc);
@@ -513,6 +539,11 @@ struct _GstMpegtsExtendedEventItem
gchar *item;
};
+#define GST_TYPE_MPEGTS_EXTENDED_EVENT_ITEM (gst_mpegts_extended_event_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_extended_event_item_get_type(void);
+
/**
* GstMpegtsExtendedEventDescriptor:
* @descriptor_number:
@@ -619,6 +650,11 @@ gboolean gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor *
/* GST_MTS_DESC_DVB_PARENTAL_RATING (0x55) */
typedef struct _GstMpegtsDVBParentalRatingItem GstMpegtsDVBParentalRatingItem;
+#define GST_TYPE_MPEGTS_DVB_PARENTAL_RATING_ITEM (gst_mpegts_dvb_parental_rating_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_parental_rating_item_get_type (void);
+
/**
* GstMpegtsDVBParentalRating:
* @country_code: This 24-bit field identifies a country using the 3-character
@@ -749,6 +785,11 @@ struct _GstMpegtsTerrestrialDeliverySystemDescriptor
gboolean other_frequency;
};
+#define GST_TYPE_MPEGTS_TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_terrestrial_delivery_system_descriptor_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_terrestrial_delivery_system_descriptor_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_terrestrial_delivery_system (const GstMpegtsDescriptor
*descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor * res);
@@ -769,6 +810,11 @@ struct _GstMpegtsDvbMultilingualNetworkNameItem
gchar *network_name;
};
+#define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_NETWORK_NAME_ITEM (gst_mpegts_dvb_multilingual_network_name_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_multilingual_network_name_item_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const GstMpegtsDescriptor
*descriptor, GPtrArray ** network_name_items);
@@ -789,6 +835,11 @@ struct _GstMpegtsDvbMultilingualBouquetNameItem
gchar *bouquet_name;
};
+#define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_BOUQUET_NAME_ITEM (gst_mpegts_dvb_multilingual_bouquet_name_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_multilingual_bouquet_name_item_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const GstMpegtsDescriptor
*descriptor, GPtrArray ** bouquet_name_items);
@@ -811,6 +862,11 @@ struct _GstMpegtsDvbMultilingualServiceNameItem
gchar *service_name;
};
+#define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_SERVICE_NAME_ITEM (gst_mpegts_dvb_multilingual_service_name_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_multilingual_service_name_item_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const GstMpegtsDescriptor
*descriptor, GPtrArray ** service_name_items);
@@ -829,6 +885,11 @@ struct _GstMpegtsDvbMultilingualComponentItem
gchar *description;
};
+#define GST_TYPE_MPEGTS_DVB_MULTILINGUAL_COMPONENT_ITEM (gst_mpegts_dvb_multilingual_component_item_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_dvb_multilingual_component_item_get_type(void);
+
GST_MPEGTS_API
gboolean gst_mpegts_descriptor_parse_dvb_multilingual_component (const GstMpegtsDescriptor
*descriptor, guint8 * component_tag, GPtrArray ** component_description_items);
@@ -922,6 +983,11 @@ struct _GstMpegtsT2DeliverySystemCellExtension
guint32 transposer_frequency;
};
+#define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL_EXTENSION (gst_mpegts_t2_delivery_system_cell_extension_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_t2_delivery_system_cell_extension_get_type(void);
+
typedef struct _GstMpegtsT2DeliverySystemCell GstMpegtsT2DeliverySystemCell;
/**
@@ -937,6 +1003,11 @@ struct _GstMpegtsT2DeliverySystemCell
GPtrArray *sub_cells;
};
+#define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_CELL (gst_mpegts_t2_delivery_system_cell_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_t2_delivery_system_cell_get_type(void);
+
typedef struct _GstMpegtsT2DeliverySystemDescriptor GstMpegtsT2DeliverySystemDescriptor;
/**
diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
index 079716e7f..48aa8e336 100644
--- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
+++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
@@ -26,6 +26,18 @@
#include "mpegts.h"
#include "gstmpegts-private.h"
+#define DEFINE_STATIC_COPY_FUNCTION(type, name) \
+static type * _##name##_copy (type * source) \
+{ \
+ return g_slice_dup (type, source); \
+}
+
+#define DEFINE_STATIC_FREE_FUNCTION(type, name) \
+static void _##name##_free (type * source) \
+{ \
+ g_slice_free (type, source); \
+}
+
/**
* SECTION:gstmpegtsdescriptor
* @title: Base MPEG-TS descriptors
@@ -1064,6 +1076,28 @@ gst_mpegts_descriptor_from_iso_639_language (const gchar * language)
return descriptor;
}
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsLogicalChannelDescriptor,
+ gst_mpegts_logical_channel_descriptor);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsLogicalChannelDescriptor,
+ gst_mpegts_logical_channel_descriptor);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsLogicalChannelDescriptor,
+ gst_mpegts_logical_channel_descriptor,
+ (GBoxedCopyFunc) _gst_mpegts_logical_channel_descriptor_copy,
+ (GFreeFunc) _gst_mpegts_logical_channel_descriptor_free);
+
+DEFINE_STATIC_COPY_FUNCTION (GstMpegtsLogicalChannel,
+ gst_mpegts_logical_channel);
+
+DEFINE_STATIC_FREE_FUNCTION (GstMpegtsLogicalChannel,
+ gst_mpegts_logical_channel);
+
+G_DEFINE_BOXED_TYPE (GstMpegtsLogicalChannel,
+ gst_mpegts_logical_channel,
+ (GBoxedCopyFunc) _gst_mpegts_logical_channel_copy,
+ (GFreeFunc) _gst_mpegts_logical_channel_free);
+
/**
* gst_mpegts_descriptor_parse_logical_channel:
* @descriptor: a %GST_MTS_DESC_DTG_LOGICAL_CHANNEL #GstMpegtsDescriptor
diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.h b/gst-libs/gst/mpegts/gstmpegtsdescriptor.h
index 825b8aaf8..501feb70a 100644
--- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.h
+++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.h
@@ -354,6 +354,16 @@ struct _GstMpegtsLogicalChannelDescriptor
GstMpegtsLogicalChannel channels[64];
};
+#define GST_TYPE_MPEGTS_LOGICAL_CHANNEL_DESCRIPTOR (gst_mpegts_logical_channel_descriptor_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_logical_channel_descriptor_get_type(void);
+
+#define GST_TYPE_MPEGTS_LOGICAL_CHANNEL (gst_mpegts_logical_channel_get_type())
+
+GST_MPEGTS_API
+GType gst_mpegts_logical_channel_get_type(void);
+
/* FIXME : Maybe make two methods. One for getting the number of channels,
* and the other for getting the content for one channel ? */
GST_MPEGTS_API