Commit graph

7220 commits

Author SHA1 Message Date
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
Mathieu Duponchelle 8db40a8c7f videomixer: Add colorspace conversion
https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:37:23 +02:00
Mathieu Duponchelle 707e39fe7a videomixer: Don't send reconfigure event when formats or PAR are different
It is racy with multiple pads.

https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:36:48 +02:00
Mathieu Duponchelle 8db3648544 videomixer: Bundle private copies of videoconvert code
Ideally, this would be part of libgstvideo.
Prefixes videoconvert symbols with videomixer_.

https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:36:30 +02:00
Wim Taymans 9f9bcbc405 rtspsrc: only wait if we flushed
Only wait for the STREAM_LOCK when we flushed something when sending
a command for PAUSED or PLAYING.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707611
2013-09-09 15:13:46 +02:00
Wim Taymans 7b2e002879 rtspsrc: return when a flush was issued
Make gst_rtspsrc_loop_send_cmd() return TRUE when the current
action has been flushed
2013-09-09 15:13:46 +02:00
David Holroyd a956a6ceb2 rtp: add L24 pay and depayloader
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707734
2013-09-09 15:13:46 +02:00
Matej Knopp a5ceab82dd matroskademux: fix leaking buffer and caps
https://bugzilla.gnome.org/show_bug.cgi?id=707688
2013-09-07 15:50:36 +01:00
Tim-Philipp Müller 60e72b0254 udpsrc: fix build on win32
gstudpsrc.c:855:15: error: #if with no expression
2013-09-05 19:46:37 +01:00
Wim Taymans 5d2ff288b3 avidemux: handle unseekable streams
Handle streams that we can't seek in and ignore them in the
seek logic.
2013-09-04 15:53:05 +02:00
Wim Taymans 6f0e8a8b87 avidemux: only check video compression for video streams
Or else we might deref a stream with a NULL strf.vids and segfault
2013-09-04 15:53:05 +02:00
Alex Ashley a965185dee qtdemux: Add support for the avc3 sample entry format of the AVC file format
Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new
structure for fragmented MP4 called "avc3". The principal difference
between AVC1 and AVC3 is the location of the codec initialisation
data (e.g. SPS, PPS). In AVC1 this data is placed in the initial
MOOV box (moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data
goes in the first sample of every fragment (i.e. the first sample in
each mdat box).  The principal reason for avc3 is to make it easier
for client implementations, because it removes the requirement to
insert the SPS+PPS in to the decoder pipeline every time there is a
representation change.

This commit adds support for the "avc3" atom, which is almost identical
to the "avc1" atom, except it does not contain any SPS or PPS data.

https://bugzilla.gnome.org/show_bug.cgi?id=702004
2013-09-04 13:33:22 +02:00
Mathieu Duponchelle b68f419b6f videomixer: Don't set EOS to FALSE when the collectpad *is* EOS
https://bugzilla.gnome.org/show_bug.cgi?id=707238
2013-09-04 11:09:04 +02:00
Matej Knopp 349afc633a flacparse: cleanup on error after state change
https://bugzilla.gnome.org/show_bug.cgi?id=707229
2013-09-03 18:06:18 +02:00
Sebastian Dröge 7f59436979 udpsrc: Bind to multicast addresses on non-Windows systems
On Windows it's not possible to bind to a multicast address
but the OS will make sure to filter out all packets that
arrive not for the multicast address the socket joined.

On Linux and others it is necessary to bind to a multicast
address to let the OS filter out all packets that are received
on the same port but for different addresses than the multicast
address

And deprecate the multicast-group property and replace it with the
address property.

https://bugzilla.gnome.org/show_bug.cgi?id=707042
2013-09-03 11:23:24 +02:00
Matej Knopp 73751dbbe7 flacparse: Free GstBaseParseFrame if pushing a header failed 2013-09-03 10:10:49 +02:00
Sebastian Dröge edf6d28765 udpsrc: Refactor address resolval into its own function 2013-09-03 10:10:49 +02:00
Tim-Philipp Müller 966f848edb replaygain: fix taglist leak in rganalysis
And add some FIXMEs.
2013-09-02 23:00:29 +01:00
Sebastian Dröge 1971c43279 flacparse: Properly propagate downstream flow returns upstream
https://bugzilla.gnome.org/show_bug.cgi?id=707229
2013-09-02 11:56:33 +02:00
Tim-Philipp Müller 1dfc1f2686 Don't use setlocale in plugins()
Only apps should call setlocale(), not libraries.
2013-09-01 21:18:38 +01:00
Wim Taymans d851b8a8b4 rtpmpvpay: Fix RTP buffer allocation in rtpmpvpay
RTP buffer allocation should not be done with padding for the specific MPEG2
header as the padding is done at the end of the buffer and the last byte is
the size of the padding.

https://bugzilla.gnome.org/show_bug.cgi?id=706970
2013-08-29 13:15:15 +02:00
Bernhard Miller f7528d274b autovideosink: add sync property
https://bugzilla.gnome.org/show_bug.cgi?id=706955
2013-08-29 12:23:24 +02:00
Bernhard Miller 2fa68fce07 autoaudiosink: introduce sync property
https://bugzilla.gnome.org/show_bug.cgi?id=706955
2013-08-29 12:23:23 +02:00
Thiago Santos 9549289a18 qtdemux: push buffers after segment stop until reaching a keyframe
This should make decoders able to precisely push buffers until the stop
time in case they need the next keyframe to do it.

Also, according to gst_segment_clip, it should only push a buffer that
the starting ts is strictly smaller than the segment stop, so we change
the min < comparison for <=
2013-08-28 12:58:56 -03:00
Sebastian Dröge 76293efd72 Release 1.1.4 2013-08-28 12:52:25 +02:00
Wim Taymans 2a8566ddec matroska-mux: remove framerate restriction
Remove the framerate restriction on the caps.
2013-08-27 15:25:16 +02:00
Wim Taymans f1106cde66 session: only update next check time when reconsidering
Don't update the next RTCP check time in all cases but only when we
reconsidered. This avoids delaying sending a full RTCP packet when we
are doing early feedback.
2013-08-27 09:55:52 +02:00
Wim Taymans 47065db0b6 session: add more debug 2013-08-27 09:55:52 +02:00
Wim Taymans 454d75951e jitterbuffer: fix types of the retransmission event 2013-08-27 09:55:52 +02:00
Wim Taymans dd4af0d11c jitterbuffer: only timeout EXPECTED timers on gap
Only timeout the EXPECTED timers when we detect a large seqnum gap.
2013-08-27 09:44:18 +02:00
Wim Taymans 4b7bcc2ec1 rtsession: fix locking
We need to take the session lock when getting and manipulating the
source.
2013-08-26 11:50:27 +02:00
Wim Taymans 3f46527f75 rtpsession: add some more debug 2013-08-26 11:50:13 +02:00
Mathieu Duponchelle 5d21f8f2e3 videomixer: don't send flush_stop twice.
If we get flush start and a seek we need to only send flush_stop once.

More info at #706441
2013-08-23 20:17:11 -04:00
Tim-Philipp Müller 9b0bcc01a0 multipartdemux: propagate discont 2013-08-23 15:57:46 +01:00
Tim-Philipp Müller c3af414cbf multipartdemux: remove dynamic sourcpads when going from PAUSED to READY 2013-08-23 15:57:46 +01:00
Tim-Philipp Müller 7d78a68c8d multipartdemux: timestamp output buffers based on first input buffer that provided bytes not last
https://bugzilla.gnome.org/show_bug.cgi?id=637754
2013-08-23 15:57:46 +01:00
Wim Taymans 54e7e7547a rtxqueue: add property to configure queue size 2013-08-23 15:47:25 +02:00
Wim Taymans 84833bed11 rtpbin: proxy jitterbuffer do-retransmission property 2013-08-23 12:10:19 +02:00
Michael Olbrich 23d4044e2c avimux: unmap the correct buffer
The audio buffer was mapped so unmap it and not the video buffer

https://bugzilla.gnome.org/show_bug.cgi?id=706642
2013-08-23 11:32:52 +02:00
Wim Taymans 89b9019e3e rtx: various improvements
Use locking
Don't push from the event handler, collected packets in a queue and push from
the chain function.
Clear queues on shutdown.
2013-08-21 17:02:27 +02:00
Wim Taymans ee15bc9284 session: generate events correctly
Do correct shifting of the bitmask for lost packets.
2013-08-21 17:02:27 +02:00
Wim Taymans 67523d3ecb rtp: register rtx element better 2013-08-21 17:02:26 +02:00
Wim Taymans f626e29897 jpegdepay: add some more debug 2013-08-21 12:56:35 +02:00
Wim Taymans 77ed44a88a rtpgstdepay: only push events when they changed
Keep track of the STREAM_START and TAG events and only push them
when they changed.
2013-08-21 12:10:00 +02:00
Wim Taymans b144809b7c rtpgstpay: taglists should not be merged in 1.0 2013-08-21 10:52:59 +02:00
Wim Taymans 69b0dcd7df rtpgstdepay: flush on FLUSH_STOP event 2013-08-21 10:28:50 +02:00
Wim Taymans 5ff9093843 rtpgstpay: reset on state change
Do full reset on state change to READY
2013-08-21 10:03:52 +02:00
Wim Taymans ae9239aac7 rtpgstpay: reset on FLUSH_STOP
Clear the adapter and pending buffer list on FLUSH_STOP.
2013-08-21 09:55:20 +02:00
Wim Taymans 2e8955df39 rtpgstpay: don't use clock for config interval
We can't use the clock to time our config-interval because we are not
live (or there might not be a clock or the clock might not be running).
Instead just simply take the timestamp diff.
2013-08-21 09:39:30 +02:00
Wim Taymans 182f96ff79 rtpgstay: don't use // comments 2013-08-21 09:33:04 +02:00
Youness Alaoui e22f7e91c4 rtspsrc: Fix response argument in handle-request signal 2013-08-21 09:06:02 +02:00
Youness Alaoui 6636efd31a rtspsrc: Add sdes property and proxy it to rtpbin 2013-08-21 09:06:02 +02:00
Youness Alaoui 62a6f58697 Send a stream-start whenever we send tags
This is to make sure tags are cleared on the client if the
stream-start was previously lost, otherwise, the client may end
up with a merged taglist of multiple songs
2013-08-21 09:06:01 +02:00
Youness Alaoui 05bcfee5a3 rtpgstpay: Add a config-interval property to resend the caps/tags at a regular interval
This is useful in case the packet containing the inlined caps was lost
or if new client joins an already running RTP stream and they missed
the previous tag events.
This also makes the payloader keep a list of merged tags so the retransmitted
tag event contains all previously received. A STREAM_START event will
flush the list of tags.
2013-08-21 09:06:01 +02:00
Youness Alaoui 1f4ca28868 rtpgstpay: Refactor the setcaps and use new method to send arbitrary caps at any time 2013-08-21 09:06:01 +02:00
Youness Alaoui 9257409613 rtpgstpay: Do not flush events for stream-start and avoid conflict between event and pending inline caps 2013-08-21 09:06:01 +02:00
Youness Alaoui 2d53289b6b rtpgstpay: Add a create_from_adapter API and use a list of GstBufferList
This is necessary to fix event/caps sending. If we send a STREAM_START
packet, it will cause an error because the stream didn't receive its
caps and new-segment events, so we must wait for the first buffer before
sending the stream-start event buffer. However, the caps will be sent
at the same time and so the 'inline caps' will be set for the event.
We need to be able to payload individual packets (data, caps or events)
and only send them when we call flush.
2013-08-21 09:06:01 +02:00
Youness Alaoui 0070ba76f2 rtpgstpay: Add etype=4 for payloading GST_EVENT_STREAM_START 2013-08-21 09:06:01 +02:00
Youness Alaoui 6155b27971 rtpgstpay: Fix typo, GST_EVENT_CUSTOM_BOTH has etype of 3 2013-08-21 09:06:01 +02:00
Wim Taymans 587dc055e9 jitterbuffer: handle EOS
When the queue is empty, and we received EOS, pause and push an EOS
event downstream.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=706387
2013-08-20 14:36:59 +02:00
Wim Taymans 533f26fc99 jitterbuffer: update docs 2013-08-20 10:26:15 +02:00
Wim Taymans c7f9ef8012 jitterbuffer: update all timers
Keep looping over all registered timers so that we can mark them lost instead of
stopping as soon as we find the timer for the current seqnum.
2013-08-20 10:25:17 +02:00
Wim Taymans 5debda9ca1 jitterbuffer: remove unused variables 2013-08-20 08:55:50 +02:00
Wim Taymans a88db5fa2c jitterbuffer: reorganize timer handling
Restructure handling of incomming packet and the gap with the expected seqnum
and register all timers from the _chain function.
Convert a timer to a LOST packet timer when the max amount of retransmission
requests has been reached.
2013-08-19 22:04:51 +02:00
Wim Taymans d9d6eac4bb jitterbuffer: refactor packet spacing calculation 2013-08-19 22:04:50 +02:00