app: add win32 .def file and only export functions we want exported

Add a .def file for win32 builds (and make check-exports).
Fix LDFLAGS in Makefile.am, so the usual export regexps are used (fixes #573165).
Make sure private marshaller functions aren't exported by prefixing them with __gst;
also rename gst_app_marshal_OBJECT__VOID to _BUFFER__VOID, make it static and add
a comment why we're not using glib-genmarshal for this one.
This commit is contained in:
Tim-Philipp Müller 2009-02-25 19:40:43 +00:00
parent 9899c1d5ce
commit 07d2dbfdfe
4 changed files with 44 additions and 13 deletions

View File

@ -1,7 +1,7 @@
lib_LTLIBRARIES = libgstapp-@GST_MAJORMINOR@.la lib_LTLIBRARIES = libgstapp-@GST_MAJORMINOR@.la
glib_enum_define = GST_APP glib_enum_define = GST_APP
glib_enum_prefix = gst_app glib_enum_prefix = __gst_app
include $(top_srcdir)/common/glib-gen.mak include $(top_srcdir)/common/glib-gen.mak
@ -17,7 +17,7 @@ libgstapp_@GST_MAJORMINOR@_la_SOURCES = gstappsrc.c gstappbuffer.c gstappsink.c
libgstapp_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ libgstapp_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
libgstapp_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) libgstapp_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS)
libgstapp_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_ALL_LDFLAGS) libgstapp_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
libgstapp_@GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=disable-static libgstapp_@GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=disable-static
libgstapp_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/app libgstapp_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/app

View File

@ -171,16 +171,18 @@ static guint gst_app_sink_signals[LAST_SIGNAL] = { 0 };
GST_BOILERPLATE (GstAppSink, gst_app_sink, GstBaseSink, GST_TYPE_BASE_SINK); GST_BOILERPLATE (GstAppSink, gst_app_sink, GstBaseSink, GST_TYPE_BASE_SINK);
void /* Can't use glib-genmarshal for this, as it doesn't know how to handle
gst_app_marshal_OBJECT__VOID (GClosure * closure, * GstMiniObject-based types, which are a new fundamental type */
static void
gst_app_marshal_BUFFER__VOID (GClosure * closure,
GValue * return_value, GValue * return_value,
guint n_param_values, guint n_param_values,
const GValue * param_values, const GValue * param_values,
gpointer invocation_hint, gpointer marshal_data) gpointer invocation_hint, gpointer marshal_data)
{ {
typedef GstBuffer *(*GMarshalFunc_OBJECT__VOID) (gpointer data1, typedef GstBuffer *(*GMarshalFunc_BUFFER__VOID) (gpointer data1,
gpointer data2); gpointer data2);
register GMarshalFunc_OBJECT__VOID callback; register GMarshalFunc_BUFFER__VOID callback;
register GCClosure *cc = (GCClosure *) closure; register GCClosure *cc = (GCClosure *) closure;
register gpointer data1, data2; register gpointer data1, data2;
GstBuffer *v_return; GstBuffer *v_return;
@ -196,7 +198,7 @@ gst_app_marshal_OBJECT__VOID (GClosure * closure,
data2 = closure->data; data2 = closure->data;
} }
callback = callback =
(GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback); (GMarshalFunc_BUFFER__VOID) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1, data2); v_return = callback (data1, data2);
@ -334,7 +336,7 @@ gst_app_sink_class_init (GstAppSinkClass * klass)
gst_app_sink_signals[SIGNAL_PULL_PREROLL] = gst_app_sink_signals[SIGNAL_PULL_PREROLL] =
g_signal_new ("pull-preroll", G_TYPE_FROM_CLASS (klass), g_signal_new ("pull-preroll", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass,
pull_preroll), NULL, NULL, gst_app_marshal_OBJECT__VOID, pull_preroll), NULL, NULL, gst_app_marshal_BUFFER__VOID,
GST_TYPE_BUFFER, 0, G_TYPE_NONE); GST_TYPE_BUFFER, 0, G_TYPE_NONE);
/** /**
* GstAppSink::pull-buffer: * GstAppSink::pull-buffer:
@ -360,7 +362,7 @@ gst_app_sink_class_init (GstAppSinkClass * klass)
gst_app_sink_signals[SIGNAL_PULL_BUFFER] = gst_app_sink_signals[SIGNAL_PULL_BUFFER] =
g_signal_new ("pull-buffer", G_TYPE_FROM_CLASS (klass), g_signal_new ("pull-buffer", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSinkClass,
pull_buffer), NULL, NULL, gst_app_marshal_OBJECT__VOID, pull_buffer), NULL, NULL, gst_app_marshal_BUFFER__VOID,
GST_TYPE_BUFFER, 0, G_TYPE_NONE); GST_TYPE_BUFFER, 0, G_TYPE_NONE);
basesink_class->unlock = gst_app_sink_unlock_start; basesink_class->unlock = gst_app_sink_unlock_start;

View File

@ -393,7 +393,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
gst_app_src_signals[SIGNAL_NEED_DATA] = gst_app_src_signals[SIGNAL_NEED_DATA] =
g_signal_new ("need-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("need-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstAppSrcClass, need_data), G_STRUCT_OFFSET (GstAppSrcClass, need_data),
NULL, NULL, gst_app_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); NULL, NULL, __gst_app_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
/** /**
* GstAppSrc::enough-data: * GstAppSrc::enough-data:
@ -422,7 +422,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
gst_app_src_signals[SIGNAL_SEEK_DATA] = gst_app_src_signals[SIGNAL_SEEK_DATA] =
g_signal_new ("seek-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("seek-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstAppSrcClass, seek_data), G_STRUCT_OFFSET (GstAppSrcClass, seek_data),
NULL, NULL, gst_app_marshal_BOOLEAN__UINT64, G_TYPE_BOOLEAN, 1, NULL, NULL, __gst_app_marshal_BOOLEAN__UINT64, G_TYPE_BOOLEAN, 1,
G_TYPE_UINT64); G_TYPE_UINT64);
/** /**
@ -440,7 +440,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
gst_app_src_signals[SIGNAL_PUSH_BUFFER] = gst_app_src_signals[SIGNAL_PUSH_BUFFER] =
g_signal_new ("push-buffer", G_TYPE_FROM_CLASS (klass), g_signal_new ("push-buffer", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSrcClass, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSrcClass,
push_buffer), NULL, NULL, gst_app_marshal_ENUM__OBJECT, push_buffer), NULL, NULL, __gst_app_marshal_ENUM__OBJECT,
GST_TYPE_FLOW_RETURN, 1, GST_TYPE_BUFFER); GST_TYPE_FLOW_RETURN, 1, GST_TYPE_BUFFER);
/** /**
@ -452,7 +452,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
gst_app_src_signals[SIGNAL_END_OF_STREAM] = gst_app_src_signals[SIGNAL_END_OF_STREAM] =
g_signal_new ("end-of-stream", G_TYPE_FROM_CLASS (klass), g_signal_new ("end-of-stream", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSrcClass, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstAppSrcClass,
end_of_stream), NULL, NULL, gst_app_marshal_ENUM__VOID, end_of_stream), NULL, NULL, __gst_app_marshal_ENUM__VOID,
GST_TYPE_FLOW_RETURN, 0, G_TYPE_NONE); GST_TYPE_FLOW_RETURN, 0, G_TYPE_NONE);
basesrc_class->create = gst_app_src_create; basesrc_class->create = gst_app_src_create;
@ -1358,6 +1358,7 @@ gst_app_src_uri_get_protocols (void)
return protocols; return protocols;
} }
static const gchar * static const gchar *
gst_app_src_uri_get_uri (GstURIHandler * handler) gst_app_src_uri_get_uri (GstURIHandler * handler)
{ {

View File

@ -0,0 +1,28 @@
EXPORTS
gst_app_buffer_get_type
gst_app_buffer_new
gst_app_sink_get_caps
gst_app_sink_get_drop
gst_app_sink_get_emit_signals
gst_app_sink_get_max_buffers
gst_app_sink_get_type
gst_app_sink_is_eos
gst_app_sink_pull_buffer
gst_app_sink_pull_preroll
gst_app_sink_set_caps
gst_app_sink_set_drop
gst_app_sink_set_emit_signals
gst_app_sink_set_max_buffers
gst_app_src_end_of_stream
gst_app_src_get_caps
gst_app_src_get_latency
gst_app_src_get_max_bytes
gst_app_src_get_size
gst_app_src_get_stream_type
gst_app_src_get_type
gst_app_src_push_buffer
gst_app_src_set_caps
gst_app_src_set_latency
gst_app_src_set_max_bytes
gst_app_src_set_size
gst_app_src_set_stream_type