From b1a2c304014f5e2b990dda13be20dc67d691fd7a Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Thu, 3 May 2007 16:49:05 +0000 Subject: examples/switch/switcher.c (loop, my_bus_callback, switch_timer, last_message_received, main): gst/switch/gstswitch.c... Original commit message from CVS: * configure.ac: * examples/Makefile.am: * examples/switch/switcher.c (loop, my_bus_callback, switch_timer, last_message_received, main): * gst/switch/gstswitch.c (GST_CAT_DEFAULT, gst_switch_details, gst_switch_src_factory, parent_class, gst_switch_release_pad, gst_switch_request_new_pad, gst_switch_chain, gst_switch_event, gst_switch_set_property, gst_switch_get_property, gst_switch_get_linked_pad, gst_switch_getcaps, gst_switch_bufferalloc, gst_switch_get_linked_pads, gst_switch_dispose, gst_switch_init, gst_switch_base_init, gst_switch_class_init): * gst/switch/gstswitch.h (GstSwitch, GstSwitchClass, _GstSwitch, element, active_sinkpad, srcpad, nb_sinkpads, newsegment_events, need_to_send_newsegment): Port switch element and example program to 0.10. --- gst/switch/gstswitch.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'gst/switch/gstswitch.h') diff --git a/gst/switch/gstswitch.h b/gst/switch/gstswitch.h index ed6b2f27..b546ba29 100644 --- a/gst/switch/gstswitch.h +++ b/gst/switch/gstswitch.h @@ -35,26 +35,24 @@ G_BEGIN_DECLS #define GST_IS_SWITCH_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_SWITCH)) -typedef struct _GstSwitchPad GstSwitchPad; - typedef struct _GstSwitch GstSwitch; typedef struct _GstSwitchClass GstSwitchClass; -struct _GstSwitchPad { - GstPad *sinkpad; - GstData *data; - gboolean forwarded; - gboolean eos; -}; - struct _GstSwitch { GstElement element; - GList *sinkpads; + GstPad *active_sinkpad; GstPad *srcpad; guint nb_sinkpads; - guint active_sinkpad; + /* this hash table stores for key of the pad pointer + * the last new segment event received for this pad + * so when switching we can send new segment events + */ + GHashTable *newsegment_events; + /* flag to decide whether we need to send a new segment event + * before we receive the next buffer */ + gboolean need_to_send_newsegment; }; struct _GstSwitchClass { -- cgit v1.2.1