mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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.
This commit is contained in:
parent
7f8933c918
commit
661f2da6e0
3 changed files with 4 additions and 5 deletions
|
@ -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 {
|
||||||
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)
|
||||||
|
|
||||||
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)
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue