Commit graph

3620 commits

Author SHA1 Message Date
Tim-Philipp Müller
8c46cce875 flvdemux: minor micro-optimisation
We know these values don't change during the loop, but the compiler
doesn't and has to re-check them for every iteration.
2010-02-19 12:13:08 +00:00
Tim-Philipp Müller
ec9add84a8 flvdemux: remove static keyword from variables that shouldn't be static
Multiple flvparse/flvdemux instances should be able to operate without
trampling over each other by accidentally re-using the same (static)
variables. (Spotted by Mark Nauwelaerts)
2010-02-19 12:13:07 +00:00
Tim-Philipp Müller
07fa73f199 docs: add Since: markers for new jitterbuffer properties 2010-02-19 12:13:07 +00:00
Robert Swain
8d801f41d8 qtdemux: Fix off-by-one logic error in frame rate cap regression commit 2010-02-18 18:20:24 +01:00
Thiago Santos
f1c61e1d84 qtdemux: Use the correct duration when comparing segments
Do not confuse QtDemuxSegments with GstSegments when
comparing the total file duration with the segment duration

Fixes #610296
2010-02-18 07:53:34 -03:00
Robert Swain
2723de585e qtdemux: add durations modulo 1<<32
For calculating the durations of each sample, we are supposed to add each
duration modulo 1<<32 so make the elapsed time counter a uint32.

Fixes #610280
2010-02-17 18:06:29 +01:00
Anders Skargren
6a877b2e6d multipartdemux: improve header mime-type parsing
Make the handing of the mime type within the "boundary" a bit less naive.
The standard for MIME allows parameters to follow the "type" / "subtype"
clause separated from the mime type by ';'.

Modifies the multipartdemuxer's header parsing so it doesnt assume
the whole line after "content-type:" is the mime type and thus makes it a bit
more resilient to finding absurd mime types in the case where parameters are
added.

Fixes #604711
2010-02-16 21:05:24 +01:00
Wim Taymans
a0b651bf5b rtspsrc: avoid stopping NULL tasks
Check the task for NULL, it could be paused and set to NULL before.
2010-02-16 19:54:32 +01:00
Mark Nauwelaerts
d14685eb08 qtdemux: fix ALAC codec-data handling
ALAC codec-data apparently comes in (at least) two flavours (mov, mp4),
so use atom based parsing to retrieve required data, rather than
aiming for a specific offset.

See also #580731.
2010-02-16 16:22:28 +01:00
Mark Nauwelaerts
105d8c925b qtdemux: fix debug message 2010-02-16 16:09:36 +01:00
Mark Nauwelaerts
58d84a993c qtdemux: handle signed values in 3GPP location tag 2010-02-16 16:09:26 +01:00
Mark Nauwelaerts
87e80aab57 rtspsrc: fix typo in debug message 2010-02-16 16:07:21 +01:00
Mark Nauwelaerts
172c0c6a6a avidemux: reset some more stream state after seek
In particular, fixes non-flushing seek.
2010-02-16 15:03:59 +01:00
Robert Swain
e2f5409d40 qtdemux: Fix frame rate cap regression
Look for a non-zero min_duration during initialisation to avoid
incorrect frame rate caps.
2010-02-16 14:44:11 +01:00
Brian Cameron
a45b351ddf matroska: fix GST_ELEMENT_ERROR usage
Fixes #610053.
2010-02-16 01:40:19 +00:00
Wim Taymans
9d40d60960 rtpbin: remove use of ntp_ns_base 2010-02-15 21:36:29 +01:00
Wim Taymans
5a4ecc9da1 rtpbin: remove more ntpnstime and cleanups
Remove some code where we pass ntpnstime around, we can do most things with the
running_time just fine.
Rename a variable in the ArrivalStats struct so that it's clear that this is the
current system time.
2010-02-15 21:36:29 +01:00
Wim Taymans
74241e549f rtpsource: use running_time for jitter
Use the running_time to calculate the jitter instead of the ntp time. Part of
the plan to get rid of ntpnsbase.
2010-02-15 21:36:29 +01:00
Wim Taymans
83cb1aecc8 rtpbin: change how NTP time is calculated in RTCP
Don't calculate the NTP time based on the running_time of the pipeline but from
the systemclock. This allows us to generate more accurate NTP timestamps in case
the systemclock is synchronized with NTP or similar.
2010-02-15 21:36:29 +01:00
Tim-Philipp Müller
0233257612 matroska: fix printf format string 2010-02-15 10:33:02 +00:00
Tim-Philipp Müller
63c86ac3d8 raw1394, matroska, rtpmanager: remove padding from structures
None of these element and class structures are in public headers,
so don't need padding.
2010-02-15 00:50:10 +00:00
Edward Hervey
fa0e3184dd flvdemux: Audio tags without any content are valid.
We silently ignore them instead of erroring out.
2010-02-13 18:18:42 +01:00
Edward Hervey
817911664e flvdemux: Fix GST_CLOCK_DIFF usage.
It was previously checking for DIFF(a, b > 6 * GST_SECOND) instead of
the proper DIFF(a,b) > 6 * GST_SECOND
2010-02-13 18:07:50 +01:00
Edward Hervey
d263119589 flvdemux: Don't forget to reset the indexed variable when cleaning up 2010-02-13 16:27:07 +01:00
Edward Hervey
0dd06da5e8 flvdemux: Speedup GstIndex usage
Used the _add_associationv variant of GstIndex since we know how many
associations we're adding. Trims up to 50% from index generation time.

Note : It would be great if the index could be generated on the fly or
on request as opposed to being fully created at startup.
2010-02-13 14:57:59 +01:00
Wim Taymans
7f08081016 jitterbuffer: don't resync to invalid timestamps
If we detect backward timestamps on the server, don't try to resync when we
don't have an input timestamp (such as when using RTSP over TCP) instead, do
nothing but assume the timestamp was ok, it will correct itself when time goes
forwards.
2010-02-12 19:32:27 +01:00
Wim Taymans
d344754f03 rtpbin: fix typo 2010-02-12 17:22:56 +01:00
Wim Taymans
772eca5aff jitterbuffer: start out active and not buffering
There is no need to set the latency in the jittebuffer in _init, we will set
that later when going to PAUSED.
Set the jitterbuffer active and not buffering when starting.
2010-02-12 17:22:56 +01:00
Wim Taymans
8bbfd94c25 rtpbin: more buffering work
When deactivating jitterbuffers when the buffering starts, keep the current
percent of the jitterbuffer and also set the jitterbuffer in the buffering state
so that we know when it's filled again.
Add property to get the buffering percentage of the jitterbuffer.
2010-02-12 17:22:56 +01:00
Wim Taymans
e6e287cdcc rtpjitterbuffer: adjust latency in buffer mode
When we are in buffer mode, adjust the buffering low/high thresholds based on
the total configured latency. If we don't and there is a huge queue or element
with a big latency downstream we might drain the complete queue immediately and
start buffering again.
2010-02-12 17:22:55 +01:00
Wim Taymans
ab73603031 jitterbuffer: add ts-offset to timestamp
Add the ts-offset to the buffer timestamp to get the final output timestamp of
the buffer.
2010-02-12 17:22:55 +01:00
Wim Taymans
74a3be350d rtpbin: do more accurate buffer offsets
Return the next timestamp in the jitterbuffer.
Use the min-timestamp of the jitterbuffers to calculate an offset so that the
next timestamp is pushed with a timestamp equal to running_time.
Start producing timestamps from 0 in the buffering case too.
2010-02-12 17:22:55 +01:00
Wim Taymans
3efcc0fbc1 rtpbin: only start buffering when < 100%
Only start buffering when the percentage message is < 100 %.
2010-02-12 17:22:55 +01:00
Wim Taymans
0348ebe651 rtpbin: keep track of elapsed pause time
Keep track of the time we spend pausing the jitterbuffers when they were
buffering and distribute this elapsed time to the jitterbuffers.
Also keep the latency in nanosecond precision.
2010-02-12 17:22:54 +01:00
Wim Taymans
ecf6ed8fc1 jitterbuffer: keep track of offset
Keep track of an outgoing offset that we add to each outgoing buffer to
compensate for PAUSE when buffering.
Adjust the offset when activating.
2010-02-12 17:22:54 +01:00
Wim Taymans
048e5b6fbe jitterbuffer: report level using high watermark 2010-02-12 17:22:54 +01:00
Wim Taymans
8d814f3782 rtpbin: pass running_time to jitterbuffer pause
Pass the current running time to the jitterbuffer when pausing or resuming so
that it calculate the right offsets.
Small cleanups and comments.
Set the default rtspsrc latency to 2 seconds.
2010-02-12 17:22:54 +01:00
Wim Taymans
bf697b12e3 rtpbin: add some comments 2010-02-12 17:22:53 +01:00
Wim Taymans
20a27a545a rtpbin: more buffering updates
Add signal to pause the jitterbuffer. This will be emitted from gstrtpbin when
one of the jitterbuffers is buffering.
Make rtpbin collect the buffering messages and post a new buffering message with
the min value.
Remove the stats callback from jitterbuffer but pass a percent integer to
functions that affect the buffering state of the jitterbuffer. This allows us
then to post buffering messages from outside of the jitterbuffer lock.
2010-02-12 17:22:53 +01:00
Wim Taymans
a5b9d3f917 rtpbin: propagate buffer-mode property
Propagate buffer-mode property to the jitterbuffers.
Intercept BUFFERING messages in rtpbin
2010-02-12 17:22:53 +01:00
Wim Taymans
d3db9574a9 jitterbuffer: do more buffering implementation
Add callback for buffering stats.
Configure the latency in the jitterbuffer instead of passing it with _insert.
Calculate buffering levels when pushing and popping
Post buffering messages.
2010-02-12 17:22:52 +01:00
Wim Taymans
aeacbfed3e jitterbuffer: flesh out buffering mode some more
Add a buffering state to the jitterbuffer and wait until buffering ends before
pushing out packets.
2010-02-12 17:22:52 +01:00
Wim Taymans
56b29c9a6b jitterbuffer: hook up the mode property
Expose a mode property on the jitterbuffer.
Fix the case where timestamps are -1 in the check for outgoing timestamps.
2010-02-12 17:22:52 +01:00
Wim Taymans
be4517a6b8 jitterbuffer: add buffering mode options
Add getters and setters for different buffering modes that the jitterbuffer will
support. Default to the current slave mode.
2010-02-12 17:22:52 +01:00
Robert Swain
bf9d8dbbdc flvdemux: Obtain the index from the end of an flv file in push mode
Allows for better support of seeking in flv files when in push mode
2010-02-12 16:25:44 +01:00
Robert Swain
dd23397b4f avidemux: Drop video frames up to the desired keyframe after a seek
The audio packets in AVI are generally muxed ~0.5s before the
corresponding video packet. This changes causes downstream to only
receive packets with roughly corresponding timestamps.
2010-02-12 15:56:18 +01:00
Wim Taymans
1175d0698c avidemux: more DISCONT handling
Add some debug in the DISCONT handling code.
When we receive a DISCONT in push mode, mark all streams as DISCONT.
2010-02-12 15:56:18 +01:00
Robert Swain
0011c9b0da avidemux: Fix _handle_seek_push () and new segement behaviour 2010-02-12 15:56:18 +01:00
Wim Taymans
2ce79998a1 avidemux: cleanups
Make sure we reset the demuxer correctly wrt parsing the index.
Don't leak pending seek events.
Rename some methods to reflect what they do and to avoid confusion with similar
method names.
Try to make the seeking threadsafe by protecting the setup code with a lock.
Make sure we post errors when a seek fails.
2010-02-12 15:56:18 +01:00
Wim Taymans
e6cc145352 avidemux: rename some variables
seek_event -> seg_event
event_seek -> seek_event
2010-02-12 15:56:18 +01:00