From: <bi...@ke...> - 2009-07-29 13:59:28
|
Module: gnonlin Branch: master Commit: 341a05c637788549e2a0533e1f63e2400cfddee6 URL: http://cgit.freedesktop.org/gstreamer/gnonlin/commit/?id=341a05c637788549e2a0533e1f63e2400cfddee6 Author: Edward Hervey <bi...@bi...> Date: Wed Jul 1 18:53:43 2009 +0200 gnloperation: TEMPORARY COMMIT ! REBASE ME ! Added the signal, the next step is to emit it from the composition which requires replacing the gst_element_link with gst_pad_link... which we should have been using ages ago :) --- gnl/gnloperation.c | 24 +++++++++++++++++++++++- gnl/gnloperation.h | 4 ++++ 2 files changed, 27 insertions(+), 1 deletions(-) diff --git a/gnl/gnloperation.c b/gnl/gnloperation.c index d83d214..ded369a 100644 --- a/gnl/gnloperation.c +++ b/gnl/gnloperation.c @@ -68,6 +68,14 @@ enum ARG_SINKS, }; +enum +{ + INPUT_PRIORITY_CHANGED, + LAST_SIGNAL +}; + +static guint gnl_operation_signals[LAST_SIGNAL] = { 0 }; + static void gnl_operation_finalize (GObject * object); static void gnl_operation_set_property (GObject * object, guint prop_id, @@ -124,6 +132,20 @@ gnl_operation_class_init (GnlOperationClass * klass) "Number of input sinks (-1 for automatic handling)", -1, G_MAXINT, -1, G_PARAM_READWRITE)); + /** + * GnlOperation:input-priority-changed: + * @pad: The operation's input pad whose priority changed. + * @priority: The new priority + * + * Signals that the @priority of the stream being fed to the given @pad + * might have changed. + */ + gnl_operation_signals[INPUT_PRIORITY_CHANGED] = + g_signal_new ("input-priority-changed", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GnlOperationClass, + input_priority_changed), NULL, NULL, gnl_marshal_VOID__OBJECT_UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); + gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gnl_operation_request_new_pad); gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gnl_operation_release_pad); @@ -493,7 +515,7 @@ get_unused_static_sink_pad (GnlOperation * operation) return ret; } -static GstPad * +GstPad * get_unlinked_sink_ghost_pad (GnlOperation * operation) { GstIterator *pads; diff --git a/gnl/gnloperation.h b/gnl/gnloperation.h index cb25b99..f969b8a 100644 --- a/gnl/gnloperation.h +++ b/gnl/gnloperation.h @@ -67,8 +67,12 @@ G_BEGIN_DECLS struct _GnlOperationClass { GnlObjectClass parent_class; + + void (*input_priority_changed) (GnlOperation * operation, GstPad *pad, guint32 priority); }; +GstPad * get_unlinked_sink_ghost_pad (GnlOperation * operation); + /* normal GOperation stuff */ GType gnl_operation_get_type (void); |