Commit graph

7184 commits

Author SHA1 Message Date
Wim Taymans cba4e6a707 rtpjitterbuffer: unlock only once 2013-09-23 14:45:24 +02:00
Wim Taymans 5dc207948c rtpjitterbuffer: improve flush and shutdown
There is no need to unschedule the timer in flush-start, flush-stop will remove
the timers and unschedule.
Unschedule the current timer before attempting to join the timer thread.
2013-09-23 14:45:23 +02:00
Wim Taymans a512cc2d3c rtpjitterbuffer: set correct expected time
When we already have a timer for a packet, skip it but don't forget to adjust
the dts to the expected dts of the next packet.
2013-09-23 14:45:23 +02:00
Wim Taymans 517ea0f4d9 jitterbuffer: improve debug 2013-09-23 14:45:23 +02:00
Wim Taymans c395bf62dd alpha: use POFFSET instead of OFFSET
Use the more correct POFFSET macro to get the offset of a component in its
plane. The offset macro gives the offset of the component relative to the start
of the frame.
2013-09-23 14:45:23 +02:00
Sebastian Dröge 94ad6724ba goom: Fix MMX assembly compilation with clang
clang does not want or need a clobber list for emms:
error: clobbers must be last on the x87 stack

Patch taken from the FreeBSD ports, provided by
Dan McGregor <dan.mcgregor@usask.ca>
2013-09-21 18:48:19 +02:00
Sebastian Dröge d8841b4832 matroska-demux: Make sure that subtitle buffers are \0-terminated
https://bugzilla.gnome.org/show_bug.cgi?id=707933
2013-09-20 10:22:40 +02:00
Andoni Morales Alastruey cfefdaebb6 qtmux: handle issues correctly when downstream is not seekable
The streamable property only make sense for fragmented formats.
For regular MP4, when downstream is not seekable we can't rewrite
the headers, so qtmux can only work with fast-start=TRUE, where
the headers are written finishing the file.
For fragmented MP4, when streamable is not seekable and the streamable
property is FALSE, we must enforce streamable=TRUE warning the user
about this change

https://bugzilla.gnome.org/show_bug.cgi?id=707242
2013-09-20 10:09:48 +02:00
Andoni Morales Alastruey 9ae5082204 qtmux: make "streamable" TRUE as default
The most common use case for fragmented MP4 (Dash and Smooth Streaming)
is producing streamable content (even for VOD). streamable=FALSE would only
be used to generate fragmented MP4 with and index of MOOF's that could
be reproduced without a playlist/manifest
https://bugzilla.gnome.org/show_bug.cgi?id=707242
2013-09-20 10:09:48 +02:00
Andoni Morales Alastruey 5732684e18 qtmux: deprecate the streamable property for non-fragmented MP4
The streamable property only makes sense for fragmented MP4.
https://bugzilla.gnome.org/show_bug.cgi?id=707242
2013-09-20 10:09:48 +02:00
Wim Taymans 926e2fa93b alpha: don't assume planar formats have just 1 block
Don't assume planar formats have just one memory block with the data but use the
macros to access the right memory block where a component can be found.
2013-09-19 16:50:44 +02:00
Wim Taymans fd6c57cf10 rtpjitterbuffer: keep delay as a separate variable in timer
Keep a separate delay in the timer so that we still know the original timestamp
of the packet that this timer refers to. We can then place the correct
running-time in the Retransmission event.
2013-09-19 14:32:48 +02:00
Wim Taymans d34184dd03 rtpjitterbuffer: fix writability of properties 2013-09-19 14:32:48 +02:00
Wim Taymans 6bb2626498 rtpjitterbuffer: reevaluate the current timer after timeout
When we trigger the timeout logic of a timer, reevaluate it because it is
possible that it still has the lowest timeout.
2013-09-18 16:33:40 +02:00
Wim Taymans 8d021b6ede rtpjitterbuffer: don't update time when unscheduled
Don't try to estimate the current time when we got unscheduled.
2013-09-18 16:31:26 +02:00
Wim Taymans 65606a25bf rtpjitterbuffer: init packet spacing on first buffer
Already init the packet spacing variables on the first buffer so that we can
calculate the spacing on the second buffer already.
2013-09-18 16:29:37 +02:00
Wim Taymans f2efdf28f5 rtpjitterbuffer: push the lost event from the timer thread
Instead of pushing the lost event from the chain function, schedule a timeout
that will push the lost event from the timer thread. This avoid blocking the
upstream thread while we push and sync the event.
2013-09-18 14:57:09 +02:00
Wim Taymans 5d5fc03e04 rtpjitterbuffer: round gap duration to multiple of duration
Make sure the gap duration in the lost event is a multiple of the packet
duration.
Enable another test.
2013-09-18 14:12:47 +02:00
Wim Taymans 6e4a051d40 rtpjitterbuffer: keep track of duration
Keep track of the estimated duration of missing packets and use it in the lost
event.
Enable another unit test
2013-09-18 12:29:38 +02:00
Wim Taymans ac3bb3acf6 rtpjitterbuffer: handle large gaps with one lost event
When we have a large number of missing packets, generate one lost event for all
the packets that have no chance of being pushed out in time.
Fix and activate unit test for large gaps.
2013-09-18 11:59:28 +02:00
Wim Taymans 26402e1c21 rtpjitterbuffer: refactor lost event sending
Also make sure we only increment the expected seqnum and last
output timestamp.
2013-09-18 11:57:06 +02:00
Wim Taymans f49981a597 jitterbuffer: refactor timeout triggers 2013-09-17 23:29:56 +02:00
Wim Taymans 047021c443 jitterbuffer: simplify the timeout code
Keep track of the current time in the timeout loop.
Loop over all timers and trigger all the expired ones, we can do this in the
same loop that selects the new best timer.
2013-09-17 23:29:56 +02:00
Wim Taymans fa1ef3328b jitterbuffer: rearrange timer update code
Also update the timers when retransmission is disabled. We need to
do this because when we added LOST timers when we detected missing packets and
we need to remove those timers when the packet finally arrives.
2013-09-17 23:29:56 +02:00
Tim-Philipp Müller 7a76595b22 videomixer: link to libm for maths stuff
Fixes undefined references to rint and pow on ubuntu
build bot.
2013-09-17 22:02:04 +01:00
Wim Taymans 232fdd8b56 jitterbuffer: release lock on shutdown 2013-09-17 15:19:42 +02:00
Matej Knopp b2982bb749 qtmux: remove MAX_TOLERATED_LATENESS
https://bugzilla.gnome.org/show_bug.cgi?id=707411
2013-09-16 11:11:12 -03:00
Wim Taymans 4de919a17a jitterbuffer: use separate thread for timeouts
Use a separate thread for scheduling the timeouts instead of using the
downstream streaming thread that might block at any time.
2013-09-16 15:55:55 +02:00
Matej Knopp b363832c2c qtmux: set first_ts to DTS for streams that have DTS
https://bugzilla.gnome.org/show_bug.cgi?id=707340
2013-09-16 12:14:00 +02:00
Matej Knopp 39f7e52266 qtmux: make sure duration is a valid number for last buffer
https://bugzilla.gnome.org/show_bug.cgi?id=707340
2013-09-16 12:14:00 +02:00
Matej Knopp 4e3c13c87c qtmux: use segment.start or last buffer end time in case of missing DTS
https://bugzilla.gnome.org/show_bug.cgi?id=707340
2013-09-16 12:14:00 +02:00
Matej Knopp 85728c04c4 Revert qtmux: Use buffer PTS if DTS is not set"
This reverts commit f72c3cf71fde622067f41f31a53978ba4c94469d.

https://bugzilla.gnome.org/show_bug.cgi?id=707340
2013-09-16 12:13:54 +02:00
Sebastian Dröge d646a34681 videomixer: Update orc generated files
https://bugzilla.gnome.org/show_bug.cgi?id=708131
2013-09-16 11:03:06 +02:00
Olivier Crête b9ceafe5af rtpsession: Demux RTCP buffers from the RTP stream
If there are RTCP buffers in the RTP stream, process them as
RTCP. This way, we want receive streams following RFC 5761

https://bugzilla.gnome.org/show_bug.cgi?id=687657
2013-09-13 16:25:49 +02:00
Jan Schmidt 299d3f5c42 rtp: Remove bogus extra caps from L24 template.
The extra caps entry in the template was making it sometimes
get plugged for any dynamically allocated payload type.
2013-09-13 23:27:49 +10:00
Wim Taymans 28e5f90988 rtpbin: use PacketInfo for the sender
Avoid mapping the packet multiple times when sending RTP.
2013-09-13 14:34:28 +02:00
Wim Taymans a02c9473d8 rtpbin: store more in the PacketInfo
Store all info in the PacketInfo so that we can avoid mapping the packet
multiple times.
2013-09-13 14:34:28 +02:00
Wim Taymans e5c789abd6 session: store more in the PacketInfo structure 2013-09-13 14:34:28 +02:00
Wim Taymans 47662f9ca4 rtpbin: RTPArrivalStats -> RTPPacketInfo
Rename a structure because we are also going to use this for the sender
bits.
2013-09-13 14:34:28 +02:00
Wim Taymans c795b72988 source: small cleanups 2013-09-13 14:34:27 +02:00
Thiago Santos 566b0dce40 qtdemux: only update stop position if seek requests it
Check for GST_SEEK_TYPE_NONE for stop poistion and only update
the stop time if it is requested. Otherwise just maintain whatever
was stored at the segment

https://bugzilla.gnome.org/show_bug.cgi?id=707530
2013-09-13 09:21:12 -03:00
Rico Tzschichholz 8ed1ff6821 rtp: Add missing headers tp fix make dist
In addition to a956a6ceb2
2013-09-13 14:06:13 +02:00
Sebastian Dröge b95ddd55cd flacparse: Make sure we have enough data to read image tags
Thanks to iputinei for reporting this on IRC.
2013-09-12 15:39:51 +02:00
Wim Taymans 9f9ba21404 jitterbuffer: handle segments with non-0 start
We keep the DTS and PTS in running-time inside the jitterbuffer. Make sure to
transform it back to a buffer timestamp before pushing out the buffer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707931
2013-09-12 15:04:30 +02:00
Seán de Búrca 9d3dbd6581 matroskademux: Fix off-by-one in validation of UTF-8
https://bugzilla.gnome.org/show_bug.cgi?id=707933
2013-09-12 09:19:15 +02:00
Thibault Saunier 9f4a8ccdf4 videomixer: Do not check if caps are empty when they are NULL
In the case the caps are actually NULL, we should just concider it the
same way as empty caps in that case.
2013-09-11 14:33:31 -03:00
Seán de Búrca 268058eb37 videomixer: fix build if orc is not installed
https://bugzilla.gnome.org/show_bug.cgi?id=707886
2013-09-11 00:17:44 +01:00
Thiago Santos 193ce9110e matroskademux: Preserve seqnum when pushing seek upstream
After converting a seek from time to bytes, use the same seqnum
on the event that goes upstream
2013-09-10 17:57:49 -03:00
Thiago Santos be0eeae491 qtdemux: track streams that are EOS on push mode to finish earlier
When the segment has a defined stop position, qtdemux should check
when streams reach this position and mark those as EOS. When all
streams are EOS it will return GST_FLOW_EOS to upstream to allow
the pipeline to finish instead of continuously consume buffers
from upstream that are not useful for the segment.

https://bugzilla.gnome.org/show_bug.cgi?id=707530
2013-09-10 16:43:17 -03:00
Thiago Santos 33cf8b679d qtdemux: preserve stop of segment when doing seeks in push mode
When handling seeks in push mode, qtdemux converts the seek to bytes
and pushes upstream. It needs to keep track of the seek and the
subsequent segment to be able to map them back to the requested
seek time and properly preserve the segment stop of the seek.

This is done by using the start offset in bytes of the seek,
that should be the same of the segment from upstream. And this
is also backwards compatible with what qtdemux already was using.

https://bugzilla.gnome.org/show_bug.cgi?id=707530
2013-09-10 16:42:36 -03:00