diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-04-06 12:28:29 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-06 12:28:29 +0000 |
commit | 9894c6ad51e860fbc4474703c0a3e67a950ac359 (patch) | |
tree | 64b9dd0ab4df7ecd1f8aa804a833af2f222d6c49 /gst | |
parent | a52a704426a350cbe6746333c1e0eee9ffdcdbe4 (diff) | |
download | gst-plugins-bad-9894c6ad51e860fbc4474703c0a3e67a950ac359.tar.gz gst-plugins-bad-9894c6ad51e860fbc4474703c0a3e67a950ac359.tar.bz2 gst-plugins-bad-9894c6ad51e860fbc4474703c0a3e67a950ac359.zip |
gst/rtpmanager/gstrtpbin.*: Provide a clock.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init),
(gst_rtp_bin_init), (gst_rtp_bin_provide_clock):
* gst/rtpmanager/gstrtpbin.h:
Provide a clock.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtpmanager/gstrtpbin.c | 14 | ||||
-rw-r--r-- | gst/rtpmanager/gstrtpbin.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index eed07045..5f6551bb 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -312,6 +312,7 @@ static void gst_rtp_bin_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); /* GstElement vmethods */ +static GstClock *gst_rtp_bin_provide_clock (GstElement * element); static GstStateChangeReturn gst_rtp_bin_change_state (GstElement * element, GstStateChange transition); static GstPad *gst_rtp_bin_request_new_pad (GstElement * element, @@ -361,6 +362,8 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass) gobject_class->set_property = gst_rtp_bin_set_property; gobject_class->get_property = gst_rtp_bin_get_property; + gstelement_class->provide_clock = + GST_DEBUG_FUNCPTR (gst_rtp_bin_provide_clock); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_new_pad); @@ -373,6 +376,7 @@ static void gst_rtp_bin_init (GstRTPBin * rtpbin, GstRTPBinClass * klass) { rtpbin->priv = GST_RTP_BIN_GET_PRIVATE (rtpbin); + rtpbin->provided_clock = gst_system_clock_obtain (); } static void @@ -415,6 +419,16 @@ gst_rtp_bin_get_property (GObject * object, guint prop_id, } } +static GstClock * +gst_rtp_bin_provide_clock (GstElement * element) +{ + GstRTPBin *rtpbin; + + rtpbin = GST_RTP_BIN (element); + + return GST_CLOCK_CAST (gst_object_ref (rtpbin->provided_clock)); +} + static GstStateChangeReturn gst_rtp_bin_change_state (GstElement * element, GstStateChange transition) { diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h index ccd57a78..f9cfdf2d 100644 --- a/gst/rtpmanager/gstrtpbin.h +++ b/gst/rtpmanager/gstrtpbin.h @@ -42,6 +42,7 @@ struct _GstRTPBin { /* a list of session */ GSList *sessions; + GstClock *provided_clock; /*< private >*/ GstRTPBinPrivate *priv; |