From 2274ebfc6935bbaa8ca6baab4920f19cbd5fb2f7 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Tue, 23 May 2006 14:23:49 +0000 Subject: [PATCH] docs/gst/gstreamer-sections.txt: Make new GST_FLOW_IS_SUCCESS macro visible in docs. Original commit message from CVS: Patch by: Julien Moutte * docs/gst/gstreamer-sections.txt: Make new GST_FLOW_IS_SUCCESS macro visible in docs. * plugins/elements/gstfakesink.c: (gst_fake_sink_class_init), (gst_fake_sink_preroll): * plugins/elements/gstfakesink.h: Add new ::preroll-handoff signal (#337100). --- ChangeLog | 12 ++++++++++++ docs/gst/gstreamer-sections.txt | 1 + plugins/elements/gstfakesink.c | 22 ++++++++++++++++++++++ plugins/elements/gstfakesink.h | 1 + 4 files changed, 36 insertions(+) diff --git a/ChangeLog b/ChangeLog index f8d1308..7c3d763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-05-23 Tim-Philipp Müller + + Patch by: Julien Moutte + + * docs/gst/gstreamer-sections.txt: + Make new GST_FLOW_IS_SUCCESS macro visible in docs. + + * plugins/elements/gstfakesink.c: (gst_fake_sink_class_init), + (gst_fake_sink_preroll): + * plugins/elements/gstfakesink.h: + Add new ::preroll-handoff signal (#337100). + 2006-05-23 Wim Taymans * gst/gstpad.c: (gst_flow_get_name), (gst_flow_to_quark): diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 3dda58f..e5aa97e 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1286,6 +1286,7 @@ GST_PAD_STREAM_UNLOCK GST_PAD_STREAM_UNLOCK_FULL GST_FLOW_IS_FATAL +GST_FLOW_IS_SUCCESS GstPadClass diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index d0cdc41..4617ab9 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -56,6 +56,7 @@ enum { /* FILL ME */ SIGNAL_HANDOFF, + SIGNAL_PREROLL_HANDOFF, LAST_SIGNAL }; @@ -200,6 +201,22 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass) gst_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GST_TYPE_BUFFER, GST_TYPE_PAD); + /** + * GstFakeSink::preroll-handoff: + * @fakesink: the fakesink instance + * @buffer: the buffer that just has been received + * @pad: the pad that received it + * + * This signal gets emitted before unreffing the buffer. + * + * Since: 0.10.7 + */ + gst_fake_sink_signals[SIGNAL_PREROLL_HANDOFF] = + g_signal_new ("preroll-handoff", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstFakeSinkClass, preroll_handoff), + NULL, NULL, gst_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, + GST_TYPE_BUFFER, GST_TYPE_PAD); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_fake_sink_change_state); @@ -333,6 +350,11 @@ gst_fake_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer) g_object_notify (G_OBJECT (sink), "last_message"); } + if (sink->signal_handoffs) { + g_signal_emit (sink, + gst_fake_sink_signals[SIGNAL_PREROLL_HANDOFF], 0, buffer, + bsink->sinkpad); + } return GST_FLOW_OK; } diff --git a/plugins/elements/gstfakesink.h b/plugins/elements/gstfakesink.h index 53c2229..96206bc 100644 --- a/plugins/elements/gstfakesink.h +++ b/plugins/elements/gstfakesink.h @@ -86,6 +86,7 @@ struct _GstFakeSinkClass { /* signals */ void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad); + void (*preroll_handoff) (GstElement *element, GstBuffer *buf, GstPad *pad); }; GType gst_fake_sink_get_type (void); -- 2.7.4