"writable": true
}
},
- "rank": "none"
+ "rank": "none",
+ "signals": {
+ "handoff": {
+ "args": [
+ {
+ "name": "arg0",
+ "type": "GstBuffer"
+ },
+ {
+ "name": "arg1",
+ "type": "GstPad"
+ }
+ ],
+ "return-type": "void",
+ "when": "last"
+ },
+ "preroll-handoff": {
+ "args": [
+ {
+ "name": "arg0",
+ "type": "GstBuffer"
+ },
+ {
+ "name": "arg1",
+ "type": "GstPad"
+ }
+ ],
+ "return-type": "void",
+ "when": "last"
+ }
+ }
},
"fakevideosink": {
"author": "Nicolas Dufresne <nicolas.dufresne@collabora.com>",
"writable": true
}
},
- "rank": "none"
+ "rank": "none",
+ "signals": {
+ "handoff": {
+ "args": [
+ {
+ "name": "arg0",
+ "type": "GstBuffer"
+ },
+ {
+ "name": "arg1",
+ "type": "GstPad"
+ }
+ ],
+ "return-type": "void",
+ "when": "last"
+ },
+ "preroll-handoff": {
+ "args": [
+ {
+ "name": "arg0",
+ "type": "GstBuffer"
+ },
+ {
+ "name": "arg1",
+ "type": "GstPad"
+ }
+ ],
+ "return-type": "void",
+ "when": "last"
+ }
+ }
},
"fpsdisplaysink": {
"author": "Zeeshan Ali <zeeshan.ali@nokia.com>, Stefan Kost <stefan.kost@nokia.com>",
PROP_LAST
};
+enum
+{
+ SIGNAL_HANDOFF,
+ SIGNAL_PREROLL_HANDOFF,
+ LAST_SIGNAL
+};
+
+static guint gst_fake_audio_sink_signals[LAST_SIGNAL] = { 0 };
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
}
static void
+gst_fake_audio_sink_proxy_handoff (GstElement * element, GstBuffer * buffer,
+ GstPad * pad, GstFakeAudioSink * self)
+{
+ g_signal_emit (self, gst_fake_audio_sink_signals[SIGNAL_HANDOFF], 0,
+ buffer, self->sinkpad);
+}
+
+static void
+gst_fake_audio_sink_proxy_preroll_handoff (GstElement * element,
+ GstBuffer * buffer, GstPad * pad, GstFakeAudioSink * self)
+{
+ g_signal_emit (self, gst_fake_audio_sink_signals[SIGNAL_PREROLL_HANDOFF], 0,
+ buffer, self->sinkpad);
+}
+
+static void
gst_fake_audio_sink_init (GstFakeAudioSink * self)
{
GstElement *child;
gst_bin_add (GST_BIN_CAST (self), child);
- ghost_pad = gst_ghost_pad_new_from_template ("sink", sink_pad, template);
+ self->sinkpad = ghost_pad =
+ gst_ghost_pad_new_from_template ("sink", sink_pad, template);
gst_object_unref (template);
gst_element_add_pad (GST_ELEMENT_CAST (self), ghost_pad);
gst_object_unref (sink_pad);
self->child = child;
gst_fake_audio_sink_proxy_properties (self, child);
+ g_signal_connect (child, "handoff",
+ G_CALLBACK (gst_fake_audio_sink_proxy_handoff), self);
+ g_signal_connect (child, "preroll-handoff",
+ G_CALLBACK (gst_fake_audio_sink_proxy_preroll_handoff), self);
} else {
g_warning ("Check your GStreamer installation, "
"core element 'fakesink' is missing.");
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * GstFakeAudioSink::handoff:
+ * @fakeaudiosink: the fakeaudiosink instance
+ * @buffer: the buffer that just has been received
+ * @pad: the pad that received it
+ *
+ * This signal gets emitted before unreffing the buffer.
+ *
+ * Since: 1.22
+ */
+ gst_fake_audio_sink_signals[SIGNAL_HANDOFF] =
+ g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstFakeAudioSinkClass, handoff), NULL, NULL,
+ NULL, G_TYPE_NONE, 2, GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE,
+ GST_TYPE_PAD);
+
+ /**
+ * GstFakeAudioSink::preroll-handoff:
+ * @fakeaudiosink: the fakeaudiosink instance
+ * @buffer: the buffer that just has been received
+ * @pad: the pad that received it
+ *
+ * This signal gets emitted before unreffing the buffer.
+ *
+ * Since: 1.22
+ */
+ gst_fake_audio_sink_signals[SIGNAL_PREROLL_HANDOFF] =
+ g_signal_new ("preroll-handoff", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstFakeAudioSinkClass,
+ preroll_handoff), NULL, NULL, NULL, G_TYPE_NONE, 2,
+ GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_PAD);
+
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_static_metadata (element_class, "Fake Audio Sink",
"Audio/Sink", "Fake audio renderer",
{
GstBin parent;
GstElement *child;
+ GstPad *sinkpad;
gdouble volume;
gboolean mute;
};
struct _GstFakeAudioSinkClass
{
GstBinClass parent;
+
+ /* signals */
+ void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
+ void (*preroll_handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
};
GType gst_fake_audio_sink_get_type (void);
PROP_LAST
};
+enum
+{
+ SIGNAL_HANDOFF,
+ SIGNAL_PREROLL_HANDOFF,
+ LAST_SIGNAL
+};
+
+static guint gst_fake_video_sink_signals[LAST_SIGNAL] = { 0 };
+
#define ALLOCATION_META_DEFAULT_FLAGS GST_ALLOCATION_FLAG_CROP_META | GST_ALLOCATION_FLAG_OVERLAY_COMPOSITION_META
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
}
static void
+gst_fake_video_sink_proxy_handoff (GstElement * element, GstBuffer * buffer,
+ GstPad * pad, GstFakeVideoSink * self)
+{
+ g_signal_emit (self, gst_fake_video_sink_signals[SIGNAL_HANDOFF], 0,
+ buffer, self->sinkpad);
+}
+
+static void
+gst_fake_video_sink_proxy_preroll_handoff (GstElement * element,
+ GstBuffer * buffer, GstPad * pad, GstFakeVideoSink * self)
+{
+ g_signal_emit (self, gst_fake_video_sink_signals[SIGNAL_PREROLL_HANDOFF], 0,
+ buffer, self->sinkpad);
+}
+
+static void
gst_fake_video_sink_init (GstFakeVideoSink * self)
{
GstElement *child;
gst_bin_add (GST_BIN (self), child);
- ghost_pad = gst_ghost_pad_new_from_template ("sink", sink_pad, template);
+ self->sinkpad = ghost_pad =
+ gst_ghost_pad_new_from_template ("sink", sink_pad, template);
gst_object_unref (template);
gst_element_add_pad (GST_ELEMENT (self), ghost_pad);
gst_object_unref (sink_pad);
self->child = child;
gst_fake_video_sink_proxy_properties (self, child);
+ g_signal_connect (child, "handoff",
+ G_CALLBACK (gst_fake_video_sink_proxy_handoff), self);
+ g_signal_connect (child, "preroll-handoff",
+ G_CALLBACK (gst_fake_video_sink_proxy_preroll_handoff), self);
} else {
g_warning ("Check your GStreamer installation, "
"core element 'fakesink' is missing.");
ALLOCATION_META_DEFAULT_FLAGS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
+ * GstFakeVideoSink::handoff:
+ * @fakevideosink: the fakevideosink instance
+ * @buffer: the buffer that just has been received
+ * @pad: the pad that received it
+ *
+ * This signal gets emitted before unreffing the buffer.
+ *
+ * Since: 1.22
+ */
+ gst_fake_video_sink_signals[SIGNAL_HANDOFF] =
+ g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstFakeVideoSinkClass, handoff), NULL, NULL,
+ NULL, G_TYPE_NONE, 2, GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE,
+ GST_TYPE_PAD);
+
+ /**
+ * GstFakeVideoSink::preroll-handoff:
+ * @fakevideosink: the fakevideosink instance
+ * @buffer: the buffer that just has been received
+ * @pad: the pad that received it
+ *
+ * This signal gets emitted before unreffing the buffer.
+ *
+ * Since: 1.22
+ */
+ gst_fake_video_sink_signals[SIGNAL_PREROLL_HANDOFF] =
+ g_signal_new ("preroll-handoff", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstFakeVideoSinkClass,
+ preroll_handoff), NULL, NULL, NULL, G_TYPE_NONE, 2,
+ GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_PAD);
+
gst_type_mark_as_plugin_api (GST_TYPE_FAKE_VIDEO_SINK_ALLOCATION_META_FLAGS,
0);
}
GstBin parent;
GstElement *child;
GstFakeVideoSinkAllocationMetaFlags allocation_meta_flags;
+ GstPad *sinkpad;
};
struct _GstFakeVideoSinkClass
{
GstBinClass parent;
+
+ /* signals */
+ void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
+ void (*preroll_handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
};
GType gst_fake_video_sink_get_type (void);