app: add win32 .def file and only export functions we want exported
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 25 Feb 2009 19:40:43 +0000 (19:40 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 25 Feb 2009 19:50:00 +0000 (19:50 +0000)
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.

gst-libs/gst/app/Makefile.am
gst-libs/gst/app/gstappsink.c
gst-libs/gst/app/gstappsrc.c
win32/common/libgstapp.def [new file with mode: 0644]

index bb4686d..9a8ca61 100644 (file)
@@ -1,7 +1,7 @@
 lib_LTLIBRARIES = libgstapp-@GST_MAJORMINOR@.la
 
 glib_enum_define = GST_APP
-glib_enum_prefix = gst_app
+glib_enum_prefix = __gst_app
 
 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) \
        $(GST_PLUGINS_BASE_CFLAGS)
 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@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/app
index 0b1f7d5..183c7f0 100644 (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);
 
-void
-gst_app_marshal_OBJECT__VOID (GClosure * closure,
+/* Can't use glib-genmarshal for this, as it doesn't know how to handle
+ * GstMiniObject-based types, which are a new fundamental type */
+static void
+gst_app_marshal_BUFFER__VOID (GClosure * closure,
     GValue * return_value,
     guint n_param_values,
     const GValue * param_values,
     gpointer invocation_hint, gpointer marshal_data)
 {
-  typedef GstBuffer *(*GMarshalFunc_OBJECT__VOID) (gpointer data1,
+  typedef GstBuffer *(*GMarshalFunc_BUFFER__VOID) (gpointer data1,
       gpointer data2);
-  register GMarshalFunc_OBJECT__VOID callback;
+  register GMarshalFunc_BUFFER__VOID callback;
   register GCClosure *cc = (GCClosure *) closure;
   register gpointer data1, data2;
   GstBuffer *v_return;
@@ -196,7 +198,7 @@ gst_app_marshal_OBJECT__VOID (GClosure * closure,
     data2 = closure->data;
   }
   callback =
-      (GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback);
+      (GMarshalFunc_BUFFER__VOID) (marshal_data ? marshal_data : cc->callback);
 
   v_return = callback (data1, data2);
 
@@ -334,7 +336,7 @@ gst_app_sink_class_init (GstAppSinkClass * klass)
   gst_app_sink_signals[SIGNAL_PULL_PREROLL] =
       g_signal_new ("pull-preroll", G_TYPE_FROM_CLASS (klass),
       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);
   /**
    * GstAppSink::pull-buffer:
@@ -360,7 +362,7 @@ gst_app_sink_class_init (GstAppSinkClass * klass)
   gst_app_sink_signals[SIGNAL_PULL_BUFFER] =
       g_signal_new ("pull-buffer", G_TYPE_FROM_CLASS (klass),
       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);
 
   basesink_class->unlock = gst_app_sink_unlock_start;
index 52b0b87..69b37e6 100644 (file)
@@ -393,7 +393,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
   gst_app_src_signals[SIGNAL_NEED_DATA] =
       g_signal_new ("need-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
       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:
@@ -422,7 +422,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
   gst_app_src_signals[SIGNAL_SEEK_DATA] =
       g_signal_new ("seek-data", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
       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);
 
    /**
@@ -440,7 +440,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
   gst_app_src_signals[SIGNAL_PUSH_BUFFER] =
       g_signal_new ("push-buffer", G_TYPE_FROM_CLASS (klass),
       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);
 
    /**
@@ -452,7 +452,7 @@ gst_app_src_class_init (GstAppSrcClass * klass)
   gst_app_src_signals[SIGNAL_END_OF_STREAM] =
       g_signal_new ("end-of-stream", G_TYPE_FROM_CLASS (klass),
       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);
 
   basesrc_class->create = gst_app_src_create;
@@ -1358,6 +1358,7 @@ gst_app_src_uri_get_protocols (void)
 
   return protocols;
 }
+
 static const gchar *
 gst_app_src_uri_get_uri (GstURIHandler * handler)
 {
diff --git a/win32/common/libgstapp.def b/win32/common/libgstapp.def
new file mode 100644 (file)
index 0000000..3626493
--- /dev/null
@@ -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