summaryrefslogtreecommitdiff
path: root/plugins/elements
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elements')
-rw-r--r--plugins/elements/gstfakesink.c85
-rw-r--r--plugins/elements/gstfakesink.h5
-rw-r--r--plugins/elements/gstfakesrc.c69
-rw-r--r--plugins/elements/gstfakesrc.h3
4 files changed, 5 insertions, 157 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;
diff --git a/plugins/elements/gstfakesink.h b/plugins/elements/gstfakesink.h
index b1165af16..52df1a968 100644
--- a/plugins/elements/gstfakesink.h
+++ b/plugins/elements/gstfakesink.h
@@ -77,7 +77,6 @@ struct _GstFakeSink {
gboolean silent;
gboolean dump;
- gboolean signal_handoffs;
GstFakeSinkStateError state_error;
gchar *last_message;
gint num_buffers;
@@ -89,10 +88,6 @@ struct _GstFakeSink {
struct _GstFakeSinkClass {
GstBaseSinkClass parent_class;
-
- /* 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);
diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c
index df46d18cf..c098578a8 100644
--- a/plugins/elements/gstfakesrc.c
+++ b/plugins/elements/gstfakesrc.c
@@ -1,6 +1,7 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wim@fluendo.com>
+ * 2011 Wim Taymans <wim.taymans@gmail.com>
*
* gstfakesrc.c:
*
@@ -66,7 +67,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_fake_src_debug);
enum
{
/* FILL ME */
- SIGNAL_HANDOFF,
LAST_SIGNAL
};
@@ -80,7 +80,6 @@ enum
#define DEFAULT_SYNC FALSE
#define DEFAULT_PATTERN NULL
#define DEFAULT_EOS FALSE
-#define DEFAULT_SIGNAL_HANDOFFS FALSE
#define DEFAULT_SILENT FALSE
#define DEFAULT_DUMP FALSE
#define DEFAULT_PARENTSIZE 4096*10
@@ -101,7 +100,6 @@ enum
PROP_SYNC,
PROP_PATTERN,
PROP_EOS,
- PROP_SIGNAL_HANDOFFS,
PROP_SILENT,
PROP_DUMP,
PROP_PARENTSIZE,
@@ -222,39 +220,9 @@ static void gst_fake_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
static GstFlowReturn gst_fake_src_create (GstBaseSrc * src, guint64 offset,
guint length, GstBuffer ** buf);
-static guint gst_fake_src_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_src_class_init (GstFakeSrcClass * klass)
{
GObjectClass *gobject_class;
@@ -321,10 +289,6 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_SILENT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
- g_param_spec_boolean ("signal-handoffs", "Signal handoffs",
- "Send a signal before pushing the buffer", DEFAULT_SIGNAL_HANDOFFS,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout",
DEFAULT_DUMP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -352,25 +316,12 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
"The format of the segment events", GST_TYPE_FORMAT,
DEFAULT_FORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * GstFakeSrc::handoff:
- * @fakesrc: the fakesrc instance
- * @buffer: the buffer that will be pushed
- * @pad: the pad that will sent it
- *
- * This signal gets emitted before sending the buffer.
- */
- gst_fake_src_signals[SIGNAL_HANDOFF] =
- g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstFakeSrcClass, 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 Source",
"Source",
"Push empty (no data) buffers around",
- "Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
+ "Erik Walthinsen <omega@cse.ogi.edu>, "
+ "Wim Taymans <wim.taymans@gmail.com>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
@@ -388,7 +339,6 @@ gst_fake_src_init (GstFakeSrc * fakesrc)
fakesrc->output = FAKE_SRC_FIRST_LAST_LOOP;
fakesrc->buffer_count = 0;
fakesrc->silent = DEFAULT_SILENT;
- fakesrc->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS;
fakesrc->dump = DEFAULT_DUMP;
fakesrc->pattern_byte = 0x00;
fakesrc->data = FAKE_SRC_DATA_ALLOCATE;
@@ -519,9 +469,6 @@ gst_fake_src_set_property (GObject * object, guint prop_id,
case PROP_SILENT:
src->silent = g_value_get_boolean (value);
break;
- case PROP_SIGNAL_HANDOFFS:
- src->signal_handoffs = g_value_get_boolean (value);
- break;
case PROP_DUMP:
src->dump = g_value_get_boolean (value);
break;
@@ -591,9 +538,6 @@ gst_fake_src_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_SILENT:
g_value_set_boolean (value, src->silent);
break;
- case PROP_SIGNAL_HANDOFFS:
- g_value_set_boolean (value, src->signal_handoffs);
- break;
case PROP_DUMP:
g_value_set_boolean (value, src->dump);
break;
@@ -864,13 +808,6 @@ gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
#endif
}
- if (src->signal_handoffs) {
- GST_LOG_OBJECT (src, "pre handoff emit");
- g_signal_emit (src, gst_fake_src_signals[SIGNAL_HANDOFF], 0, buf,
- basesrc->srcpad);
- GST_LOG_OBJECT (src, "post handoff emit");
- }
-
src->bytes_sent += size;
*ret = buf;
diff --git a/plugins/elements/gstfakesrc.h b/plugins/elements/gstfakesrc.h
index 00675c272..d72642dd0 100644
--- a/plugins/elements/gstfakesrc.h
+++ b/plugins/elements/gstfakesrc.h
@@ -144,7 +144,6 @@ struct _GstFakeSrc {
gint rt_num_buffers; /* we are going to change this at runtime */
gint64 buffer_count;
gboolean silent;
- gboolean signal_handoffs;
gboolean dump;
gboolean can_activate_pull;
GstFormat format;
@@ -158,8 +157,6 @@ struct _GstFakeSrcClass {
GstBaseSrcClass parent_class;
/*< public >*/
- /* signals */
- void (*handoff) (GstElement *element, GstBuffer *buf, GstPad *pad);
};
GType gst_fake_src_get_type (void);