Commit 661f2da6 authored by Wim Taymans's avatar Wim Taymans
Browse files

Appsink: add padding for callbacks + docs

Add some padding to the callbacks structure just to be safe.

Remove the now invisible marshaller methods from the docs.

Fix a comment in the unit test.
parent 7f8933c9
...@@ -37,10 +37,6 @@ GstAppBufferClass ...@@ -37,10 +37,6 @@ GstAppBufferClass
GstAppBufferFinalizeFunc GstAppBufferFinalizeFunc
gst_app_buffer_get_type gst_app_buffer_get_type
gst_app_buffer_new gst_app_buffer_new
gst_app_marshal_BOOLEAN__UINT64
gst_app_marshal_ENUM__OBJECT
gst_app_marshal_ENUM__VOID
gst_app_marshal_VOID__UINT
</SECTION> </SECTION>
<SECTION> <SECTION>
......
...@@ -64,6 +64,9 @@ typedef struct { ...@@ -64,6 +64,9 @@ typedef struct {
void (*eos) (GstAppSink *sink, gpointer user_data); void (*eos) (GstAppSink *sink, gpointer user_data);
void (*new_preroll) (GstAppSink *sink, gpointer user_data); void (*new_preroll) (GstAppSink *sink, gpointer user_data);
void (*new_buffer) (GstAppSink *sink, gpointer user_data); void (*new_buffer) (GstAppSink *sink, gpointer user_data);
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
} GstAppSinkCallbacks; } GstAppSinkCallbacks;
struct _GstAppSink struct _GstAppSink
......
...@@ -185,6 +185,7 @@ GST_START_TEST (test_notify1) ...@@ -185,6 +185,7 @@ GST_START_TEST (test_notify1)
gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks, gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks,
&testdata, (*notify_function)); &testdata, (*notify_function));
/* Setting new callbacks should trigger the destroy of the old data */
gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks, &testdata, NULL); gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks, &testdata, NULL);
testdata = operate_on_data (testdata); testdata = operate_on_data (testdata);
...@@ -193,7 +194,6 @@ GST_START_TEST (test_notify1) ...@@ -193,7 +194,6 @@ GST_START_TEST (test_notify1)
fail_unless (testdata == global_testdata); fail_unless (testdata == global_testdata);
GST_DEBUG ("cleaning up appsink"); GST_DEBUG ("cleaning up appsink");
/* Destroying sink should call our notify_function */
gst_object_unref (sink); gst_object_unref (sink);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment