summaryrefslogtreecommitdiff
path: root/plugins/elements/gstfakesink.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elements/gstfakesink.c')
-rw-r--r--plugins/elements/gstfakesink.c85
1 files changed, 2 insertions, 83 deletions
diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c
index f4e6a5c12..0738ad213 100644
--- a/plugins/elements/gstfakesink.c
+++ b/plugins/elements/gstfakesink.c
@@ -1,6 +1,7 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2005 Wim Taymans <wim@fluendo.com>
+ * 2011 Wim Taymans <wim.taymans@gmail.com>
*
* gstfakesink.c:
*
@@ -53,8 +54,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_fake_sink_debug);
enum
{
/* FILL ME */
- SIGNAL_HANDOFF,
- SIGNAL_PREROLL_HANDOFF,
LAST_SIGNAL
};
@@ -75,7 +74,6 @@ enum
PROP_STATE_ERROR,
PROP_SILENT,
PROP_DUMP,
- PROP_SIGNAL_HANDOFFS,
PROP_LAST_MESSAGE,
PROP_CAN_ACTIVATE_PUSH,
PROP_CAN_ACTIVATE_PULL,
@@ -132,39 +130,9 @@ static GstFlowReturn gst_fake_sink_render (GstBaseSink * bsink,
GstBuffer * buffer);
static gboolean gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event);
-static guint gst_fake_sink_signals[LAST_SIGNAL] = { 0 };
-
static GParamSpec *pspec_last_message = NULL;
static void
-marshal_VOID__MINIOBJECT_OBJECT (GClosure * closure, GValue * return_value,
- guint n_param_values, const GValue * param_values, gpointer invocation_hint,
- gpointer marshal_data)
-{
- typedef void (*marshalfunc_VOID__MINIOBJECT_OBJECT) (gpointer obj,
- gpointer arg1, gpointer arg2, gpointer data2);
- register marshalfunc_VOID__MINIOBJECT_OBJECT callback;
- register GCClosure *cc = (GCClosure *) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure)) {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- } else {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback =
- (marshalfunc_VOID__MINIOBJECT_OBJECT) (marshal_data ? marshal_data :
- cc->callback);
-
- callback (data1, g_value_get_boxed (param_values + 1),
- g_value_get_object (param_values + 2), data2);
-}
-
-static void
gst_fake_sink_class_init (GstFakeSinkClass * klass)
{
GObjectClass *gobject_class;
@@ -188,10 +156,6 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE,
pspec_last_message);
- g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
- g_param_spec_boolean ("signal-handoffs", "Signal handoffs",
- "Send a signal before unreffing the buffer", DEFAULT_SIGNAL_HANDOFFS,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_SILENT,
@@ -214,42 +178,12 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
"Number of buffers to accept going EOS", -1, G_MAXINT,
DEFAULT_NUM_BUFFERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * GstFakeSink::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.
- */
- gst_fake_sink_signals[SIGNAL_HANDOFF] =
- g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
- marshal_VOID__MINIOBJECT_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, marshal_VOID__MINIOBJECT_OBJECT, G_TYPE_NONE, 2,
- GST_TYPE_BUFFER, GST_TYPE_PAD);
-
gst_element_class_set_details_simple (gstelement_class,
"Fake Sink",
"Sink",
"Black hole for data",
"Erik Walthinsen <omega@cse.ogi.edu>, "
- "Wim Taymans <wim@fluendo.com>, "
+ "Wim Taymans <wim.taymans@gmail.com>, "
"Mr. 'frag-me-more' Vanderwingo <wingo@fluendo.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
@@ -269,7 +203,6 @@ gst_fake_sink_init (GstFakeSink * fakesink)
fakesink->dump = DEFAULT_DUMP;
fakesink->last_message = g_strdup (DEFAULT_LAST_MESSAGE);
fakesink->state_error = DEFAULT_STATE_ERROR;
- fakesink->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS;
fakesink->num_buffers = DEFAULT_NUM_BUFFERS;
#if !GLIB_CHECK_VERSION(2,26,0)
g_static_rec_mutex_init (&fakesink->notify_lock);
@@ -308,9 +241,6 @@ gst_fake_sink_set_property (GObject * object, guint prop_id,
case PROP_DUMP:
sink->dump = g_value_get_boolean (value);
break;
- case PROP_SIGNAL_HANDOFFS:
- sink->signal_handoffs = g_value_get_boolean (value);
- break;
case PROP_CAN_ACTIVATE_PUSH:
GST_BASE_SINK (sink)->can_activate_push = g_value_get_boolean (value);
break;
@@ -344,9 +274,6 @@ gst_fake_sink_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_DUMP:
g_value_set_boolean (value, sink->dump);
break;
- case PROP_SIGNAL_HANDOFFS:
- g_value_set_boolean (value, sink->signal_handoffs);
- break;
case PROP_LAST_MESSAGE:
GST_OBJECT_LOCK (sink);
g_value_set_string (value, sink->last_message);
@@ -449,11 +376,6 @@ gst_fake_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer)
gst_fake_sink_notify_last_message (sink);
}
- if (sink->signal_handoffs) {
- g_signal_emit (sink,
- gst_fake_sink_signals[SIGNAL_PREROLL_HANDOFF], 0, buffer,
- bsink->sinkpad);
- }
return GST_FLOW_OK;
/* ERRORS */
@@ -527,9 +449,6 @@ gst_fake_sink_render (GstBaseSink * bsink, GstBuffer * buf)
gst_fake_sink_notify_last_message (sink);
}
- if (sink->signal_handoffs)
- g_signal_emit (sink, gst_fake_sink_signals[SIGNAL_HANDOFF], 0, buf,
- bsink->sinkpad);
if (sink->dump) {
guint8 *data;