From cad9759e7ba045b36b185fd0827e96c14228e9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 13 Mar 2018 11:08:34 +0000 Subject: [PATCH] pbutils: GST_EXPORT -> GST_PBUTILS_API We need different export decorators for the different libs. For now no actual change though, just rename before the release, and add prelude headers to define the new decorator to GST_EXPORT. --- gst-libs/gst/pbutils/Makefile.am | 4 +- gst-libs/gst/pbutils/codec-utils.h | 49 +++---- gst-libs/gst/pbutils/descriptions.h | 15 ++- gst-libs/gst/pbutils/encoding-profile.h | 78 +++++------ gst-libs/gst/pbutils/encoding-target.h | 28 ++-- gst-libs/gst/pbutils/gstaudiovisualizer.h | 3 +- gst-libs/gst/pbutils/gstdiscoverer.h | 121 +++++++++--------- .../gst/pbutils/gstpluginsbaseversion.h.in | 5 +- gst-libs/gst/pbutils/install-plugins.h | 27 ++-- gst-libs/gst/pbutils/meson.build | 1 + gst-libs/gst/pbutils/missing-plugins.h | 27 ++-- gst-libs/gst/pbutils/pbutils-prelude.h | 31 +++++ gst-libs/gst/pbutils/pbutils.h | 2 +- gst-libs/gst/pbutils/pbutils_mkenum.py | 4 +- 14 files changed, 218 insertions(+), 177 deletions(-) create mode 100644 gst-libs/gst/pbutils/pbutils-prelude.h diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am index ad609987ec..ae5199367b 100644 --- a/gst-libs/gst/pbutils/Makefile.am +++ b/gst-libs/gst/pbutils/Makefile.am @@ -2,6 +2,7 @@ lib_LTLIBRARIES = libgstpbutils-@GST_API_VERSION@.la headers_pbutils = \ pbutils.h \ + pbutils-prelude.h \ codec-utils.h \ descriptions.h \ encoding-profile.h \ @@ -16,7 +17,8 @@ glib_enum_headers = $(headers_pbutils) glib_enum_define = PB_UTILS glib_gen_prefix = pbutils glib_gen_basename = pbutils -glib_gen_decl_banner=GST_EXPORT +glib_gen_decl_banner=GST_PBUTILS_API +glib_gen_decl_include=\#include built_headers_configure = \ gstpluginsbaseversion.h diff --git a/gst-libs/gst/pbutils/codec-utils.h b/gst-libs/gst/pbutils/codec-utils.h index 647767e567..2d3dc0c966 100644 --- a/gst-libs/gst/pbutils/codec-utils.h +++ b/gst-libs/gst/pbutils/codec-utils.h @@ -23,87 +23,88 @@ #define __GST_PB_UTILS_CODEC_UTILS_H__ #include +#include G_BEGIN_DECLS /* AAC */ -GST_EXPORT +GST_PBUTILS_API guint gst_codec_utils_aac_get_sample_rate_from_index (guint sr_idx); -GST_EXPORT +GST_PBUTILS_API gint gst_codec_utils_aac_get_index_from_sample_rate (guint rate); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_aac_get_profile (const guint8 * audio_config, guint len); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_aac_get_level (const guint8 * audio_config, guint len); -GST_EXPORT +GST_PBUTILS_API guint gst_codec_utils_aac_get_sample_rate (const guint8 * audio_config, guint len); -GST_EXPORT +GST_PBUTILS_API guint gst_codec_utils_aac_get_channels (const guint8 * audio_config, guint len); -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_aac_caps_set_level_and_profile (GstCaps * caps, const guint8 * audio_config, guint len); /* H.264 */ -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_h264_get_profile (const guint8 * sps, guint len); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_h264_get_level (const guint8 * sps, guint len); -GST_EXPORT +GST_PBUTILS_API guint8 gst_codec_utils_h264_get_level_idc (const gchar * level); -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_h264_caps_set_level_and_profile (GstCaps * caps, const guint8 * sps, guint len); /* H.265 */ -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level, guint len); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_h265_get_tier (const guint8 * profile_tier_level, guint len); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_h265_get_level (const guint8 * profile_tier_level, guint len); -GST_EXPORT +GST_PBUTILS_API guint8 gst_codec_utils_h265_get_level_idc (const gchar * level); -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_h265_caps_set_level_tier_and_profile (GstCaps * caps, const guint8 * profile_tier_level, guint len); /* MPEG-4 part 2 */ -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_mpeg4video_get_profile (const guint8 * vis_obj_seq, guint len); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_codec_utils_mpeg4video_get_level (const guint8 * vis_obj_seq, guint len); -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_mpeg4video_caps_set_level_and_profile (GstCaps * caps, const guint8 * vis_obj_seq, guint len); /* Opus */ -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_opus_parse_caps (GstCaps * caps, guint32 * rate, guint8 * channels, @@ -112,7 +113,7 @@ gboolean gst_codec_utils_opus_parse_caps (GstCaps * caps, guint8 * coupled_count, guint8 channel_mapping[256]); -GST_EXPORT +GST_PBUTILS_API GstCaps * gst_codec_utils_opus_create_caps (guint32 rate, guint8 channels, guint8 channel_mapping_family, @@ -120,10 +121,10 @@ GstCaps * gst_codec_utils_opus_create_caps (guint32 rate, guint8 coupled_count, const guint8 * channel_mapping); -GST_EXPORT +GST_PBUTILS_API GstCaps * gst_codec_utils_opus_create_caps_from_header (GstBuffer * header, GstBuffer * comments); -GST_EXPORT +GST_PBUTILS_API GstBuffer * gst_codec_utils_opus_create_header (guint32 rate, guint8 channels, guint8 channel_mapping_family, @@ -133,7 +134,7 @@ GstBuffer * gst_codec_utils_opus_create_header (guint32 rate, guint16 pre_skip, gint16 output_gain); -GST_EXPORT +GST_PBUTILS_API gboolean gst_codec_utils_opus_parse_header (GstBuffer * header, guint32 * rate, guint8 * channels, diff --git a/gst-libs/gst/pbutils/descriptions.h b/gst-libs/gst/pbutils/descriptions.h index 826667ab4c..c03f46abbe 100644 --- a/gst-libs/gst/pbutils/descriptions.h +++ b/gst-libs/gst/pbutils/descriptions.h @@ -22,6 +22,7 @@ #include #include +#include G_BEGIN_DECLS @@ -30,12 +31,12 @@ G_BEGIN_DECLS * from caps */ -GST_EXPORT +GST_PBUTILS_API gboolean gst_pb_utils_add_codec_description_to_tag_list (GstTagList * taglist, const gchar * codec_tag, const GstCaps * caps); -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_codec_description (const GstCaps * caps); /* @@ -43,19 +44,19 @@ gchar * gst_pb_utils_get_codec_description (const GstCaps * caps); * find descriptions of what exactly is missing */ -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_source_description (const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_sink_description (const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_decoder_description (const GstCaps * caps); -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_encoder_description (const GstCaps * caps); -GST_EXPORT +GST_PBUTILS_API gchar * gst_pb_utils_get_element_description (const gchar * factory_name); diff --git a/gst-libs/gst/pbutils/encoding-profile.h b/gst-libs/gst/pbutils/encoding-profile.h index c6d0205a6c..83a6298fc5 100644 --- a/gst-libs/gst/pbutils/encoding-profile.h +++ b/gst-libs/gst/pbutils/encoding-profile.h @@ -44,7 +44,7 @@ G_BEGIN_DECLS typedef struct _GstEncodingProfile GstEncodingProfile; typedef struct _GstEncodingProfileClass GstEncodingProfileClass; -GST_EXPORT +GST_PBUTILS_API GType gst_encoding_profile_get_type (void); @@ -63,7 +63,7 @@ GType gst_encoding_profile_get_type (void); typedef struct _GstEncodingContainerProfile GstEncodingContainerProfile; typedef struct _GstEncodingContainerProfileClass GstEncodingContainerProfileClass; -GST_EXPORT +GST_PBUTILS_API GType gst_encoding_container_profile_get_type (void); @@ -82,7 +82,7 @@ GType gst_encoding_container_profile_get_type (void); typedef struct _GstEncodingVideoProfile GstEncodingVideoProfile; typedef struct _GstEncodingVideoProfileClass GstEncodingVideoProfileClass; -GST_EXPORT +GST_PBUTILS_API GType gst_encoding_video_profile_get_type (void); @@ -101,7 +101,7 @@ GType gst_encoding_video_profile_get_type (void); typedef struct _GstEncodingAudioProfile GstEncodingAudioProfile; typedef struct _GstEncodingAudioProfileClass GstEncodingAudioProfileClass; -GST_EXPORT +GST_PBUTILS_API GType gst_encoding_audio_profile_get_type (void); @@ -124,101 +124,101 @@ GType gst_encoding_audio_profile_get_type (void); */ #define gst_encoding_profile_ref(profile) (g_object_ref ((GObject*) profile)) -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_name (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_name (GstEncodingProfile *profile, const gchar *name); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_description (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_description (GstEncodingProfile *profile, const gchar *description); -GST_EXPORT +GST_PBUTILS_API GstCaps * gst_encoding_profile_get_format (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_format (GstEncodingProfile *profile, GstCaps *format); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_profile_get_allow_dynamic_output (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_allow_dynamic_output (GstEncodingProfile *profile, gboolean allow_dynamic_output); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_preset (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_preset_name (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_preset (GstEncodingProfile *profile, const gchar *preset); -GST_EXPORT +GST_PBUTILS_API guint gst_encoding_profile_get_presence (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_presence (GstEncodingProfile *profile, guint presence); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_preset_name (GstEncodingProfile * profile, const gchar * preset_name); -GST_EXPORT +GST_PBUTILS_API GstCaps * gst_encoding_profile_get_restriction (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_restriction (GstEncodingProfile *profile, GstCaps *restriction); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_profile_is_equal (GstEncodingProfile *a, GstEncodingProfile *b); -GST_EXPORT +GST_PBUTILS_API GstCaps * gst_encoding_profile_get_input_caps (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_type_nick (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_profile_get_file_extension (GstEncodingProfile * profile); -GST_EXPORT +GST_PBUTILS_API GstEncodingProfile * gst_encoding_profile_find (const gchar *targetname, const gchar *profilename, const gchar *category); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_profile_is_enabled (GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_profile_set_enabled (GstEncodingProfile *profile, gboolean enabled); /* GstEncodingContainerProfile API */ -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_container_profile_add_profile (GstEncodingContainerProfile *container, GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_container_profile_contains_profile (GstEncodingContainerProfile * container, GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API const GList * gst_encoding_container_profile_get_profiles (GstEncodingContainerProfile *profile); -GST_EXPORT +GST_PBUTILS_API GstEncodingContainerProfile * gst_encoding_container_profile_new (const gchar *name, const gchar *description, GstCaps *format, @@ -227,36 +227,36 @@ GstEncodingContainerProfile * gst_encoding_container_profile_new (const gchar * /* Invidual stream encodingprofile API */ -GST_EXPORT +GST_PBUTILS_API GstEncodingVideoProfile * gst_encoding_video_profile_new (GstCaps *format, const gchar *preset, GstCaps *restriction, guint presence); -GST_EXPORT +GST_PBUTILS_API GstEncodingAudioProfile * gst_encoding_audio_profile_new (GstCaps *format, const gchar *preset, GstCaps *restriction, guint presence); -GST_EXPORT +GST_PBUTILS_API guint gst_encoding_video_profile_get_pass (GstEncodingVideoProfile *prof); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_video_profile_get_variableframerate (GstEncodingVideoProfile *prof); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_video_profile_set_pass (GstEncodingVideoProfile *prof, guint pass); -GST_EXPORT +GST_PBUTILS_API void gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfile *prof, gboolean variableframerate); -GST_EXPORT +GST_PBUTILS_API GstEncodingProfile * gst_encoding_profile_from_discoverer (GstDiscovererInfo *info); -GST_EXPORT +GST_PBUTILS_API GstEncodingProfile * gst_encoding_profile_copy (GstEncodingProfile *self); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/gst-libs/gst/pbutils/encoding-target.h b/gst-libs/gst/pbutils/encoding-target.h index 7c9a87dfa8..44dd101ba1 100644 --- a/gst-libs/gst/pbutils/encoding-target.h +++ b/gst-libs/gst/pbutils/encoding-target.h @@ -100,7 +100,7 @@ G_BEGIN_DECLS typedef struct _GstEncodingTarget GstEncodingTarget; typedef GObjectClass GstEncodingTargetClass; -GST_EXPORT +GST_PBUTILS_API GType gst_encoding_target_get_type (void); /** @@ -121,54 +121,54 @@ GType gst_encoding_target_get_type (void); #define gst_encoding_target_ref(target) \ (g_object_ref ((GObject*) target)) -GST_EXPORT +GST_PBUTILS_API GstEncodingTarget * gst_encoding_target_new (const gchar *name, const gchar *category, const gchar *description, const GList *profiles); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_target_get_name (GstEncodingTarget *target); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_target_get_category (GstEncodingTarget *target); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_encoding_target_get_description (GstEncodingTarget *target); -GST_EXPORT +GST_PBUTILS_API const GList * gst_encoding_target_get_profiles (GstEncodingTarget *target); -GST_EXPORT +GST_PBUTILS_API GstEncodingProfile * gst_encoding_target_get_profile (GstEncodingTarget *target, const gchar *name); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_target_add_profile (GstEncodingTarget *target, GstEncodingProfile *profile); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_target_save (GstEncodingTarget *target, GError **error); -GST_EXPORT +GST_PBUTILS_API gboolean gst_encoding_target_save_to_file (GstEncodingTarget *target, const gchar *filepath, GError **error); -GST_EXPORT +GST_PBUTILS_API GstEncodingTarget * gst_encoding_target_load (const gchar *name, const gchar *category, GError **error); -GST_EXPORT +GST_PBUTILS_API GstEncodingTarget * gst_encoding_target_load_from_file (const gchar *filepath, GError **error); -GST_EXPORT +GST_PBUTILS_API GList * gst_encoding_list_available_categories (void); -GST_EXPORT +GST_PBUTILS_API GList * gst_encoding_list_all_targets (const gchar * categoryname); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/gst-libs/gst/pbutils/gstaudiovisualizer.h b/gst-libs/gst/pbutils/gstaudiovisualizer.h index 4aad4dd776..05929ac420 100644 --- a/gst-libs/gst/pbutils/gstaudiovisualizer.h +++ b/gst-libs/gst/pbutils/gstaudiovisualizer.h @@ -29,6 +29,7 @@ #include #include #include +#include G_BEGIN_DECLS #define GST_TYPE_AUDIO_VISUALIZER (gst_audio_visualizer_get_type()) @@ -100,7 +101,7 @@ struct _GstAudioVisualizerClass gboolean (*decide_allocation) (GstAudioVisualizer * scope, GstQuery *query); }; -GST_EXPORT +GST_PBUTILS_API GType gst_audio_visualizer_get_type (void); G_END_DECLS diff --git a/gst-libs/gst/pbutils/gstdiscoverer.h b/gst-libs/gst/pbutils/gstdiscoverer.h index 2d3f8ae03c..b61d0ed9f6 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.h +++ b/gst-libs/gst/pbutils/gstdiscoverer.h @@ -22,6 +22,7 @@ #define _GST_DISCOVERER_H_ #include +#include G_BEGIN_DECLS @@ -34,7 +35,7 @@ G_BEGIN_DECLS typedef struct _GstDiscovererStreamInfo GstDiscovererStreamInfo; typedef GObjectClass GstDiscovererStreamInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_stream_info_get_type (void); /** @@ -59,28 +60,28 @@ GType gst_discoverer_stream_info_get_type (void); #define gst_discoverer_stream_info_ref(info) ((GstDiscovererStreamInfo*) g_object_ref((GObject*) info)) #define gst_discoverer_stream_info_unref(info) (g_object_unref((GObject*) info)) -GST_EXPORT +GST_PBUTILS_API GstDiscovererStreamInfo* gst_discoverer_stream_info_get_previous(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API GstDiscovererStreamInfo* gst_discoverer_stream_info_get_next(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API GstCaps* gst_discoverer_stream_info_get_caps(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstTagList* gst_discoverer_stream_info_get_tags(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstToc* gst_discoverer_stream_info_get_toc(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API const gchar* gst_discoverer_stream_info_get_stream_id(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstStructure* gst_discoverer_stream_info_get_misc(GstDiscovererStreamInfo* info); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_discoverer_stream_info_get_stream_type_nick(GstDiscovererStreamInfo* info); /** @@ -97,10 +98,10 @@ const gchar * gst_discoverer_stream_info_get_stream_type_nick(GstDisc typedef struct _GstDiscovererContainerInfo GstDiscovererContainerInfo; typedef GObjectClass GstDiscovererContainerInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_container_info_get_type (void); -GST_EXPORT +GST_PBUTILS_API GList *gst_discoverer_container_info_get_streams(GstDiscovererContainerInfo *info); @@ -118,28 +119,28 @@ GList *gst_discoverer_container_info_get_streams(GstDiscovererContainerInfo *inf typedef struct _GstDiscovererAudioInfo GstDiscovererAudioInfo; typedef GObjectClass GstDiscovererAudioInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_audio_info_get_type (void); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_audio_info_get_channels(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API guint64 gst_discoverer_audio_info_get_channel_mask(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_audio_info_get_sample_rate(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_audio_info_get_depth(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_audio_info_get_bitrate(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_audio_info_get_max_bitrate(const GstDiscovererAudioInfo* info); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_discoverer_audio_info_get_language(const GstDiscovererAudioInfo* info); /** @@ -156,40 +157,40 @@ const gchar * gst_discoverer_audio_info_get_language(const GstDiscovererAudioInf typedef struct _GstDiscovererVideoInfo GstDiscovererVideoInfo; typedef GObjectClass GstDiscovererVideoInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_video_info_get_type (void); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_width(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_height(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_depth(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_framerate_num(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_framerate_denom(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_par_num(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_par_denom(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API gboolean gst_discoverer_video_info_is_interlaced(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_bitrate(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API guint gst_discoverer_video_info_get_max_bitrate(const GstDiscovererVideoInfo* info); -GST_EXPORT +GST_PBUTILS_API gboolean gst_discoverer_video_info_is_image(const GstDiscovererVideoInfo* info); /** @@ -207,10 +208,10 @@ gboolean gst_discoverer_video_info_is_image(const GstDiscovererVideoInfo* typedef struct _GstDiscovererSubtitleInfo GstDiscovererSubtitleInfo; typedef GObjectClass GstDiscovererSubtitleInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_subtitle_info_get_type (void); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_discoverer_subtitle_info_get_language(const GstDiscovererSubtitleInfo* info); /** @@ -272,71 +273,71 @@ typedef struct _GstDiscovererInfo GstDiscovererInfo; (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DISCOVERER_INFO)) typedef GObjectClass GstDiscovererInfoClass; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_info_get_type (void); #define gst_discoverer_info_unref(info) (g_object_unref((GObject*)info)) #define gst_discoverer_info_ref(info) (g_object_ref((GObject*)info)) -GST_EXPORT +GST_PBUTILS_API GstDiscovererInfo* gst_discoverer_info_copy (GstDiscovererInfo * ptr); -GST_EXPORT +GST_PBUTILS_API const gchar* gst_discoverer_info_get_uri(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API GstDiscovererResult gst_discoverer_info_get_result(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API GstDiscovererStreamInfo* gst_discoverer_info_get_stream_info(GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API GList* gst_discoverer_info_get_stream_list(GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API GstClockTime gst_discoverer_info_get_duration(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API gboolean gst_discoverer_info_get_seekable(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API gboolean gst_discoverer_info_get_live(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstStructure* gst_discoverer_info_get_misc(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstTagList* gst_discoverer_info_get_tags(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API const GstToc* gst_discoverer_info_get_toc(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API const gchar** gst_discoverer_info_get_missing_elements_installer_details(const GstDiscovererInfo* info); -GST_EXPORT +GST_PBUTILS_API GList * gst_discoverer_info_get_streams (GstDiscovererInfo *info, GType streamtype); -GST_EXPORT +GST_PBUTILS_API GList * gst_discoverer_info_get_audio_streams (GstDiscovererInfo *info); -GST_EXPORT +GST_PBUTILS_API GList * gst_discoverer_info_get_video_streams (GstDiscovererInfo *info); -GST_EXPORT +GST_PBUTILS_API GList * gst_discoverer_info_get_subtitle_streams (GstDiscovererInfo *info); -GST_EXPORT +GST_PBUTILS_API GList * gst_discoverer_info_get_container_streams (GstDiscovererInfo *info); -GST_EXPORT +GST_PBUTILS_API GVariant * gst_discoverer_info_to_variant (GstDiscovererInfo *info, GstDiscovererSerializeFlags flags); -GST_EXPORT +GST_PBUTILS_API GstDiscovererInfo * gst_discoverer_info_from_variant (GVariant *variant); -GST_EXPORT +GST_PBUTILS_API void gst_discoverer_stream_info_list_free (GList *infos); #define GST_TYPE_DISCOVERER \ @@ -383,27 +384,27 @@ struct _GstDiscovererClass { gpointer _reserved[GST_PADDING]; }; -GST_EXPORT +GST_PBUTILS_API GType gst_discoverer_get_type (void); -GST_EXPORT +GST_PBUTILS_API GstDiscoverer *gst_discoverer_new (GstClockTime timeout, GError **err); /* Asynchronous API */ -GST_EXPORT +GST_PBUTILS_API void gst_discoverer_start (GstDiscoverer *discoverer); -GST_EXPORT +GST_PBUTILS_API void gst_discoverer_stop (GstDiscoverer *discoverer); -GST_EXPORT +GST_PBUTILS_API gboolean gst_discoverer_discover_uri_async (GstDiscoverer *discoverer, const gchar *uri); /* Synchronous API */ -GST_EXPORT +GST_PBUTILS_API GstDiscovererInfo * gst_discoverer_discover_uri (GstDiscoverer * discoverer, const gchar * uri, diff --git a/gst-libs/gst/pbutils/gstpluginsbaseversion.h.in b/gst-libs/gst/pbutils/gstpluginsbaseversion.h.in index 7b5012c850..e6f2720681 100644 --- a/gst-libs/gst/pbutils/gstpluginsbaseversion.h.in +++ b/gst-libs/gst/pbutils/gstpluginsbaseversion.h.in @@ -21,6 +21,7 @@ #define __GST_PLUGINS_BASE_VERSION_H__ #include +#include G_BEGIN_DECLS @@ -67,10 +68,10 @@ G_BEGIN_DECLS (GST_PLUGINS_BASE_VERSION_MAJOR == (major) && GST_PLUGINS_BASE_VERSION_MINOR == (minor) && \ GST_PLUGINS_BASE_VERSION_MICRO + 1 == (micro) && GST_PLUGINS_BASE_VERSION_NANO > 0)) -GST_EXPORT +GST_PBUTILS_API void gst_plugins_base_version (guint *major, guint *minor, guint *micro, guint *nano); -GST_EXPORT +GST_PBUTILS_API gchar * gst_plugins_base_version_string (void); G_END_DECLS diff --git a/gst-libs/gst/pbutils/install-plugins.h b/gst-libs/gst/pbutils/install-plugins.h index 98c1546661..5a84d01f4c 100644 --- a/gst-libs/gst/pbutils/install-plugins.h +++ b/gst-libs/gst/pbutils/install-plugins.h @@ -22,6 +22,7 @@ #define __GST_PB_UTILS_INSTALL_PLUGINS_H__ #include +#include G_BEGIN_DECLS @@ -97,31 +98,31 @@ typedef enum { typedef struct _GstInstallPluginsContext GstInstallPluginsContext; -GST_EXPORT +GST_PBUTILS_API GstInstallPluginsContext * gst_install_plugins_context_new (void); -GST_EXPORT +GST_PBUTILS_API GstInstallPluginsContext * gst_install_plugins_context_copy (GstInstallPluginsContext * ctx); -GST_EXPORT +GST_PBUTILS_API void gst_install_plugins_context_free (GstInstallPluginsContext * ctx); -GST_EXPORT +GST_PBUTILS_API void gst_install_plugins_context_set_confirm_search (GstInstallPluginsContext * ctx, gboolean confirm_search); -GST_EXPORT +GST_PBUTILS_API void gst_install_plugins_context_set_desktop_id (GstInstallPluginsContext * ctx, const gchar * desktop_id); -GST_EXPORT +GST_PBUTILS_API void gst_install_plugins_context_set_startup_notification_id (GstInstallPluginsContext * ctx, const gchar * startup_id); -GST_EXPORT +GST_PBUTILS_API void gst_install_plugins_context_set_xid (GstInstallPluginsContext * ctx, guint xid); -GST_EXPORT +GST_PBUTILS_API GType gst_install_plugins_context_get_type (void); /** @@ -136,23 +137,23 @@ GType gst_install_plugins_context_get_type (void); typedef void (*GstInstallPluginsResultFunc) (GstInstallPluginsReturn result, gpointer user_data); -GST_EXPORT +GST_PBUTILS_API GstInstallPluginsReturn gst_install_plugins_async (const gchar * const * details, GstInstallPluginsContext * ctx, GstInstallPluginsResultFunc func, gpointer user_data); -GST_EXPORT +GST_PBUTILS_API GstInstallPluginsReturn gst_install_plugins_sync (const gchar * const * details, GstInstallPluginsContext * ctx); -GST_EXPORT +GST_PBUTILS_API const gchar * gst_install_plugins_return_get_name (GstInstallPluginsReturn ret); -GST_EXPORT +GST_PBUTILS_API gboolean gst_install_plugins_installation_in_progress (void); -GST_EXPORT +GST_PBUTILS_API gboolean gst_install_plugins_supported (void); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build index d33990aae4..b56593ef64 100644 --- a/gst-libs/gst/pbutils/meson.build +++ b/gst-libs/gst/pbutils/meson.build @@ -24,6 +24,7 @@ gst_pbutils_version_h = configure_file(input : 'gstpluginsbaseversion.h.in', pbutils_headers = [ 'pbutils.h', + 'pbutils-prelude.h', 'codec-utils.h', 'descriptions.h', 'encoding-profile.h', diff --git a/gst-libs/gst/pbutils/missing-plugins.h b/gst-libs/gst/pbutils/missing-plugins.h index cee0d55da4..c1e6c42e88 100644 --- a/gst-libs/gst/pbutils/missing-plugins.h +++ b/gst-libs/gst/pbutils/missing-plugins.h @@ -21,6 +21,7 @@ #define __GST_PB_UTILS_MISSING_PLUGINS_H__ #include +#include G_BEGIN_DECLS @@ -28,23 +29,23 @@ G_BEGIN_DECLS * functions to create missing-plugin messages, for use by plugins primarily */ -GST_EXPORT +GST_PBUTILS_API GstMessage * gst_missing_uri_source_message_new (GstElement * element, const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API GstMessage * gst_missing_uri_sink_message_new (GstElement * element, const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API GstMessage * gst_missing_element_message_new (GstElement * element, const gchar * factory_name); -GST_EXPORT +GST_PBUTILS_API GstMessage * gst_missing_decoder_message_new (GstElement * element, const GstCaps * decode_caps); -GST_EXPORT +GST_PBUTILS_API GstMessage * gst_missing_encoder_message_new (GstElement * element, const GstCaps * encode_caps); @@ -52,13 +53,13 @@ GstMessage * gst_missing_encoder_message_new (GstElement * element, * functions for use by applications when dealing with missing-plugin messages */ -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_plugin_message_get_installer_detail (GstMessage * msg); -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_plugin_message_get_description (GstMessage * msg); -GST_EXPORT +GST_PBUTILS_API gboolean gst_is_missing_plugin_message (GstMessage * msg); @@ -68,19 +69,19 @@ gboolean gst_is_missing_plugin_message (GstMessage * msg); * missing-plugin messages posted by elements such as playbin or decodebin */ -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_uri_source_installer_detail_new (const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_uri_sink_installer_detail_new (const gchar * protocol); -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_element_installer_detail_new (const gchar * factory_name); -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_decoder_installer_detail_new (const GstCaps * decode_caps); -GST_EXPORT +GST_PBUTILS_API gchar * gst_missing_encoder_installer_detail_new (const GstCaps * encode_caps); G_END_DECLS diff --git a/gst-libs/gst/pbutils/pbutils-prelude.h b/gst-libs/gst/pbutils/pbutils-prelude.h new file mode 100644 index 0000000000..cb1c79d588 --- /dev/null +++ b/gst-libs/gst/pbutils/pbutils-prelude.h @@ -0,0 +1,31 @@ +/* GStreamer Plugins Base Utils Library + * Copyright (C) 2018 GStreamer developers + * + * pbutils-prelude.h: prelude include header for gst-pbutils 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_PBUTILS_PRELUDE_H__ +#define __GST_PBUTILS_PRELUDE_H__ + +#include + +#ifndef GST_PBUTILS_API +#define GST_PBUTILS_API GST_EXPORT +#endif + +#endif /* __GST_PBUTILS_PRELUDE_H__ */ diff --git a/gst-libs/gst/pbutils/pbutils.h b/gst-libs/gst/pbutils/pbutils.h index 99bdf98847..4e5f61c544 100644 --- a/gst-libs/gst/pbutils/pbutils.h +++ b/gst-libs/gst/pbutils/pbutils.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS -GST_EXPORT +GST_PBUTILS_API void gst_pb_utils_init (void); G_END_DECLS diff --git a/gst-libs/gst/pbutils/pbutils_mkenum.py b/gst-libs/gst/pbutils/pbutils_mkenum.py index d03b915b79..143a76c1eb 100755 --- a/gst-libs/gst/pbutils/pbutils_mkenum.py +++ b/gst-libs/gst/pbutils/pbutils_mkenum.py @@ -8,11 +8,11 @@ import sys, os, shutil, subprocess h_array = ['--fhead', - "#ifndef __PB_UTILS_ENUM_TYPES_H__\n#define __PB_UTILS_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n", + "#ifndef __PB_UTILS_ENUM_TYPES_H__\n#define __PB_UTILS_ENUM_TYPES_H__\n\n#include \n#include \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_PBUTILS_API GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n", '--ftail', "G_END_DECLS\n\n#endif /* __PB_UTILS_ENUM_TYPES_H__ */" ]