diff options
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/mpegts/Makefile.am | 4 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gst-atsc-section.h | 36 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gst-dvb-descriptor.h | 93 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gst-dvb-section.h | 42 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gstmpegtsdescriptor.h | 31 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gstmpegtssection.h | 42 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/meson.build | 1 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/mpegts-prelude.h | 31 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/mpegts.h | 3 | ||||
-rwxr-xr-x | gst-libs/gst/mpegts/mpegts_enum.py | 4 |
10 files changed, 162 insertions, 125 deletions
diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am index 1dc59d07e..f264e33a7 100644 --- a/gst-libs/gst/mpegts/Makefile.am +++ b/gst-libs/gst/mpegts/Makefile.am @@ -19,6 +19,7 @@ libgstmpegts_@GST_API_VERSION@include_HEADERS = \ gst-scte-section.h \ gstmpegtsdescriptor.h \ gst-dvb-descriptor.h \ + mpegts-prelude.h \ mpegts.h nodist_libgstmpegts_@GST_API_VERSION@include_HEADERS = \ @@ -48,7 +49,8 @@ glib_enum_headers=gstmpegtssection.h \ glib_enum_define=GST_MPEGTS glib_gen_prefix=gst_mpegts glib_gen_basename=gstmpegts -glib_gen_decl_banner=GST_EXPORT +glib_gen_decl_banner=GST_MPEGTS_API +glib_gen_decl_include=\#include <gst/mpegts/mpegts-prelude.h> BUILT_SOURCES = gstmpegts-enumtypes.c gstmpegts-enumtypes.h nodist_libgstmpegts_@GST_API_VERSION@_la_SOURCES = gstmpegts-enumtypes.c diff --git a/gst-libs/gst/mpegts/gst-atsc-section.h b/gst-libs/gst/mpegts/gst-atsc-section.h index 23f26cb0b..14b8684ad 100644 --- a/gst-libs/gst/mpegts/gst-atsc-section.h +++ b/gst-libs/gst/mpegts/gst-atsc-section.h @@ -119,16 +119,16 @@ struct _GstMpegtsAtscVCT GPtrArray *descriptors; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_vct_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_vct_source_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscVCT * gst_mpegts_section_get_atsc_tvct (GstMpegtsSection * section); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscVCT * gst_mpegts_section_get_atsc_cvct (GstMpegtsSection * section); /* MGT */ @@ -176,13 +176,13 @@ struct _GstMpegtsAtscMGT GPtrArray *descriptors; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_mgt_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_mgt_table_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscMGT * gst_mpegts_section_get_atsc_mgt (GstMpegtsSection * section); /* Multiple string structure (used in ETT and EIT */ @@ -202,7 +202,7 @@ struct _GstMpegtsAtscStringSegment { gchar *cached_string; }; -GST_EXPORT +GST_MPEGTS_API const gchar * gst_mpegts_atsc_string_segment_get_string (GstMpegtsAtscStringSegment * seg); /** @@ -215,10 +215,10 @@ struct _GstMpegtsAtscMultString { GPtrArray *segments; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_string_segment_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_mult_string_get_type (void); /* EIT */ @@ -261,13 +261,13 @@ struct _GstMpegtsAtscEIT GPtrArray *events; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_eit_event_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_eit_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscEIT *gst_mpegts_section_get_atsc_eit (GstMpegtsSection *section); /* ETT */ @@ -292,10 +292,10 @@ struct _GstMpegtsAtscETT GPtrArray *messages; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_ett_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscETT *gst_mpegts_section_get_atsc_ett (GstMpegtsSection *section); /* STT */ @@ -323,14 +323,14 @@ struct _GstMpegtsAtscSTT GstDateTime *utc_datetime; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_atsc_stt_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsAtscSTT * gst_mpegts_section_get_atsc_stt (GstMpegtsSection * section); /* FIXME receive a non-const parameter but we only provide a const getter */ -GST_EXPORT +GST_MPEGTS_API GstDateTime * gst_mpegts_atsc_stt_get_datetime_utc (GstMpegtsAtscSTT * stt); G_END_DECLS diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h index 362e3e3e1..80c1fa3c8 100644 --- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h +++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h @@ -33,6 +33,7 @@ #define GST_DVB_DESCRIPTOR_H #include <gst/gst.h> +#include <gst/mpegts/mpegts-prelude.h> G_BEGIN_DECLS @@ -157,16 +158,16 @@ typedef enum { /* GST_MTS_DESC_DVB_NETWORK_NAME (0x40) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_network_name (const GstMpegtsDescriptor *descriptor, gchar **name); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_network_name (const gchar * name); /* GST_MTS_DESC_DVB_STUFFING (0x42) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegtsDescriptor * descriptor, guint8 ** stuffing_bytes); @@ -253,7 +254,7 @@ struct _GstMpegtsSatelliteDeliverySystemDescriptor GstMpegtsDVBCodeRate fec_inner; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_satellite_delivery_system (const GstMpegtsDescriptor *descriptor, GstMpegtsSatelliteDeliverySystemDescriptor *res); @@ -286,13 +287,13 @@ struct _GstMpegtsCableDeliverySystemDescriptor GstMpegtsDVBCodeRate fec_inner; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegtsDescriptor *descriptor, GstMpegtsCableDeliverySystemDescriptor *res); /* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegtsDescriptor * descriptor, gchar ** bouquet_name); @@ -339,13 +340,13 @@ typedef enum { GST_DVB_SERVICE_RESERVED_FF } GstMpegtsDVBServiceType; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_service (const GstMpegtsDescriptor *descriptor, GstMpegtsDVBServiceType *service_type, gchar **service_name, gchar **provider_name); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor *gst_mpegts_descriptor_from_dvb_service (GstMpegtsDVBServiceType service_type, const gchar * service_name, const gchar * service_provider); @@ -364,7 +365,7 @@ struct _GstMpegtsDVBServiceListItem GstMpegtsDVBServiceType type; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegtsDescriptor * descriptor, GPtrArray ** list); @@ -464,31 +465,31 @@ struct _GstMpegtsDVBLinkageDescriptor #define GST_TYPE_MPEGTS_DVB_LINKAGE_DESCRIPTOR ( gst_mpegts_dvb_linkage_descriptor_get_type()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_dvb_linkage_descriptor_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_dvb_linkage_descriptor_free (GstMpegtsDVBLinkageDescriptor * source); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsDVBLinkageMobileHandOver * gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over (const GstMpegtsDVBLinkageDescriptor * desc); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsDVBLinkageEvent * gst_mpegts_dvb_linkage_descriptor_get_event (const GstMpegtsDVBLinkageDescriptor * desc); -GST_EXPORT +GST_MPEGTS_API const GPtrArray * gst_mpegts_dvb_linkage_descriptor_get_extended_event (const GstMpegtsDVBLinkageDescriptor * desc); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_linkage (const GstMpegtsDescriptor * descriptor, GstMpegtsDVBLinkageDescriptor ** res); /* GST_MTS_DESC_DVB_SHORT_EVENT (0x4D) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_short_event (const GstMpegtsDescriptor *descriptor, gchar **language_code, gchar **event_name, @@ -526,13 +527,13 @@ struct _GstMpegtsExtendedEventDescriptor #define GST_TYPE_MPEGTS_EXTENDED_EVENT_DESCRIPTOR (gst_mpegts_extended_event_descriptor_get_type()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_extended_event_descriptor_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_extended_event_descriptor_free (GstMpegtsExtendedEventDescriptor * source); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_extended_event (const GstMpegtsDescriptor *descriptor, GstMpegtsExtendedEventDescriptor **res); @@ -559,25 +560,25 @@ struct _GstMpegtsComponentDescriptor gchar *text; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_component_descriptor_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_dvb_component_descriptor_free (GstMpegtsComponentDescriptor * source); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_component (const GstMpegtsDescriptor *descriptor, GstMpegtsComponentDescriptor **res); /* GST_MTS_DESC_DVB_STREAM_IDENTIFIER (0x52) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_stream_identifier (const GstMpegtsDescriptor *descriptor, guint8 *component_tag); /* GST_MTS_DESC_DVB_CA_IDENTIFIER (0x53) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegtsDescriptor * descriptor, GArray ** list); @@ -604,7 +605,7 @@ struct _GstMpegtsContent guint8 user_byte; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_content (const GstMpegtsDescriptor * descriptor, GPtrArray ** content); @@ -623,7 +624,7 @@ struct _GstMpegtsDVBParentalRatingItem guint8 rating; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_parental_rating (const GstMpegtsDescriptor * descriptor, GPtrArray ** rating); @@ -643,28 +644,28 @@ typedef enum { HEARING_IMPAIRED_PAGE } GstMpegtsDVBTeletextType; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_teletext_idx (const GstMpegtsDescriptor * descriptor, guint idx, gchar ** language_code, GstMpegtsDVBTeletextType * teletext_type, guint8 * magazine_number, guint8 * page_number); -GST_EXPORT +GST_MPEGTS_API guint gst_mpegts_descriptor_parse_dvb_teletext_nb (const GstMpegtsDescriptor * descriptor); /* GST_MTS_DESC_DVB_SUBTITLING (0x59) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_subtitling_idx (const GstMpegtsDescriptor *descriptor, guint idx, gchar ** lang, guint8 *type, guint16 *composition_page_id, guint16 *ancillary_page_id); -GST_EXPORT +GST_MPEGTS_API guint gst_mpegts_descriptor_parse_dvb_subtitling_nb (const GstMpegtsDescriptor *descriptor); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor * gst_mpegts_descriptor_from_dvb_subtitling (const gchar *lang, guint8 type, guint16 composition, guint16 ancillary); @@ -741,7 +742,7 @@ struct _GstMpegtsTerrestrialDeliverySystemDescriptor gboolean other_frequency; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_terrestrial_delivery_system (const GstMpegtsDescriptor *descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor * res); @@ -761,7 +762,7 @@ struct _GstMpegtsDvbMultilingualNetworkNameItem gchar *network_name; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const GstMpegtsDescriptor *descriptor, GPtrArray ** network_name_items); @@ -781,7 +782,7 @@ struct _GstMpegtsDvbMultilingualBouquetNameItem gchar *bouquet_name; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const GstMpegtsDescriptor *descriptor, GPtrArray ** bouquet_name_items); @@ -803,7 +804,7 @@ struct _GstMpegtsDvbMultilingualServiceNameItem gchar *service_name; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const GstMpegtsDescriptor *descriptor, GPtrArray ** service_name_items); @@ -821,20 +822,20 @@ struct _GstMpegtsDvbMultilingualComponentItem gchar *description; }; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_multilingual_component (const GstMpegtsDescriptor *descriptor, guint8 * component_tag, GPtrArray ** component_description_items); /* GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER (0x5F) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_private_data_specifier (const GstMpegtsDescriptor * descriptor, guint32 * private_data_specifier, guint8 ** private_data, guint8 * length); /* GST_MTS_DESC_DVB_FREQUENCY_LIST (0x62) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_frequency_list (const GstMpegtsDescriptor * descriptor, gboolean * offset, GArray ** list); @@ -861,13 +862,13 @@ struct _GstMpegtsDataBroadcastDescriptor #define GST_TYPE_MPEGTS_DVB_DATA_BROADCAST_DESCRIPTOR (gst_mpegts_dvb_data_broadcast_descriptor_get_type ()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_dvb_data_broadcast_descriptor_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_dvb_data_broadcast_descriptor_free (GstMpegtsDataBroadcastDescriptor * source); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegtsDescriptor *descriptor, GstMpegtsDataBroadcastDescriptor ** res); @@ -887,13 +888,13 @@ typedef enum GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F = 0x7f, } GstMpegtsDVBScramblingModeType; -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_scrambling (const GstMpegtsDescriptor * descriptor, GstMpegtsDVBScramblingModeType * scrambling_mode); /* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegtsDescriptor * descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes, guint8 * len); @@ -960,13 +961,13 @@ struct _GstMpegtsT2DeliverySystemDescriptor }; #define GST_TYPE_MPEGTS_T2_DELIVERY_SYSTEM_DESCRIPTOR (gst_mpegts_t2_delivery_system_descriptor_get_type ()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_t2_delivery_system_descriptor_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_t2_delivery_system_descriptor_free (GstMpegtsT2DeliverySystemDescriptor * source); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_dvb_t2_delivery_system (const GstMpegtsDescriptor *descriptor, GstMpegtsT2DeliverySystemDescriptor ** res); diff --git a/gst-libs/gst/mpegts/gst-dvb-section.h b/gst-libs/gst/mpegts/gst-dvb-section.h index a8aa99ace..a99036d93 100644 --- a/gst-libs/gst/mpegts/gst-dvb-section.h +++ b/gst-libs/gst/mpegts/gst-dvb-section.h @@ -162,22 +162,22 @@ struct _GstMpegtsNIT GPtrArray *streams; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_nit_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_nit_stream_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsNIT *gst_mpegts_section_get_nit (GstMpegtsSection *section); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_mpegts_section_from_nit (GstMpegtsNIT *nit); -GST_EXPORT +GST_MPEGTS_API GstMpegtsNIT *gst_mpegts_nit_new (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsNITStream *gst_mpegts_nit_stream_new (void); @@ -211,13 +211,13 @@ struct _GstMpegtsBAT GPtrArray *streams; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_bat_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_bat_stream_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsBAT *gst_mpegts_section_get_bat (GstMpegtsSection *section); /* SDT */ @@ -268,22 +268,22 @@ struct _GstMpegtsSDT GPtrArray *services; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_sdt_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_sdt_service_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsSDT *gst_mpegts_section_get_sdt (GstMpegtsSection *section); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_mpegts_section_from_sdt (GstMpegtsSDT * sdt); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSDT *gst_mpegts_sdt_new (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSDTService *gst_mpegts_sdt_service_new (void); /* EIT */ @@ -333,18 +333,18 @@ struct _GstMpegtsEIT GPtrArray *events; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_eit_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_eit_event_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsEIT *gst_mpegts_section_get_eit (GstMpegtsSection *section); /* TDT */ -GST_EXPORT +GST_MPEGTS_API GstDateTime *gst_mpegts_section_get_tdt (GstMpegtsSection *section); /* TOT */ @@ -365,10 +365,10 @@ struct _GstMpegtsTOT GPtrArray *descriptors; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_tot_get_type (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsTOT *gst_mpegts_section_get_tot (GstMpegtsSection *section); G_END_DECLS diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.h b/gst-libs/gst/mpegts/gstmpegtsdescriptor.h index 55edeccc4..825b8aaf8 100644 --- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.h +++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.h @@ -33,6 +33,7 @@ #define GST_MPEGTS_DESCRIPTOR_H #include <gst/gst.h> +#include <gst/mpegts/mpegts-prelude.h> G_BEGIN_DECLS @@ -238,7 +239,7 @@ typedef enum { typedef struct _GstMpegtsDescriptor GstMpegtsDescriptor; #define GST_TYPE_MPEGTS_DESCRIPTOR (gst_mpegts_descriptor_get_type()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_descriptor_get_type (void); /** @@ -263,26 +264,26 @@ struct _GstMpegtsDescriptor gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_descriptor_free (GstMpegtsDescriptor *desc); -GST_EXPORT +GST_MPEGTS_API GPtrArray *gst_mpegts_parse_descriptors (guint8 * buffer, gsize buf_len); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsDescriptor * gst_mpegts_find_descriptor (GPtrArray *descriptors, guint8 tag); /* GST_MTS_DESC_REGISTRATION (0x05) */ -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor *gst_mpegts_descriptor_from_registration ( const gchar *format_identifier, guint8 *additional_info, gsize additional_info_length); /* GST_MTS_DESC_CA (0x09) */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_ca (GstMpegtsDescriptor *descriptor, guint16 *ca_system_id, guint16 *ca_pid, @@ -313,25 +314,25 @@ struct _GstMpegtsISO639LanguageDescriptor }; #define GST_TYPE_MPEGTS_ISO_639_LANGUAGE (gst_mpegts_iso_639_language_get_type ()) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_iso_639_language_get_type (void); -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_iso_639_language_descriptor_free (GstMpegtsISO639LanguageDescriptor * desc); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_iso_639_language (const GstMpegtsDescriptor *descriptor, GstMpegtsISO639LanguageDescriptor **res); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_iso_639_language_idx (const GstMpegtsDescriptor *descriptor, guint idx, gchar **lang, GstMpegtsIso639AudioType *audio_type); -GST_EXPORT +GST_MPEGTS_API guint gst_mpegts_descriptor_parse_iso_639_language_nb (const GstMpegtsDescriptor *descriptor); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor * gst_mpegts_descriptor_from_iso_639_language (const gchar * language); @@ -355,16 +356,16 @@ struct _GstMpegtsLogicalChannelDescriptor /* FIXME : Maybe make two methods. One for getting the number of channels, * and the other for getting the content for one channel ? */ -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_descriptor_parse_logical_channel (const GstMpegtsDescriptor *descriptor, GstMpegtsLogicalChannelDescriptor *res); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor * gst_mpegts_descriptor_from_custom (guint8 tag, const guint8 *data, gsize length); -GST_EXPORT +GST_MPEGTS_API GstMpegtsDescriptor * gst_mpegts_descriptor_from_custom_with_extension (guint8 tag, guint8 tag_extension, const guint8 *data, gsize length); diff --git a/gst-libs/gst/mpegts/gstmpegtssection.h b/gst-libs/gst/mpegts/gstmpegtssection.h index de8bb3b80..3b8846c8a 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.h +++ b/gst-libs/gst/mpegts/gstmpegtssection.h @@ -36,7 +36,7 @@ typedef struct _GstMpegtsSection GstMpegtsSection; #define GST_MPEGTS_SECTION_TYPE(section) (GST_MPEGTS_SECTION (section)->section_type) -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_section_get_type (void); /** @@ -177,7 +177,7 @@ struct _GstMpegtsSection gpointer _gst_reserved[GST_PADDING]; }; -GST_EXPORT +GST_MPEGTS_API GBytes *gst_mpegts_section_get_data (GstMpegtsSection *section); /* PAT */ @@ -197,25 +197,25 @@ struct _GstMpegtsPatProgram guint16 network_or_program_map_PID; }; -GST_EXPORT +GST_MPEGTS_API GPtrArray *gst_mpegts_section_get_pat (GstMpegtsSection *section); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_pat_program_get_type (void); -GST_EXPORT +GST_MPEGTS_API GPtrArray *gst_mpegts_pat_new (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsPatProgram *gst_mpegts_pat_program_new (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_mpegts_section_from_pat (GPtrArray * programs, guint16 ts_id); /* CAT */ -GST_EXPORT +GST_MPEGTS_API GPtrArray *gst_mpegts_section_get_cat (GstMpegtsSection *section); /* PMT */ @@ -377,27 +377,27 @@ struct _GstMpegtsPMT GPtrArray *streams; }; -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_pmt_get_type (void); -GST_EXPORT +GST_MPEGTS_API GType gst_mpegts_pmt_stream_get_type (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsPMT *gst_mpegts_pmt_new (void); -GST_EXPORT +GST_MPEGTS_API GstMpegtsPMTStream *gst_mpegts_pmt_stream_new (void); -GST_EXPORT +GST_MPEGTS_API const GstMpegtsPMT *gst_mpegts_section_get_pmt (GstMpegtsSection *section); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_mpegts_section_from_pmt (GstMpegtsPMT *pmt, guint16 pid); /* TSDT */ -GST_EXPORT +GST_MPEGTS_API GPtrArray *gst_mpegts_section_get_tsdt (GstMpegtsSection *section); @@ -406,24 +406,24 @@ GPtrArray *gst_mpegts_section_get_tsdt (GstMpegtsSection *section); #define gst_mpegts_section_ref(section) ((GstMpegtsSection*) gst_mini_object_ref (GST_MINI_OBJECT_CAST (section))) #define gst_mpegts_section_unref(section) (gst_mini_object_unref (GST_MINI_OBJECT_CAST (section))) -GST_EXPORT +GST_MPEGTS_API GstMessage *gst_message_new_mpegts_section (GstObject *parent, GstMpegtsSection *section); -GST_EXPORT +GST_MPEGTS_API gboolean gst_mpegts_section_send_event (GstMpegtsSection * section, GstElement * element); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_event_parse_mpegts_section (GstEvent * event); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_message_parse_mpegts_section (GstMessage *message); -GST_EXPORT +GST_MPEGTS_API GstMpegtsSection *gst_mpegts_section_new (guint16 pid, guint8 * data, gsize data_size); -GST_EXPORT +GST_MPEGTS_API guint8 *gst_mpegts_section_packetize (GstMpegtsSection * section, gsize * output_size); G_END_DECLS diff --git a/gst-libs/gst/mpegts/meson.build b/gst-libs/gst/mpegts/meson.build index 49bcb6972..2ee420926 100644 --- a/gst-libs/gst/mpegts/meson.build +++ b/gst-libs/gst/mpegts/meson.build @@ -13,6 +13,7 @@ mpegts_headers = [ 'gst-scte-section.h', 'gstmpegtsdescriptor.h', 'gst-dvb-descriptor.h', + 'mpegts-prelude.h', 'mpegts.h', ] install_headers(mpegts_headers, subdir : 'gstreamer-1.0/gst/mpegts') diff --git a/gst-libs/gst/mpegts/mpegts-prelude.h b/gst-libs/gst/mpegts/mpegts-prelude.h new file mode 100644 index 000000000..26c00a4b1 --- /dev/null +++ b/gst-libs/gst/mpegts/mpegts-prelude.h @@ -0,0 +1,31 @@ +/* GStreamer MpegTS Library + * Copyright (C) 2018 GStreamer developers + * + * mpegts-prelude.h: prelude include header for gst-mpegts library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_MPEGTS_PRELUDE_H__ +#define __GST_MPEGTS_PRELUDE_H__ + +#include <gst/gst.h> + +#ifndef GST_MPEGTS_API +#define GST_MPEGTS_API GST_EXPORT +#endif + +#endif /* __GST_MPEGTS_PRELUDE_H__ */ diff --git a/gst-libs/gst/mpegts/mpegts.h b/gst-libs/gst/mpegts/mpegts.h index f4f816c39..a0e0f2f9f 100644 --- a/gst-libs/gst/mpegts/mpegts.h +++ b/gst-libs/gst/mpegts/mpegts.h @@ -29,6 +29,7 @@ #warning "You can define GST_USE_UNSTABLE_API to avoid this warning." #endif +#include <gst/mpegts/mpegts-prelude.h> #include <gst/mpegts/gstmpegtsdescriptor.h> #include <gst/mpegts/gst-dvb-descriptor.h> #include <gst/mpegts/gstmpegtssection.h> @@ -39,7 +40,7 @@ G_BEGIN_DECLS -GST_EXPORT +GST_MPEGTS_API void gst_mpegts_initialize (void); G_END_DECLS diff --git a/gst-libs/gst/mpegts/mpegts_enum.py b/gst-libs/gst/mpegts/mpegts_enum.py index 9681348bd..320bb8872 100755 --- a/gst-libs/gst/mpegts/mpegts_enum.py +++ b/gst-libs/gst/mpegts/mpegts_enum.py @@ -23,11 +23,11 @@ headers = sys.argv[argn + 1:] inc = '\n'.join(['#include"%s"' % os.path.basename(i) for i in headers]) h_array = ['--fhead', - "#ifndef __GST_MPEGTS_ENUM_TYPES_H__\n#define __GST_MPEGTS_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n\nG_BEGIN_DECLS\n", + "#ifndef __GST_MPEGTS_ENUM_TYPES_H__\n#define __GST_MPEGTS_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/mpegts/mpegts-prelude.h>\nG_BEGIN_DECLS\n", '--fprod', "\n/* enumerations from \"@filename@\" */\n", '--vhead', - "GST_EXPORT GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n", + "GST_MPEGTS_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n", '--ftail', "G_END_DECLS\n\n#endif /* __GST_MPEGTS_ENUM_TYPES_H__ */"] |