mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:46:13 +00:00
gst-libs/gst/rtp/gstbasertpdepayload.c: setting queue_delay to zero. Also avoid thread being started if queue_delay i...
Original commit message from CVS: 2006-02-01 Philippe Kalaf <burger at speedy dot org> * gst-libs/gst/rtp/gstbasertpdepayload.c: Patch by Kai Vehmanen : Adds ability to enable newsegment bypass by setting queue_delay to zero. Also avoid thread being started if queue_delay is zero.
This commit is contained in:
parent
f85c7f5268
commit
a6d1e0b5bf
2 changed files with 34 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-02-01 Philippe Kalaf <burger at speedy dot org>
|
||||||
|
|
||||||
|
* gst-libs/gst/rtp/gstbasertpdepayload.c:
|
||||||
|
Patch by Kai Vehmanen : Adds ability to enable newsegment bypass by
|
||||||
|
setting queue_delay to zero. Also avoid thread being started if
|
||||||
|
queue_delay is zero.
|
||||||
|
|
||||||
2006-02-01 Tim-Philipp Müller <tim at centricular dot net>
|
2006-02-01 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/playback/test6.c: (new_decoded_pad_cb), (show_error), (main):
|
* gst/playback/test6.c: (new_decoded_pad_cb), (show_error), (main):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* GStreamer
|
/* GStreamer
|
||||||
* Copyright (C) <2005> Philippe Khalaf <burger@speedy.org>
|
* Copyright (C) <2005> Philippe Khalaf <burger@speedy.org>
|
||||||
|
* Copyright (C) <2005> Nokia Corporation <kai.vehmanen@nokia.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
@ -220,14 +221,22 @@ gst_base_rtp_depayload_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_NEWSEGMENT:
|
case GST_EVENT_NEWSEGMENT:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (filter,
|
/* intercept NEWSEGMENT events only if the packet scheduler thread
|
||||||
"Upstream sent a NEWSEGMENT, handle in worker thread.");
|
is active */
|
||||||
/* the worker thread will assign a new RTP-TS<->GST-TS mapping
|
if (filter->thread) {
|
||||||
* based on the next processed RTP packet */
|
GST_DEBUG_OBJECT (filter,
|
||||||
filter->need_newsegment = TRUE;
|
"Upstream sent a NEWSEGMENT, handle in worker thread.");
|
||||||
gst_event_unref (event);
|
/* the worker thread will assign a new RTP-TS<->GST-TS mapping
|
||||||
break;
|
* based on the next processed RTP packet */
|
||||||
|
filter->need_newsegment = TRUE;
|
||||||
|
gst_event_unref (event);
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
GST_DEBUG_OBJECT (filter,
|
||||||
|
"Upstream sent a NEWSEGMENT, passing through.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
/* note: pass through to default if no thread running */
|
||||||
default:
|
default:
|
||||||
/* pass other events forward */
|
/* pass other events forward */
|
||||||
res = gst_pad_push_event (filter->srcpad, event);
|
res = gst_pad_push_event (filter->srcpad, event);
|
||||||
|
@ -361,8 +370,8 @@ gst_base_rtp_depayload_queue_release (GstBaseRTPDepayload * filter)
|
||||||
/* if our queue is getting to big (more than RTP_QUEUEDELAY ms of data)
|
/* if our queue is getting to big (more than RTP_QUEUEDELAY ms of data)
|
||||||
* release heading buffers
|
* release heading buffers
|
||||||
*/
|
*/
|
||||||
GST_DEBUG_OBJECT (filter, "clockrate %d, queue_delay %d", filter->clock_rate,
|
/*GST_DEBUG_OBJECT (filter, "clockrate %d, queue_delay %d", filter->clock_rate,
|
||||||
filter->queue_delay);
|
filter->queue_delay); */
|
||||||
q_size_secs = (gfloat) filter->queue_delay / 1000;
|
q_size_secs = (gfloat) filter->queue_delay / 1000;
|
||||||
maxtsunits = (gfloat) filter->clock_rate * q_size_secs;
|
maxtsunits = (gfloat) filter->clock_rate * q_size_secs;
|
||||||
|
|
||||||
|
@ -406,11 +415,15 @@ gst_base_rtp_depayload_thread (GstBaseRTPDepayload * filter)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_rtp_depayload_start_thread (GstBaseRTPDepayload * filter)
|
gst_base_rtp_depayload_start_thread (GstBaseRTPDepayload * filter)
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (filter, "Starting queue release thread");
|
/* only launch the thread if processing is needed */
|
||||||
filter->thread_running = TRUE;
|
if (filter->queue_delay) {
|
||||||
filter->thread = g_thread_create ((GThreadFunc) gst_base_rtp_depayload_thread,
|
GST_DEBUG_OBJECT (filter, "Starting queue release thread");
|
||||||
filter, TRUE, NULL);
|
filter->thread_running = TRUE;
|
||||||
GST_DEBUG_OBJECT (filter, "Started queue release thread");
|
filter->thread =
|
||||||
|
g_thread_create ((GThreadFunc) gst_base_rtp_depayload_thread, filter,
|
||||||
|
TRUE, NULL);
|
||||||
|
GST_DEBUG_OBJECT (filter, "Started queue release thread");
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue