#include "gstfilesink.h"
#include "gstfilesrc.h"
#include "gstidentity.h"
+#include "gstinputselector.h"
+#include "gstoutputselector.h"
#include "gstmultiqueue.h"
#include "gstqueue.h"
#include "gstqueue2.h"
#endif
{"filesrc", GST_RANK_PRIMARY, gst_file_src_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
+ {"input-selector", GST_RANK_NONE, gst_input_selector_get_type},
+ {"output-selector", GST_RANK_NONE, gst_output_selector_get_type},
{"queue", GST_RANK_NONE, gst_queue_get_type},
{"queue2", GST_RANK_NONE, gst_queue2_get_type},
{"filesink", GST_RANK_PRIMARY, gst_file_sink_get_type},
#include <string.h>
#include "gstinputselector.h"
-#include "gstselector-marshal.h"
GST_DEBUG_CATEGORY_STATIC (input_selector_debug);
#define GST_CAT_DEFAULT input_selector_debug
static void gst_input_selector_switch (GstInputSelector * self,
GstPad * pad, gint64 stop_time, gint64 start_time);
+/* FIXME: create these marshallers using glib-genmarshal */
+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
+
+static void
+gst_input_selector_marshal_INT64__VOID (GClosure * closure,
+ GValue * return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue * param_values,
+ gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
+{
+ typedef gint64 (*GMarshalFunc_INT64__VOID) (gpointer data1, gpointer data2);
+ register GMarshalFunc_INT64__VOID callback;
+ register GCClosure *cc = (GCClosure *) closure;
+ register gpointer data1, data2;
+ gint64 v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 1);
+
+ 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 =
+ (GMarshalFunc_INT64__VOID) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1, data2);
+
+ g_value_set_int64 (return_value, v_return);
+}
+
+static void
+gst_input_selector_marshal_VOID__OBJECT_INT64_INT64 (GClosure * closure,
+ GValue * return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue * param_values,
+ gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_INT64_INT64) (gpointer data1,
+ gpointer arg_1, gint64 arg_2, gint64 arg_3, gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_INT64_INT64 callback;
+ register GCClosure *cc = (GCClosure *) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ 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 =
+ (GMarshalFunc_VOID__OBJECT_INT64_INT64) (marshal_data ? marshal_data :
+ cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_int64 (param_values + 2),
+ g_marshal_value_peek_int64 (param_values + 3), data2);
+}
+
#define _do_init(bla) \
GST_DEBUG_CATEGORY_INIT (input_selector_debug, \
"input-selector", 0, "An input stream selector element");
g_signal_new ("block", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GstInputSelectorClass, block), NULL, NULL,
- gst_selector_marshal_INT64__VOID, G_TYPE_INT64, 0);
+ gst_input_selector_marshal_INT64__VOID, G_TYPE_INT64, 0);
/**
* GstInputSelector::switch:
* @inputselector: the #GstInputSelector
gst_input_selector_signals[SIGNAL_SWITCH] =
g_signal_new ("switch", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstInputSelectorClass, switch_),
- NULL, NULL, gst_selector_marshal_VOID__OBJECT_INT64_INT64,
+ NULL, NULL, gst_input_selector_marshal_VOID__OBJECT_INT64_INT64,
G_TYPE_NONE, 3, GST_TYPE_PAD, G_TYPE_INT64, G_TYPE_INT64);
gstelement_class->request_new_pad = gst_input_selector_request_new_pad;