From 661f2da6e00d0b6b3653f5e35bce0daa9b55df5a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 26 Feb 2009 11:42:44 +0100 Subject: [PATCH] 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. --- docs/libs/gst-plugins-base-libs-sections.txt | 4 ---- gst-libs/gst/app/gstappsink.h | 3 +++ tests/check/elements/appsink.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index 83b1474cc8..4b47ee4039 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -37,10 +37,6 @@ GstAppBufferClass GstAppBufferFinalizeFunc gst_app_buffer_get_type gst_app_buffer_new -gst_app_marshal_BOOLEAN__UINT64 -gst_app_marshal_ENUM__OBJECT -gst_app_marshal_ENUM__VOID -gst_app_marshal_VOID__UINT
diff --git a/gst-libs/gst/app/gstappsink.h b/gst-libs/gst/app/gstappsink.h index 6c3acc0a4a..e35edcdef6 100644 --- a/gst-libs/gst/app/gstappsink.h +++ b/gst-libs/gst/app/gstappsink.h @@ -64,6 +64,9 @@ typedef struct { void (*eos) (GstAppSink *sink, gpointer user_data); void (*new_preroll) (GstAppSink *sink, gpointer user_data); void (*new_buffer) (GstAppSink *sink, gpointer user_data); + + /*< private >*/ + gpointer _gst_reserved[GST_PADDING]; } GstAppSinkCallbacks; struct _GstAppSink diff --git a/tests/check/elements/appsink.c b/tests/check/elements/appsink.c index 7067f15a4f..59bbc58855 100644 --- a/tests/check/elements/appsink.c +++ b/tests/check/elements/appsink.c @@ -185,6 +185,7 @@ GST_START_TEST (test_notify1) gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks, &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); testdata = operate_on_data (testdata); @@ -193,7 +194,6 @@ GST_START_TEST (test_notify1) fail_unless (testdata == global_testdata); GST_DEBUG ("cleaning up appsink"); - /* Destroying sink should call our notify_function */ gst_object_unref (sink); }