summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/tag/Makefile.am5
-rw-r--r--gst-libs/gst/tag/gsttagdemux.h2
-rw-r--r--gst-libs/gst/tag/gsttagmux.h3
-rw-r--r--gst-libs/gst/tag/id3v2.h1
-rw-r--r--gst-libs/gst/tag/meson.build1
-rw-r--r--gst-libs/gst/tag/tag-prelude.h31
-rw-r--r--gst-libs/gst/tag/tag.h81
-rwxr-xr-xgst-libs/gst/tag/tag_mkenum.py4
-rw-r--r--gst-libs/gst/tag/xmpwriter.h15
9 files changed, 90 insertions, 53 deletions
diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index 67958b6b9..0247c33f6 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
@@ -4,7 +4,8 @@ libgsttagincludedir = \
glib_enum_define = GST_TAG
glib_gen_prefix = gst_tag
glib_gen_basename = tag
-glib_gen_decl_banner=GST_EXPORT
+glib_gen_decl_banner=GST_TAG_API
+glib_gen_decl_include=\#include <gst/tag/tag-prelude.h>
glib_enum_headers = tag.h gsttagdemux.h
@@ -15,7 +16,7 @@ BUILT_SOURCES = $(built_sources) $(built_headers)
include $(top_srcdir)/common/gst-glib-gen.mak
libgsttaginclude_HEADERS = \
- tag.h gsttagdemux.h gsttagmux.h xmpwriter.h
+ tag.h tag-prelude.h gsttagdemux.h gsttagmux.h xmpwriter.h
nodist_libgsttaginclude_HEADERS = tag-enumtypes.h
CLEANFILES = $(BUILT_SOURCES)
diff --git a/gst-libs/gst/tag/gsttagdemux.h b/gst-libs/gst/tag/gsttagdemux.h
index 9c14ff00e..f793832d7 100644
--- a/gst-libs/gst/tag/gsttagdemux.h
+++ b/gst-libs/gst/tag/gsttagdemux.h
@@ -128,7 +128,7 @@ struct _GstTagDemuxClass
gpointer reserved[GST_PADDING];
};
-GST_EXPORT
+GST_TAG_API
GType gst_tag_demux_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
diff --git a/gst-libs/gst/tag/gsttagmux.h b/gst-libs/gst/tag/gsttagmux.h
index a1c3143e0..82f503efe 100644
--- a/gst-libs/gst/tag/gsttagmux.h
+++ b/gst-libs/gst/tag/gsttagmux.h
@@ -23,6 +23,7 @@
#define GST_TAG_MUX_H
#include <gst/gst.h>
+#include <gst/tag/tag-prelude.h>
G_BEGIN_DECLS
@@ -78,7 +79,7 @@ struct _GstTagMuxClass {
gpointer _gst_reserved[GST_PADDING];
};
-GST_EXPORT
+GST_TAG_API
GType gst_tag_mux_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
diff --git a/gst-libs/gst/tag/id3v2.h b/gst-libs/gst/tag/id3v2.h
index 3280ed99e..07cdf583f 100644
--- a/gst-libs/gst/tag/id3v2.h
+++ b/gst-libs/gst/tag/id3v2.h
@@ -20,6 +20,7 @@
#define __ID3TAGS_H__
#include <gst/gst.h>
+#include <gst/tag/tag-prelude.h>
G_BEGIN_DECLS
diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build
index c30eb8eb4..53c928d5e 100644
--- a/gst-libs/gst/tag/meson.build
+++ b/gst-libs/gst/tag/meson.build
@@ -22,6 +22,7 @@ tag_mkenum_headers = [
tag_headers = tag_mkenum_headers + [
'gsttagmux.h',
'xmpwriter.h',
+ 'tag-prelude.h',
]
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
diff --git a/gst-libs/gst/tag/tag-prelude.h b/gst-libs/gst/tag/tag-prelude.h
new file mode 100644
index 000000000..249683fcd
--- /dev/null
+++ b/gst-libs/gst/tag/tag-prelude.h
@@ -0,0 +1,31 @@
+/* GStreamer Tag Library
+ * Copyright (C) 2018 GStreamer developers
+ *
+ * tag-prelude.h: prelude include header for gst-tag 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_TAG_PRELUDE_H__
+#define __GST_TAG_PRELUDE_H__
+
+#include <gst/gst.h>
+
+#ifndef GST_TAG_API
+#define GST_TAG_API GST_EXPORT
+#endif
+
+#endif /* __GST_TAG_PRELUDE_H__ */
diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h
index b8343fe4b..1e2eec4ea 100644
--- a/gst-libs/gst/tag/tag.h
+++ b/gst-libs/gst/tag/tag.h
@@ -23,6 +23,7 @@
#define __GST_TAG_TAG_H__
#include <gst/gst.h>
+#include <gst/tag/tag-prelude.h>
#include <gst/tag/gsttagdemux.h>
#include <gst/tag/gsttagmux.h>
#include <gst/tag/xmpwriter.h>
@@ -423,37 +424,37 @@ typedef enum {
/* functions for vorbis comment manipulation */
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_from_vorbis_tag (const gchar * vorbis_tag);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_to_vorbis_tag (const gchar * gst_tag);
-GST_EXPORT
+GST_TAG_API
void gst_vorbis_tag_add (GstTagList * list,
const gchar * tag,
const gchar * value);
-GST_EXPORT
+GST_TAG_API
GList * gst_tag_to_vorbis_comments (const GstTagList * list,
const gchar * tag);
/* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_vorbiscomment (const guint8 * data,
gsize size,
const guint8 * id_data,
const guint id_data_length,
gchar ** vendor_string);
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_vorbiscomment_buffer (GstBuffer * buffer,
const guint8 * id_data,
const guint id_data_length,
gchar ** vendor_string);
-GST_EXPORT
+GST_TAG_API
GstBuffer * gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list,
const guint8 * id_data,
const guint id_data_length,
@@ -465,112 +466,112 @@ GstBuffer * gst_tag_list_to_vorbiscomment_buffer (const GstTagLis
* gst_tag_list_from_id3v2_tag(). Also, note gst.tag.list_xyz() namespace vs. gst.tag_list_xyz(),
* which is a bit confusing and possibly doesn't map too well */
-GST_EXPORT
+GST_TAG_API
guint gst_tag_id3_genre_count (void);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_id3_genre_get (const guint id);
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_new_from_id3v1 (const guint8 * data);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_from_id3_tag (const gchar * id3_tag);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_from_id3_user_tag (const gchar * type,
const gchar * id3_user_tag);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_to_id3_tag (const gchar * gst_tag);
-GST_EXPORT
+GST_TAG_API
gboolean gst_tag_list_add_id3_image (GstTagList * tag_list,
const guint8 * image_data,
guint image_data_len,
guint id3_picture_type);
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_id3v2_tag (GstBuffer * buffer);
-GST_EXPORT
+GST_TAG_API
guint gst_tag_get_id3v2_tag_size (GstBuffer * buffer);
/* functions to convert GstBuffers with xmp packets contents to GstTagLists and back */
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_xmp_buffer (GstBuffer * buffer);
-GST_EXPORT
+GST_TAG_API
GstBuffer * gst_tag_list_to_xmp_buffer (const GstTagList * list,
gboolean read_only,
const gchar ** schemas);
-GST_EXPORT
+GST_TAG_API
const gchar** gst_tag_xmp_list_schemas (void);
/* functions related to exif */
-GST_EXPORT
+GST_TAG_API
GstBuffer * gst_tag_list_to_exif_buffer (const GstTagList * taglist,
gint byte_order,
guint32 base_offset);
-GST_EXPORT
+GST_TAG_API
GstBuffer * gst_tag_list_to_exif_buffer_with_tiff_header (const GstTagList * taglist);
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_exif_buffer (GstBuffer * buffer,
gint byte_order,
guint32 base_offset);
-GST_EXPORT
+GST_TAG_API
GstTagList * gst_tag_list_from_exif_buffer_with_tiff_header (
GstBuffer * buffer);
/* other tag-related functions */
-GST_EXPORT
+GST_TAG_API
gboolean gst_tag_parse_extended_comment (const gchar * ext_comment,
gchar ** key,
gchar ** lang,
gchar ** value,
gboolean fail_if_no_key);
-GST_EXPORT
+GST_TAG_API
gchar * gst_tag_freeform_string_to_utf8 (const gchar * data,
gint size,
const gchar ** env_vars);
-GST_EXPORT
+GST_TAG_API
GstSample * gst_tag_image_data_to_image_sample (const guint8 * image_data,
guint image_data_len,
GstTagImageType image_type);
/* FIXME 0.11: get rid of this awkward register/init function, see tags.c */
-GST_EXPORT
+GST_TAG_API
void gst_tag_register_musicbrainz_tags (void);
/* language tag related functions */
-GST_EXPORT
+GST_TAG_API
gchar ** gst_tag_get_language_codes (void);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_language_name (const gchar * language_code);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_language_code_iso_639_1 (const gchar * lang_code);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_language_code_iso_639_2B (const gchar * lang_code);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_language_code_iso_639_2T (const gchar * lang_code);
-GST_EXPORT
+GST_TAG_API
gboolean gst_tag_check_language_code (const gchar * lang_code);
/**
@@ -642,25 +643,25 @@ typedef enum {
GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE = (1 << 25)
} GstTagLicenseFlags;
-GST_EXPORT
+GST_TAG_API
gchar ** gst_tag_get_licenses (void);
-GST_EXPORT
+GST_TAG_API
GstTagLicenseFlags gst_tag_get_license_flags (const gchar * license_ref);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_license_nick (const gchar * license_ref);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_license_title (const gchar * license_ref);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_license_version (const gchar * license_ref);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_license_description (const gchar * license_ref);
-GST_EXPORT
+GST_TAG_API
const gchar * gst_tag_get_license_jurisdiction (const gchar * license_ref);
G_END_DECLS
diff --git a/gst-libs/gst/tag/tag_mkenum.py b/gst-libs/gst/tag/tag_mkenum.py
index 258b58b85..fb57cd1ed 100755
--- a/gst-libs/gst/tag/tag_mkenum.py
+++ b/gst-libs/gst/tag/tag_mkenum.py
@@ -8,11 +8,11 @@
import sys, os, shutil, subprocess
h_array = ['--fhead',
- "#ifndef __GST_TAG_ENUM_TYPES_H__\n#define __GST_TAG_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n\nG_BEGIN_DECLS\n",
+ "#ifndef __GST_TAG_ENUM_TYPES_H__\n#define __GST_TAG_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n#include <gst/tag/tag-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_TAG_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_TAG_ENUM_TYPES_H__ */',
]
diff --git a/gst-libs/gst/tag/xmpwriter.h b/gst-libs/gst/tag/xmpwriter.h
index 85f85bfc3..e8418514a 100644
--- a/gst-libs/gst/tag/xmpwriter.h
+++ b/gst-libs/gst/tag/xmpwriter.h
@@ -21,6 +21,7 @@
#define __TAG_XMP_WRITER_H__
#include <gst/gst.h>
+#include <gst/tag/tag-prelude.h>
G_BEGIN_DECLS
@@ -40,28 +41,28 @@ struct _GstTagXmpWriterInterface {
GTypeInterface parent;
};
-GST_EXPORT
+GST_TAG_API
GType gst_tag_xmp_writer_get_type (void);
-GST_EXPORT
+GST_TAG_API
void gst_tag_xmp_writer_add_all_schemas (GstTagXmpWriter * config);
-GST_EXPORT
+GST_TAG_API
void gst_tag_xmp_writer_add_schema (GstTagXmpWriter * config,
const gchar * schema);
-GST_EXPORT
+GST_TAG_API
gboolean gst_tag_xmp_writer_has_schema (GstTagXmpWriter * config,
const gchar * schema);
-GST_EXPORT
+GST_TAG_API
void gst_tag_xmp_writer_remove_schema (GstTagXmpWriter * config,
const gchar * schema);
-GST_EXPORT
+GST_TAG_API
void gst_tag_xmp_writer_remove_all_schemas (GstTagXmpWriter * config);
-GST_EXPORT
+GST_TAG_API
GstBuffer* gst_tag_xmp_writer_tag_list_to_xmp_buffer (GstTagXmpWriter * config,
const GstTagList * taglist,
gboolean read_only);