diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-04-25 15:55:32 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-25 15:55:32 +0000 |
commit | 6937be1a0979aa0eed1a57eb3fbf9b11f275360e (patch) | |
tree | 7c139197e431a82c34e1a6aa677168d330d4d094 /gst/rtsp/gstrtpdec.c | |
parent | e53a24511b26f3f7dde05ba073d02ca49cb2b190 (diff) |
gst/rtsp/gstrtpdec.*: Add dummy latency property to be backwards compat with rtpbin.
Original commit message from CVS:
* gst/rtsp/gstrtpdec.c: (gst_rtp_dec_class_init),
(gst_rtp_dec_init), (gst_rtp_dec_set_property),
(gst_rtp_dec_get_property):
* gst/rtsp/gstrtpdec.h:
Add dummy latency property to be backwards compat with rtpbin.
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_class_init),
(gst_rtspsrc_set_property), (gst_rtspsrc_get_property),
(gst_rtspsrc_stream_configure_transport),
(gst_rtspsrc_parse_rtpinfo):
* gst/rtsp/gstrtspsrc.h:
Add latency property and configure in the session manager.
Don't set invalid clock-base and seqnum-base on caps, some servers
sometimes don't send them.
Diffstat (limited to 'gst/rtsp/gstrtpdec.c')
-rw-r--r-- | gst/rtsp/gstrtpdec.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtpdec.c b/gst/rtsp/gstrtpdec.c index a1339994..3352b052 100644 --- a/gst/rtsp/gstrtpdec.c +++ b/gst/rtsp/gstrtpdec.c @@ -80,9 +80,12 @@ enum LAST_SIGNAL }; +#define DEFAULT_LATENCY_MS 200 + enum { PROP_0, + PROP_LATENCY }; static GstStaticPadTemplate gst_rtp_dec_recv_rtp_sink_template = @@ -266,6 +269,11 @@ gst_rtp_dec_class_init (GstRTPDecClass * g_class) gobject_class->set_property = gst_rtp_dec_set_property; gobject_class->get_property = gst_rtp_dec_get_property; + g_object_class_install_property (gobject_class, PROP_LATENCY, + g_param_spec_uint ("latency", "Buffer latency in ms", + "Amount of ms to buffer", 0, G_MAXUINT, DEFAULT_LATENCY_MS, + G_PARAM_READWRITE)); + /** * GstRTPDec::request-pt-map: * @rtpdec: the object which received the signal @@ -294,6 +302,7 @@ static void gst_rtp_dec_init (GstRTPDec * rtpdec, GstRTPDecClass * klass) { rtpdec->provided_clock = gst_system_clock_obtain (); + rtpdec->latency = DEFAULT_LATENCY_MS; } static void @@ -584,7 +593,11 @@ gst_rtp_dec_set_property (GObject * object, guint prop_id, src = GST_RTP_DEC (object); switch (prop_id) { + case PROP_LATENCY: + src->latency = g_value_get_uint (value); + break; default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } @@ -598,7 +611,11 @@ gst_rtp_dec_get_property (GObject * object, guint prop_id, GValue * value, src = GST_RTP_DEC (object); switch (prop_id) { + case PROP_LATENCY: + g_value_set_uint (value, src->latency); + break; default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } |