diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-04-06 14:19:28 +0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2023-04-06 15:21:35 +0000 |
commit | 8ed0b03c780c407750234df9bd875c8348892efd (patch) | |
tree | 6217fbd04a39bac42ec9375804282dee3f669947 /subprojects/gst-plugins-base | |
parent | f3ab697d2a8e9d0180ad0c4f8f5e127d6e3b2234 (diff) | |
download | gstreamer-8ed0b03c780c407750234df9bd875c8348892efd.tar.gz |
appsink: Use a class handler callback instead of vfunc for `propose-allocation`
There would otherwise be no padding left in the class struct anymore and
we might need it for something else in the future.
A class handler callback can be overridden by subclasses via
`g_signal_override_class_handler()` and chained up via
`g_signal_chain_from_overridden_handler()`.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2422
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4356>
Diffstat (limited to 'subprojects/gst-plugins-base')
-rw-r--r-- | subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c | 7 | ||||
-rw-r--r-- | subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.h | 10 |
2 files changed, 4 insertions, 13 deletions
diff --git a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c index bea0278cce..3986798fb0 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c @@ -351,10 +351,9 @@ gst_app_sink_class_init (GstAppSinkClass * klass) * Since: 1.24 */ gst_app_sink_signals[SIGNAL_PROPOSE_ALLOCATION] = - g_signal_new ("propose-allocation", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAppSinkClass, propose_allocation), - NULL, NULL, NULL, G_TYPE_BOOLEAN, 1, - GST_TYPE_QUERY | G_SIGNAL_TYPE_STATIC_SCOPE); + g_signal_new_class_handler ("propose-allocation", + G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, NULL, NULL, NULL, NULL, + G_TYPE_BOOLEAN, 1, GST_TYPE_QUERY | G_SIGNAL_TYPE_STATIC_SCOPE); /** * GstAppSink::new-serialized-event: * @appsink: the appsink element that emitted the signal diff --git a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.h b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.h index 050bb2d400..3cb38dc2d5 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.h @@ -123,16 +123,8 @@ struct _GstAppSinkClass */ GstMiniObject * (*try_pull_object) (GstAppSink *appsink, GstClockTime timeout); - /** - * GstAppSinkClass::propose_allocation: - * - * See #GstAppSink::propose-allocation: signal. - * - * Since: 1.24 - */ - gboolean (*propose_allocation) (GstAppSink *appsink, GstQuery *query); /*< private >*/ - gpointer _gst_reserved[GST_PADDING - 4]; + gpointer _gst_reserved[GST_PADDING - 3]; }; GST_APP_API |