diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-04-11 13:49:54 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-11 13:49:54 +0000 |
commit | 4f4bb657d6d59d0e19c030d2845745e815af19a3 (patch) | |
tree | 24b1d21d473a2d2e089df78b3408acb012edc4db /gst/rtpmanager/gstrtpjitterbuffer.c | |
parent | 54260af4c9042d98531907c3a149eea03b5283cd (diff) | |
download | gst-plugins-bad-4f4bb657d6d59d0e19c030d2845745e815af19a3.tar.gz gst-plugins-bad-4f4bb657d6d59d0e19c030d2845745e815af19a3.tar.bz2 gst-plugins-bad-4f4bb657d6d59d0e19c030d2845745e815af19a3.zip |
gst/rtpmanager/gstrtpbin-marshal.list: Some more custom marshallers.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin-marshal.list:
Some more custom marshallers.
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(clock_rate_request), (create_stream), (gst_rtp_bin_class_init),
(pt_map_requested), (new_ssrc_pad_found), (create_recv_rtp):
* gst/rtpmanager/gstrtpbin.h:
Prepare for caching pt maps.
Connect to signals to collect pt maps.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init),
(gst_jitter_buffer_sink_setcaps), (gst_rtp_jitter_buffer_loop):
* gst/rtpmanager/gstrtpjitterbuffer.h:
Add request_clock_rate signal.
Use scale insteat of scale_int because the later does not deal with
negative numbers.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init),
(gst_rtp_pt_demux_chain):
* gst/rtpmanager/gstrtpptdemux.h:
Implement request-pt-map signal.
Diffstat (limited to 'gst/rtpmanager/gstrtpjitterbuffer.c')
-rw-r--r-- | gst/rtpmanager/gstrtpjitterbuffer.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 21fecf8f..39b476d9 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -58,8 +58,10 @@ #include <string.h> #include <gst/rtp/gstrtpbuffer.h> -#include "gstrtpjitterbuffer.h" +#include "gstrtpbin-marshal.h" + +#include "gstrtpjitterbuffer.h" #include "async_jitter_queue.h" GST_DEBUG_CATEGORY (rtpjitterbuffer_debug); @@ -81,6 +83,7 @@ GST_ELEMENT_DETAILS ("RTP packet jitter-buffer", enum { /* FILL ME */ + SIGNAL_REQUEST_CLOCK_RATE, LAST_SIGNAL }; @@ -152,6 +155,8 @@ GST_STATIC_PAD_TEMPLATE ("src", */ ) ); +static guint gst_rtp_jitter_buffer_signals[LAST_SIGNAL] = { 0 }; + GST_BOILERPLATE (GstRTPJitterBuffer, gst_rtp_jitter_buffer, GstElement, GST_TYPE_ELEMENT); @@ -221,6 +226,19 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass) "Tells the jitterbuffer to never exceed the given latency in size", DEFAULT_DROP_ON_LATENCY, G_PARAM_READWRITE)); + /** + * GstRTPJitterBuffer::request-clock-rate: + * @buffer: the object which received the signal + * @pt: the pt + * + * Request the payload type as #GstCaps for @pt. + */ + gst_rtp_jitter_buffer_signals[SIGNAL_REQUEST_CLOCK_RATE] = + g_signal_new ("request-clock-rate", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPJitterBufferClass, + request_clock_rate), NULL, NULL, gst_rtp_bin_marshal_UINT__UINT, + G_TYPE_UINT, 1, G_TYPE_UINT); + gstelement_class->change_state = gst_rtp_jitter_buffer_change_state; GST_DEBUG_CATEGORY_INIT @@ -366,8 +384,6 @@ gst_jitter_buffer_sink_setcaps (GstPad * pad, GstCaps * caps) } else priv->next_seqnum = -1; - - async_jitter_queue_set_max_queue_length (priv->queue, priv->latency_ms * priv->clock_rate / 1000); @@ -859,8 +875,7 @@ again: rtp_time -= priv->clock_base; /* bring timestamp to gst time */ - timestamp = - gst_util_uint64_scale_int (GST_SECOND, rtp_time, priv->clock_rate); + timestamp = gst_util_uint64_scale (GST_SECOND, rtp_time, priv->clock_rate); GST_DEBUG_OBJECT (jitterbuffer, "timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp)); |