Commit graph

9255 commits

Author SHA1 Message Date
Sebastian Dröge
5d4c71d76e matroskademux: Fix cluster searching if we search multiple times in one chunk
After finding a cluster id in the byte reader, we skip ahead the reader
position by one further byte to be able to continue searching from there
inside the same chunk if the cluster candidate was a false positive.

We have to accomodate for that additional byte when resuming the search,
otherwise all following pulls are off-by-one for every resume and we run
into an assertion.
2016-11-22 20:24:59 +02:00
Sebastian Dröge
c0da05df38 matroska: Add size checks to the parsing of FLAC headers 2016-11-22 20:02:42 +02:00
Matthew Waters
fec77de8cb flxdec: fix some warnings comparing unsigned < 0
bf43f44fcf was comparing an unsigned
expression to be < 0 which was always false.

gstflxdec.c: In function ‘flx_decode_brun’:
gstflxdec.c:322:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
         if ((glong) row - count < 0) {
                                 ^
gstflxdec.c:332:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
         if ((glong) row - count < 0) {
                                 ^

https://bugzilla.gnome.org/show_bug.cgi?id=774834
2016-11-22 23:49:18 +11:00
Vivia Nikolaidou
91de259b74 qtmux: Enable up to 16 unpositioned raw audio channels
https://bugzilla.gnome.org/show_bug.cgi?id=774789
2016-11-22 14:05:35 +02:00
Matthew Waters
bf43f44fcf flxdec: add some write bounds checking
Without checking the bounds of the frame we are writing into, we can
write off the end of the destination buffer.

https://scarybeastsecurity.blogspot.dk/2016/11/0day-exploit-advancing-exploitation.html

https://bugzilla.gnome.org/show_bug.cgi?id=774834
2016-11-22 22:42:41 +11:00
David Evans
45843ab9a2 qtdemux: Be sure not to read off end of FLAC dfLa box
https://bugzilla.gnome.org/show_bug.cgi?id=773712
2016-11-21 17:51:14 +02:00
Nicola Murino
0ef3a71b89 matroskademux: add support for skipping invalid data in push mode
https://bugzilla.gnome.org/show_bug.cgi?id=774566
2016-11-21 13:38:08 +02:00
Nicola Murino
20ed9e8237 matroskaparse: add support for skipping invalid data
https://bugzilla.gnome.org/show_bug.cgi?id=774566
2016-11-21 13:38:08 +02:00
Sebastian Dröge
058ab0df1d rtspsrc: Move to new helper function to parse authentication responses
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:40:08 +02:00
christophecvr
fc3022da1c qtdemux: Fix wrong compiler warning with gcc 6.2
| ../../../git/gst/isomp4/qtdemux.c: In function 'qtdemux_parse_tree':
| ../../../git/gst/isomp4/qtdemux.c:10224:24: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|                  offset += size;
|                         ^~
| ../../../git/gst/isomp4/qtdemux.c:10197:25: note: 'size' was declared here
|                  guint32 size, tag;
|                          ^~~~

https://bugzilla.gnome.org/show_bug.cgi?id=774747
2016-11-21 09:33:05 +02:00
Sebastian Dröge
b8265e95a7 avidemux: Ensure that raw video have properly aligned buffers
That is, aligned to to 32 bytes for video. Fixes crashes if the raw
buffers are passed to SIMD processing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=774428
2016-11-20 13:14:08 +02:00
Sebastian Dröge
bb35f15d44 qtdemux: Ensure that raw audio and video have properly aligned buffers
That is, aligned to the basic type for audio and to 32 bytes for video.
Fixes crashes if the raw buffers are passed to SIMD processing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=774428
2016-11-20 13:08:27 +02:00
Sebastian Dröge
7fb278d7d2 qtmux: Always write edit lists for the tracks to give a more accurate duration
Always write an edit list for the whole track. In general this is not
necessary except for the case of having a gap or DTS adjustment but
it allows to give the whole track's duration in the usually more
accurate media timescale.

https://bugzilla.gnome.org/show_bug.cgi?id=774403
2016-11-19 13:53:34 +02:00
Seungha Yang
7d2a07076e qtdemux: Remove useless return variable
qtdemux_expose_streams() returns flow error immediately, if there is an error.
So, the variable for the flow return is not needed.

https://bugzilla.gnome.org/show_bug.cgi?id=774674
2016-11-18 18:05:23 +02:00
David Evans
2ad30254c3 qtdemux: Add support for FLAC encapsulated in ISOBMFF
As defined by
https://git.xiph.org/?p=flac.git;a=blob_plain;f=doc/isoflac.txt

https://bugzilla.gnome.org/show_bug.cgi?id=773712
2016-11-18 18:03:30 +02:00
Sebastian Dröge
15630db146 rtpmux: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:45 +02:00
Sebastian Dröge
a9b1aa1255 monoscope: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:45 +02:00
Sebastian Dröge
858d9f9706 deinterlace: Mark pad as needing reconfiguration again if reconfiguration failed
And consider negotiation failures on flushing pads as FLUSHING, not as
NOT_NEGOTIATED.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:45 +02:00
Vinod Kesti
11fd0e6120 splitmuxsink: pad request fails for flvmux
splitmuxsink requests pad from element using pad template like "video_%u", "audio_%u" and "sink_%d". This is true for most of the muxers.
But splitmuxsink not able to request pad to flvmux as flvmux has "audio" and "video" as pad templates.
fix: splitmuxsink should fallback to "audio" and  "video" when template not found.

https://bugzilla.gnome.org/show_bug.cgi?id=774507
2016-11-17 23:19:44 +11:00
Sebastian Dröge
28995f3527 matroskaparse: Add remaining relevant parts from a3a55305 to the parser
https://bugzilla.gnome.org/show_bug.cgi?id=774566
2016-11-17 10:24:28 +02:00
Nicola Murino
7627171566 matroskaparse: ignore parsing errors at the end of the file
This is the same change as a3a55305 for the parser.

https://bugzilla.gnome.org/show_bug.cgi?id=774566
2016-11-17 10:20:56 +02:00
Philippe Normand
dcd3ce9751 rtpbin: receive bundle support
A new signal named on-bundled-ssrc is provided and can be
used by the application to redirect a stream to a different
GstRtpSession or to keep the RTX stream grouped within the
GstRtpSession of the same media type.

https://bugzilla.gnome.org/show_bug.cgi?id=772740
2016-11-16 08:56:34 +01:00
Vinod Kesti
f1726c7088 aacparse: assertion while converting ADTS stream to RAW
aacparse resizes input buffer while converting ADTS stream to RAW,
During buffer resize buffer write permission is not checked.
This throws gst_buffer_is_writable assertion and leads to AV sync issue some times.
It is corrected by making buffer writeable using gst_buffer_make_writable

https://bugzilla.gnome.org/show_bug.cgi?id=774129
2016-11-15 14:57:22 +02:00
Seungha Yang
e5b3d9257d qtdemux: Don't modify upstream TIME segment
TIME segment implies that stream/running time is being handled by upstream.
So, we shouldn't override it without any clue.
This patch is for fixing seek in DASH streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=774196
2016-11-15 14:46:34 +02:00
Sebastian Dröge
4f426f6f54 deinterleave: Reset caps accumulator to ANY when resyncing the adapter, not EMPTY
The accumulator is filled by intersecting with all the pad caps, as such
it must be initialized with ANY (like it is before the iteration is
started) and not to EMPTY.

Fixes the CAPS query always returning EMPTY caps when resyncing happened
during the query, e.g. because pads were added/removed.
2016-11-14 17:37:51 +02:00
Petr Kulhavy
89ad2de93e udpsrc: remove redundant saddr unref
The g_object_unref (saddr) before receiving message seems to be redundant as it
is done just before jumping to retry

Though not directly related, part of
https://bugzilla.gnome.org/show_bug.cgi?id=772841
2016-11-14 15:26:13 +02:00
Petr Kulhavy
1fc572d740 udpsrc: receive control messages only in multicast
Control messages are used only in multicast mode - to detect if the destination
address is not ours and possibly drop the packet. However in non-multicast
modes the messages are still allocated and freed even if not used. Therefore
request control messages from g_socket_receive_message() only in multicast
mode.

https://bugzilla.gnome.org/show_bug.cgi?id=772841
2016-11-14 11:05:04 +02:00
Scott D Phillips
55297bdbad Use intermediate guint when handling GstVideoMultiviewFlags
The underlying integer type of the enum GstVideoMultiviewFlags is
implementation defined and may not have the same size as guint.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:52:24 +02:00
Scott D Phillips
70e1d1bcd4 splitfilesrc: update uri_get_type to match the prototype in GstURIHandlerInterface
https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:52:24 +02:00
Vincent Penquerc'h
adeee44b07 flacparse: fix header rewriting being ignored
https://bugzilla.gnome.org/show_bug.cgi?id=727802
2016-11-10 12:51:08 +00:00
Sean DuBois
2f707370d4 flvmux: Add metadatacreator property
Allow users to set metadatacreator value in the meta packet

https://bugzilla.gnome.org/show_bug.cgi?id=774131
2016-11-10 13:11:05 +02:00
Vivia Nikolaidou
bbd4dd2fb1 splitmuxsink: Use first buffer TS as mux start time
Do not use last buffer TS + buffer duration because buffer duration
might be inaccurate, especially for frame rates like 30fps where a
rounding error is observed.

https://bugzilla.gnome.org/show_bug.cgi?id=773785
2016-11-08 21:09:12 +11:00
Havard Graff
1a4393fb4d rtpjitterbuffer: fix timer-reuse bug
When doing rtx, the jitterbuffer will always add an rtx-timer for the next
sequence number.

In the case of the packet corresponding to that sequence number arriving,
that same timer will be reused, and simply moved on to wait for the
following sequence number etc.

Once an rtx-timer expires (after all retries), it will be rescheduled as
a lost-timer instead for the same sequence number.

Now, if this particular sequence-number now arrives (after the timer has
become a lost-timer), the reuse mechanism *should* now set a new
rtx-timer for the next sequence number, but the bug is that it does
not change the timer-type, and hence schedules a lost-timer for that
following sequence number, with the result that you will have a very
early lost-event for a packet that might still arrive, and you will
never be able to send any rtx for this packet.

Found by Erlend Graff - erlend@pexip.com

https://bugzilla.gnome.org/show_bug.cgi?id=773891
2016-11-04 16:56:56 +02:00
Havard Graff
fb9c75db36 rtpjitterbuffer: fix lost-event using dts instead of pts
The lost-event was using a different time-domain (dts) than the outgoing
buffers (pts). Given certain network-conditions these two would become
sufficiently different and the lost-event contained timestamp/duration
that was really wrong. As an example GstAudioDecoder could produce
a stream that jumps back and forth in time after receiving a lost-event.

The previous behavior calculated the pts (based on the rtptime) inside the
rtp_jitter_buffer_insert function, but now this functionality has been
refactored into a new function rtp_jitter_buffer_calculate_pts that is
called much earlier in the _chain function to make pts available to
various calculations that wrongly used dts previously
(like the lost-event).

There are however two calculations where using dts is the right thing to
do: calculating the receive-jitter and the rtx-round-trip-time, where the
arrival time of the buffer from the network is the right metric
(and is what dts in fact is today).

The patch also adds two tests regarding B-frames or the
“rtptime-going-backwards”-scenario, as there were some concerns that this
patch might break this behavior (which the tests shows it does not).
2016-11-04 16:51:20 +02:00
Havard Graff
bea35f97c8 rtpjitterbuffer: fix bug in reschedule_timer
The new timeout is always going to be (timeout + delay), however, the
old behavior compared the current timeout to just (timeout), basically
being (delay) off.

This would happen if rtx-delay == rtx-retry-timeout, with the result that
a second rtx attempt for any buffers would be scheduled immediately instead
of after rtx-delay ms.

Simply calculate (new_timeout = timeout + delay) and then use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=773905
2016-11-04 16:40:14 +02:00
Sebastian Dröge
aecc31ab7b wavparse: Don't set caps to NULL after setting them on the srcpad
We would like to check later on EOS if we found a known stream type or
not, to possibly post an error message.

https://bugzilla.gnome.org/show_bug.cgi?id=773861
2016-11-03 12:34:51 +02:00
Sebastian Dröge
09c4cc55f2 qtmux: Don't deref NULL pads in debug output
That tends to crash.
2016-11-02 14:33:28 +02:00
Jan Schmidt
324cc4dc4a isomp4: Don't use gst_video_colorimetry_to_string_full()
The API was reverted. Just use the plain
gst_video_colorimetry_to_string() function.
2016-11-02 11:46:07 +11:00
Jan Schmidt
8ff5dd8029 splitmuxsink: Fix GObject warnings on shutdown.
Commit 83e718 added a pad template to splitmux request
pads, which means that GstElement now releases the pads on
dispose, but after having removed all elements in the bin
and unlinked them. Make sure we can handle cleanup in that case
without throwing assertions.

https://bugzilla.gnome.org/show_bug.cgi?id=773784
2016-11-02 11:02:12 +11:00
Jan Schmidt
afc440e906 splitmuxsrc: Store seek seqnum and send it on EOS / segment events.
GES relies on the EOS event having the seqnum of the seek that
caused it.
2016-11-02 11:02:12 +11:00
Jan Schmidt
f609986c34 splitmuxsrc: Forward a not-linked error on the bus
Handle not-linked as for other fatal errors and post it
onto the bus so the app knows
2016-11-02 11:02:12 +11:00
Sebastian Dröge
68b0441a5e qtdemux: Fix compiler warning
qtdemux.c: In function ‘qtdemux_parse_tree’:
qtdemux.c:10139:16: error: ‘color_table_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (color_table_id != 0) {
                ^
qtdemux.c:10121:19: note: ‘color_table_id’ was declared here
           guint16 color_table_id;
                   ^~~~~~~~~~~~~~
2016-11-01 21:00:15 +02:00
Sebastian Dröge
c709abbb99 qtmux: Use a default interleave of 250ms for all codecs
https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
4eaf5ea062 qtmux: Use a default interleave when ProRes is used
The ProRes guidelines suggest an interleave of 0.5s is common, but
specifies that for ProRes at most 2MB (for SD) and 4MB (for HD) should
be used per chunk.

It might also make sense to use similar numbers in general.

https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
c2225781bb qtmux: Allow configuring the interleave size in bytes/time
Previously we were switching from one chunk to another on every single
buffer. This wastes some space in the headers and, depending on the
software, might depend in more reads (e.g. if the software is reading
multiple samples in one go if they're in the same chunk).

The ProRes guidelines suggest an interleave of 0.5s is common, but
specifies that for ProRes at most 2MB (for SD) and 4MB (for HD) should
be used per chunk. This will be handled in a follow-up commit.

https://bugzilla.gnome.org/show_bug.cgi?id=773217
2016-11-01 20:41:22 +02:00
Sebastian Dröge
cba6cc4fd4 qtmux: Set compressor name, horizontal/vertical resolution and depth for ProRes
This is also required by some software to handle ProRes files.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
7b565475bf qt: Add support for ProRes 4444 XQ
And also 4444 in the muxer.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
a2c6921482 qtmux: Write 'clap' atom for ProRes
It's required for ProRes to work with other software.

It is also in the MP4 standard, but inventing values here seems a bit
tricky for the general case and it does not really give any extra
information.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
ec7f699604 qtdemux: Read colorimetry information from colr atom if available
https://bugzilla.gnome.org/show_bug.cgi?id=772181
2016-11-01 20:41:22 +02:00
Sebastian Dröge
53e436883a qtmux: Always write colr atom with the colorimetry information
https://bugzilla.gnome.org/show_bug.cgi?id=772181
2016-11-01 20:41:22 +02:00
Sebastian Dröge
0584a71123 qtmux: Fix writing of the 'fiel' extension atom
This was also wrong for JPEG2000. Also write it for all MOV files and
JPEG2000, not only for ProRes.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
b815c41b7e qtmux: Write 4 bytes of zeroes at the end of the sample description extensions
This is working around some broken software.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Sebastian Dröge
4cff5093ee atoms: 'pasp' atom is also part of MP4, write it always
https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Vivia Nikolaidou
fe38414412 qtmux: Write additional atoms for prores video
These required atoms are: colorimetry, field information, spatial/temporal
quality, and vendor.

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:41:22 +02:00
Stian Selnes
cbd13883a8 rtph263depay: Don't drop mode b packets with picture start code
Some buggy payloaders, e.g. rtph263pay, may use mode B for packets
that starts with a picture (or GOB) start code although it's not
allowed. Let's be nice and not drop these packets/frames.

https://bugzilla.gnome.org/show_bug.cgi?id=773516
2016-11-01 20:21:40 +02:00
Havard Graff
78ab8cbdcd rtph263ppay: Fix caps leak
Fix leaking caps when downstream has not-fixed caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773515
2016-11-01 20:20:47 +02:00
Stian Selnes
fca2d2f9f0 rtph263pay: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=773514
2016-11-01 20:19:43 +02:00
Stian Selnes
087ae64123 rtph263pay: Use GST_TRACE_OBJECT for logging bitstream parsing
Bump the bitstream parsing to TRACE log level so it doesn't flood the
output when trying to read the more useful DEBUG and LOG messages.

Also use GST_DEBUG_OBJECT instead of GST_DEBUG in various places

https://bugzilla.gnome.org/show_bug.cgi?id=773514
2016-11-01 20:19:15 +02:00
Stian Selnes
bcff182fd9 rtph263pay: Fix leak for B-fragments
Altough commits 6a16be7, 64f9d08 and 0c7e3a8 fixed some issues they
introduced others. This patch fixes the leak of one macroblock for every
B fragment.

Macroblock structures must not be freed immediately after finding the
boundaries as they are stored and used later. However the inital dummy
structure (used for finding the first boundary) must be freed.

CID #1212156

https://bugzilla.gnome.org/show_bug.cgi?id=773512
2016-11-01 20:18:14 +02:00
Alejandro G. Castro
6e7816c589 rtpbin: avoid generating errors when rtcp messages are empty and check the queue is not empty
Add a check to verify all the output buffers were empty for the
session in a timout and log an error.

https://bugzilla.gnome.org/show_bug.cgi?id=773269
2016-11-01 20:17:20 +02:00
Alejandro G. Castro
eeea2a7fe8 rtpbin: pipeline gets an EOS when any rtpsources byes
Instead of sending EOS when a source byes we have to wait for
all the sources to be gone, which means they already sent BYE and
were removed from the session. We now handle the EOS in the rtcp
loop checking the amount of sources in the session.

https://bugzilla.gnome.org/show_bug.cgi?id=773218
2016-11-01 20:16:18 +02:00
Matt Staples
cd71e3a8e8 rtspsrc: Also handle redirect on PLAY
https://bugzilla.gnome.org/show_bug.cgi?id=772610
2016-11-01 20:14:35 +02:00
Petr Kulhavy
5cdf66d5d2 rtspsrc: allow missing control attribute in case of a single stream
Improve RFC2326 - chapter C.3 compatibility:
In case just a single stream is specified in SDP and the control attribute
is missing do not drop the stream but rather assume "a=control:*"

https://bugzilla.gnome.org/show_bug.cgi?id=770568
2016-11-01 20:13:49 +02:00
Sebastian Dröge
e0aec317ff qtmux: Use a better default value for the movie header timescale
Take the maximum video timescale, or if no video track is present the
previous value of 1800.

https://bugzilla.gnome.org/show_bug.cgi?id=769041
2016-11-01 20:11:12 +02:00
Sebastian Dröge
727fa1c7c3 qtmux: Be more clever with the default video track timescale
Use the number of milliframes per second for integral and drop-frame
framerates, as suggested by the QT file format specification and other
places. We already did that for integral framerates before, but not for
drop-frame framerates. This now keeps precision better.

For all other framerates, check if it's close to a well-known framerate
and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=769041
2016-11-01 20:11:12 +02:00
Vincent Penquerc'h
5a889647ba qtdemux: extract interlaced information from jpeg video
This information is hidden in a small chunk of data.
Format found at https://developer.apple.com/standards/qtff-2001.pdf,
page 92, "Video Sample Description", under table 3.1.

https://bugzilla.gnome.org/show_bug.cgi?id=767771
2016-11-01 20:10:23 +02:00
Enrique Ocaña González
69fc488392 qtdemux: Use the tfdt decode time on byte streams when it's significantly different than the time in the last sample
We consider there's a sifnificant difference when it's larger than on second
or than half the duration of the last processed fragment in case the latter is
larger.

https://bugzilla.gnome.org/show_bug.cgi?id=754230
2016-11-01 20:07:39 +02:00
Sebastian Dröge
9ba6fb86d8 wavparse: Don't try to add srcpad if we don't know valid caps yet
Otherwise we'll run into an assertion on specially crafted files.

https://bugzilla.gnome.org/show_bug.cgi?id=773643
2016-10-31 11:11:32 +02:00
Branko Subasic
ddba77ea6e matroskamux: allow resolutions above 4096
Modify the caps string to allow width and height greater than 4096.
There is no need to restrict it since the matroska format allows the
width and height values to be up to eight bytes long.

https://bugzilla.gnome.org/show_bug.cgi?id=773582
2016-10-27 14:01:55 +01:00
Scott D Phillips
023744a577 udpsrc: Check for G_PLATFORM_WIN32 for presence of ipi_spec_dest
G_OS_WIN32 is only set when not building with cygwin, but
ipi_spec_dest is missing both with and without cygwin.

https://bugzilla.gnome.org/show_bug.cgi?id=773114
2016-10-27 12:09:00 +01:00
Mark Nauwelaerts
735924236e rtspsrc: reset connection info to non-flushing when closing
This solves a hanging mainloop in following scenario:
* connect to source
* network/server drops
* pipeline set to NULL (and connection to flushing as part)
* pipeline set to PAUSED/PLAYING (connection to non-flushing, but not recorded)
* [connecting still not possible]
* pipeline set to NULL => mainloop hangs (since no actual flushing is done)
2016-10-26 12:30:39 +02:00
Jan Schmidt
5067d7254f splitmuxsink: Only allow one video request pad
The pacing of the overall muxing is controlled
by the video GOPs arriving, so we can only handle
1 video stream, and the request pad is named accordingly.

Ignore a request for a 2nd video pad if there's already
an active one.
2016-10-26 20:17:40 +11:00
Jan Schmidt
917776730d splitmuxsink: Take ownership of floating refs
sink the floating ref when handed a muxer or sink to use so
we clearly take ownership.
2016-10-26 20:17:40 +11:00
Jan Schmidt
a80265d65a splitmuxsink: Set child elements to NULL when removing.
Make sure that elements are in the NULL state when removing.
Fixes critical warnings when errors occur early on in starting up.
2016-10-26 20:17:40 +11:00
Jan Schmidt
83e7182b30 splitmuxsink: Set pad template on request sink pads
Ensure that the ghost pad returned as a request pad
has the template that was requested
2016-10-26 20:17:40 +11:00
Nicolas Dufresne
ad9e9bedfb flvmux: Assume PTS is DTS when PTS is missing
This fixes issue for encoders that only sets the DTS. We assume that
there was no re-ordering when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=762207
2016-10-24 11:54:30 -04:00
Nirbheek Chauhan
4306cb6f79 meson: Add missing gstaudio dep to monoscope
In file included from ../subprojects/gst-plugins-good/gst/monoscope/gstmonoscope.c:42:0:
../subprojects/gst-plugins-base/gst-libs/gst/audio/audio.h:26:39: fatal error: gst/audio/audio-enumtypes.h: No such file or directory
 #include <gst/audio/audio-enumtypes.h>
                                       ^
compilation terminated.

https://ci.gstreamer.net/job/GStreamer-master-meson/271/console
2016-10-18 12:23:42 +05:30
Nirbheek Chauhan
3c53d0f38c meson: Add missing pbutils dependency to multifile
Found via the Jenkins CI:

FAILED: subprojects/gst-plugins-good/gst/multifile/gstmultifile@sha/gstsplitmuxsink.c.o
[...]
In file included from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.h:24:0,
                 from ../subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c:59:
../subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.h:30:43: fatal error: gst/pbutils/pbutils-enumtypes.h: No such file or directory
 #include <gst/pbutils/pbutils-enumtypes.h>
                                           ^
compilation terminated.

https://ci.gstreamer.net/job/GStreamer-master-meson/263/console
2016-10-16 02:18:22 +05:30
Nirbheek Chauhan
6fe40c92bf imagefreeze: Forward latency queries to upstream
Without this, latency queries to imagefreeze will fail.
2016-10-03 15:37:29 +05:30
Jan Schmidt
00d20b044c splitmuxsrc: Handle stop point from segment
If the seek stop point (or start, during reverse play)
was within the segment we just finished, go EOS immediately
instead of proceeding through all other parts and sending
0 length seeks to them.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
1a17ce9705 splitmuxsrc: Drop lock shutting down pads
Avoid a sporadic deadlock on shutdown by dropping
the splitmux lock around pad shutdown

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
359f8ff2d7 splitmuxsrc: Fix extra unref handling queries
https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Jan Schmidt
f8d7a2a0af splitmuxsrc: Avoid stall when parts get out of sync
When one part moves ahead of the others - due to excessive
downstream queueing, or really small input files - then
we can end up activating parts more than once. That can lead to
effects like shutting down pad tasks prematurely.

https://bugzilla.gnome.org/show_bug.cgi?id=772138
2016-10-01 00:12:41 +10:00
Sebastian Dröge
a993883b74 qtmux: Don't calculate PTS offset and DTS with GST_CLOCK_TIME_NONE
Just error out if there is no valid PTS.

https://bugzilla.gnome.org/show_bug.cgi?id=772143
2016-09-29 17:45:37 +03:00
Sebastian Dröge
52879dacbc qtdemux: Add JPEG2000 ihdr atom to the list of known ones
Otherwise qtdemux is always going to complain about it being unknown.
2016-09-29 17:37:28 +03:00
Sebastian Dröge
7ab3df4542 matroskamux: Always write the default frame duration for VP8/9 too
The WebM spec allows this now, and it allows us to guess a framerate.

See https://bugzilla.gnome.org/show_bug.cgi?id=772141 and
also https://bugzilla.gnome.org/show_bug.cgi?id=654379
2016-09-29 10:19:56 +03:00
Olivier Crête
7025d014bb rtph26[45]depay: Don't handle NALs inside STAP units twice
They've already been handled before pushing them into the adapter.
2016-09-27 15:30:01 -04:00
Tim-Philipp Müller
023998dd76 Revert "multifilesink: streamline the file-switch code a bit"
This reverts commit f1ceaab02f.

This broke atomic file writes in "buffer" mode. It did make
sure that any streamheaders are prepended to each file in
buffer mode as well, but that's not really needed in practice,
whereas atomic file writes are, so let's restore the status
quo ante for now since this was primarily a code cleanup anyway,
and if anyone needs to streamheaders in buffer mode too they
can make a patch to implement that differently. Re-implementing
the atomic writes in the element also seems way too much work.

https://bugzilla.gnome.org/show_bug.cgi?id=766990
2016-09-27 10:23:38 +01:00
Tim-Philipp Müller
6ab88a7f78 Revert "multifilesink: close file on write error with next-file mode is set to buffer"
This reverts commit 84e441d268.

This will no longer be needed once we revert f1ceaab02.
2016-09-27 10:22:57 +01:00
Arun Raghavan
10a16a6321 rtpsbcpay: Fix timestamping
We were just picking the timestamp of the last buffer pushed into our
adapter before we had enough data to push out.

This fixes things to figure out how large each frame is and what
duration it covers, so we can set both the timestamp and duration
correctly.

Also adds some DISCONT handling.
2016-09-25 01:20:14 +05:30
Georg Lippitsch
25526ed7f3 qtmux: Fix fourcc for ProRes Proxy
This is apco, according to
https://wiki.multimedia.cx/index.php?title=Apple_ProRes

https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-09-21 15:10:46 -04:00
Sebastian Dröge
eaae016884 rtspsrc: Use new bin suppressed flags API for managing the element flags 2016-09-15 18:20:30 +02:00
Tim-Philipp Müller
cae9ec0ad8 ext, gst: fix indentation 2016-09-15 09:53:07 +01:00
Thomas Bluemel
567afdd4d3 rtpjitterbuffer: Fix calculating next_seqnum when dropping old buffers from a full queue.
Fixes calculating the next sequence number when a ITEM_TYPE_LOST with more than one
definitely lost packets is encountered.

https://bugzilla.gnome.org/show_bug.cgi?id=769757
2016-09-14 19:47:28 -04:00
Havard Graff
f440b074b1 rtpjitterbuffer: improved rtx-rtt averaging
The basic idea is this:
1. For *larger* rtx-rtt, weigh a new measurement as before
2. For *smaller* rtx-rtt, be a bit more conservative and weigh a bit less
3. For very large measurements, consider them "outliers"
   and count them a lot less

The idea being that reducing the rtx-rtt is much more harmful then
increasing it, since we don't want to be underestimating the rtt of the
network, and when using this number to estimate the latency you need for
you jitterbuffer, you would rather want it to be a bit larger then a bit
smaller, potentially losing rtx-packets. The "outlier-detector" is there
to prevent a single skewed measurement to affect the outcome too much.
On wireless networks, these are surprisingly common.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
f8238f0a9f rtpjitterbuffer: Detect whether to assume equidistant spacing when loss
Assuming equidistant packet spacing when that's not true leads to more
loss than necessary in the case of reordering and jitter. Typically this
is true for video where one frame often consists of multiple packets
with the same rtp timestamp. In this case it's better to assume that the
missing packets have the same timestamp as the last received packet, so
that the scheduled lost timer does not time out too early causing the
packets to be considered lost even though they may arrive in time.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
2eb7383816 rtpjitterbuffer: Don't request rtx if 'now' is past retry period
There is no need to schedule another EXPECTED timer if we're already
past the retry period. Under normal operation this won't happen, but if
there are more timers than the jitterbuffer is able to process in
real-time, scheduling more timers will just make the situation worse.
Instead, consider this packet as lost and move on. This scenario can
occur with high loss rate, low rtt and high configured latency.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
ab49dfd0b2 rtpjitterbuffer: Fix lost duration when gap after lost timer
This patch fixes an issue with the estimated gap duration when there is
a gap immediately after a lost timer has been processed. Previously
there was a discrepancy beteen the gap in seqnum and gap in dts which
would cause wrong calculated duration. The issue would only be seen with
retranmission enabled since when it's disabled lost timers are only
created when a packet is received and the actual gap length and last dts
is known.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
dd020f5cc8 rtpjitterbuffer: Expose rtx-deadline as a property
The default -1 gives the old behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
8087a8a31c rtpjitterbuffer: Improved expected-timer handling when gap > 0
https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
38a7545003 rtpjitterbuffer: Major improvements for RTX stats
Stats should also be collected for unsuccessful packets.

rtx-rtt is very important for determining the necessary configured
latency on the jitterbuffer. It's especially important to be able to
increase the latency when retransmitted packets arrive too late and are
considered lost. This patch includes these late packets in the
calculation of the various rtx stats, making them more correct and
useful.

Also in the case where the original packet arrives after a NACK is sent,
the received RTX packet should update the stats since it provides useful
information about RTT.

The RTT is only updated if and only if all requested retranmissions are
received. That way the RTT is guaranteed to make sense. If not we don't
know which request the packet is a response to and the RTT may be bogus.
A consequence of this patch is that RTT is not updated for a request
when one of the RTX packets for that seqnum is lost, but that since
measured RTT will be more accurate.

The implementation store the RTX information from the timed out timers
and use this when the retransmitted packet arrives. For performance
these timers are stored separately from the "normal" timers in order to
not impact performance (see attached performance test).

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
1b868cc9b1 rtpjitterbuffer: Add and expose more stats and increase testing of it
Add num-pushed and num-lost.
Expose num-late, num-duplicates and avg-jitter.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Stian Selnes
531199d5c4 rtxreceive: Set buffer flag for retransmitted packets
https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Havard Graff
1436fc01e9 rtpjitterbuffer: Option to disable rtx-delay-reorder
When disabled we can save some iterations over timers.

There is probably an argument for rtx-delay-reorder to exist, but
for normal operations, handling jitter (reordering) is something a
jitterbuffer should do, and this variable feels like functionality that
is not "in-sync" with what the jitterbuffer is trying to achieve.

Example: You have 50ms jitter on your network, and are receiving
audio packets with 10ms durations. An audio packet should not be
considered late until its rtx-timeout has expired (and hence a rtx-event
is sent), but with rtx-delay-reorder, events will be sent pretty much
all the time due to the jitter on the network.

Point being: The jitterbuffer should adapt its size to the measured network
jitter, and then rtx-delay-reorder needs to adapt as well, or simply
get out of the way and let the other (better) rtx-mechanisms do their job.

Also change find_timer to only use seqnum as an argument, since there
will only ever be one timer per seqnum at any given time. In the
one case where the type matters, the caller simply checks the type.

https://bugzilla.gnome.org/show_bug.cgi?id=769768
2016-09-14 19:37:50 -04:00
Olivier Crête
0c7e3a860c rtph263pay: Fix double free from coverity
CID #1372887
2016-09-14 11:18:44 -04:00
Olivier Crête
b369e386ad rtph263pay: Indent as per gst-indent 2016-09-14 11:18:44 -04:00
Wonchul Lee
aca4203c20 autodetect: Use gst_bin_set_suppressed_flags() API
https://bugzilla.gnome.org/show_bug.cgi?id=771395
2016-09-14 11:24:08 +02:00
Sebastian Dröge
dba90631bc deinterlace: Fix field ordering for reverse playback
And actually calculate the field duration instead of a frame duration so
that we can properly timestamp output frames in fields=all mode.

This is probably still broken for reverse playback in telecine mode.
2016-09-12 20:09:23 +02:00
Thomas Klausner
22d6c7f106 udpsrc: Fix compilation on NetBSD
https://bugzilla.gnome.org/show_bug.cgi?id=771278
2016-09-12 15:09:26 +02:00
Xabier Rodriguez Calvar
415ae458d2 qtdemux: offset is irrelevant when no crypto info
Cause later it will try to use the crypto info array to get an index and
attach on of the positions as buffer's crypto info.

https://bugzilla.gnome.org/show_bug.cgi?id=770951
2016-09-10 11:29:55 +03:00
Xabier Rodriguez Calvar
92075e0256 qtdemux: Fix crash with no cenc aux offset
https://bugzilla.gnome.org/show_bug.cgi?id=770951
2016-09-07 09:58:22 +03:00
Vincent Penquerc'h
c974df1c06 aacparse: parse a bit more of the humongous LOAS data
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
e66ee5491c aacparse: make it clear when a potential LOAS frame is not one
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
b0f20bacfd aacparse: add a few comments to anchor parsing to the spec
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
559546dd3a aacparse: improve channel/rate handling
Keep track of the last parsed channels/rate fields so they can be
used even if the element was not yet configured.

https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
740749ac55 aacparse: fix varlength number reading as per spec
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Vincent Penquerc'h
991e46ce42 aacparse: strip uneeded static arrays slack
https://bugzilla.gnome.org/show_bug.cgi?id=769278
2016-09-06 15:09:21 +01:00
Olivier Crête
092465e94d rtpmp4adepay: Only declare a stream to be framed once a marker bit has been seen
This may cause a few packets to be processed by the parser, but it's
better than never pushing out buffers from a slightly broken stream
where no marker bits are set.
2016-09-06 15:09:21 +01:00
Mathieu Duponchelle
26928b3df0 qtmux: Implement the preset interface.
+ And provide a "youtube" preset, which based on
https://support.google.com/youtube/answer/1722171 sets
faststart to True.

https://bugzilla.gnome.org/show_bug.cgi?id=751559
2016-09-01 13:16:49 +03:00
Thibault Saunier
150edef830 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:26 -03:00
Olivier Crête
4fceb5050f Revert "rtpmux: fix PROP_TIMESTAMP_OFFSET range problems"
This broke API, so we need a better solution!

This reverts commit c7579d31a6.
2016-08-26 12:06:51 -04:00
Stian Selnes
8bf77e34f2 rtpvp9depay: Support flexible mode 2016-08-26 11:57:15 -04:00
Stian Selnes
5f3b570d53 rtph263pdepay: Don't try to push empty frame
If the result of depayloading is an empty frame, just drop it. This is
likely the result of a buggy payloader.
2016-08-26 11:57:15 -04:00
Havard Graff
c7579d31a6 rtpmux: fix PROP_TIMESTAMP_OFFSET range problems
It could not set the offset for the full guint32 range.
2016-08-26 11:57:14 -04:00
Havard Graff
7ad7266163 rtpbin: introduce max-streams property
To be able to cap the number of allowed streams for one session.

This is useful for preventing DoS attacks, where a sender can change
SSRC for every buffer, effectively bringing rtpbin to a halt.

https://bugzilla.gnome.org/show_bug.cgi?id=770292
2016-08-26 11:57:06 -04:00
Havard Graff
b33470f80c rtpsource: reordered packets are very normal, and should not be a warning 2016-08-26 11:53:22 -04:00
Havard Graff
babc591707 rtpsession: degrade g_warning to GST_ERROR
So we don't blow up while investigating
2016-08-26 11:53:22 -04:00
Stian Selnes
11b7575cff rtph263pdepay: Fix picture header for non-writable payload
Under certain conditions gst_rtp_buffer_get_payload() returns a copy of
the payload. In this case the payload modifications will not affect the
rtp buffer. So instead of modifying the payload buffer directly we
should modify the buffer that actually gets pushed on the adapter.
2016-08-26 11:53:22 -04:00
Stian Selnes
793327cce2 rtph261depay: Fix check of valid payload length
Packets with no H.261 payload should be dropped to avoid invalid
write/reads.
2016-08-26 11:53:22 -04:00
Stian Selnes
64f9d08d3d rtph263pay: Fix double free, invalid reads and leak 2016-08-26 11:53:22 -04:00
Stian Selnes
61bc228a71 rtpsession: sanity check RTT before ignoring PLI/FIR 2016-08-25 18:28:44 -04:00
Stian Selnes
85a56f8ee3 rtpsession: handle sdes messages with non-utf8 more gracefully 2016-08-25 18:28:44 -04:00
Stian Selnes
898d240faa rtph263pay: change log level on bitstream parsing messages 2016-08-25 18:28:44 -04:00
Jonas Holmberg
e43dcd9996 rtph265pay: Set RTP marker bit
Set the RTP marker bit on the last RTP packet of an H.265 access unit.

https://bugzilla.gnome.org/show_bug.cgi?id=770394
2016-08-25 17:22:58 +03:00
Xabier Rodriguez Calvar
569820598f videoflip: added GstVideoDirection interface
It implements now this interface with its video-direction
property. Values are changed to GstVideoOrientationMethod but they have
the same value than the originals.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:16:00 +03:00
Havard Graff
1ef896b29d gstrtpsession: refactor duplicate code into a function
Less code, easier to read, more consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=770293
2016-08-23 15:09:03 -04:00
Vincent Penquerc'h
0fb0c0c8e6 rtpbin: fix typo in max-misorder-time property name 2016-08-23 17:19:17 +01:00
Tim-Philipp Müller
78bb4cc7e2 splitmuxsink: fix printf format compiler warning in debug message
On 32-bit x86: gstsplitmuxsink.c:966:31: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 9 has type
‘guint64 {aka long long unsigned int}’
2016-08-22 00:07:51 +01:00
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:21:12 +01:00
Jie Jiang
655856deee Fixed splitmuxsink 32-bit overflow bug
Extend the byte tracking counters to 64-bit on
all platforms, instead of using gsize, which overflows
after 4GB.

https://bugzilla.gnome.org/show_bug.cgi?id=770019
2016-08-20 19:53:11 +10:00
Vivia Nikolaidou
64fd099a3a isomp4: Fix coverity warning
If atom_copy_data fails to write anything, return 0

CID #1371458
2016-08-19 17:53:25 +03:00
Tim-Philipp Müller
0f41d0e75d Revert "flacparse: Add maximum bitrate tag"
This reverts commit c703ab69f5.

https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-18 12:02:01 +01:00
Vivia Nikolaidou
b9a8188704 splitmuxsink: Add option to split at exactly max-size-time
Will try to request a keyframe from the encoder to be sent at the target
running time.

https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Vivia Nikolaidou
369d37d227 splitmuxsink: Allow time and bytes to reach their respective thresholds
https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Sebastian Dröge
0b0a042781 rtspsrc: Allow mimetypes with properties as long as they're application/sdp
Some servers add properties like charset, e.g.
  application/sdp; charset=utf8

Ideally we should also parse the charset and do conversion of all messages,
but that's for a later time.
2016-08-17 09:49:04 +03:00
Vivia Nikolaidou
cdb7649909 qtmux: Added support for writing timecode track
https://bugzilla.gnome.org/show_bug.cgi?id=767950
2016-08-17 09:03:52 +03:00
Thomas Bluemel
578e93cd0b multiudpsink: Initialize bytes_sent field.
This fixes endpoints not receiving any data intermittently.

https://bugzilla.gnome.org/show_bug.cgi?id=769773
2016-08-12 09:21:20 +02:00
Thomas Bluemel
4dff74358e rtpjitterbuffer: Actually calculate the packet rate for max-dropout and max-misorder calculations.
https://bugzilla.gnome.org/show_bug.cgi?id=751311
2016-08-10 19:49:27 +02:00
Thomas Bluemel
e7d4ad7ac7 rtpjitterbuffer: Don't warn for duplicate packets
This is a normal scenario and should not be a warning.  This can
happen frequently when re-transmits of lost packets are enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=762208
2016-08-10 19:39:42 +02:00
Jan Schmidt
75b601bbd4 splitmux: Fix typo converting to running time.
Use the correct collected timestamp.
2016-08-08 13:49:19 +10:00
Jan Schmidt
5a71334fb0 Revert "splitmuxsink: Use GstBin async-handling instead of our own."
This reverts commit fa008f271a.

async-handling in GstBin causes the pipeline to spin at 100%
CPU as the top-level pipeline tries to change that state
to PLAYING constantly. This is a workaround for a core
problem, essentially, but an improvement in this case for now.
2016-08-08 03:07:34 +10:00
Jan Schmidt
89af379ff0 splitmux: Recheck state after unlocking mutex.
After dropping the splitmux lock, re-check the state,
don't just fall through and sleep unconditionally,
as we may have already missed the wakeup.

https://bugzilla.gnome.org/show_bug.cgi?id=769514
2016-08-08 00:56:38 +10:00
Jan Schmidt
69df65fabe splitmuxsrc: Don't stop and error on EOS flow return
Don't immediately halt on EOS flow return from downstream
due to out of segment. Let the demuxer handle it and send
EOS.
2016-08-06 01:41:06 +10:00
Thiago Santos
7f0381fdd9 rtpjitterbuffer: avoid unref of null buffer
The current 'l' pointer will be NULL when the loop
is interrupted with a 'break' statement. Need to have
it advance to the next list item before interrupting.
2016-08-04 00:36:28 -03:00
Carlos Rafael Giani
91e302e00d wavparse: Add tags for container format and bitrate for uncompressed PCM
The PCM bitrate is added to help downstream elements (like uridecodebin)
figure out a proper network buffer size

https://bugzilla.gnome.org/show_bug.cgi?id=769390
2016-08-02 15:22:25 +03:00
Carlos Rafael Giani
c703ab69f5 flacparse: Add maximum bitrate tag
https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-02 14:34:54 +03:00
Sebastian Dröge
45db90fdb0 qtdemux: When receiving a DISCONT buffer that does not point to a sample, remember the offset
And don't just reset everything. This makes sure that we can continue to
handle data in the following scenario:

moov: discont
moof: discont
mdat: continuous

Previously this would fail because the offset would be the accumulated offset
from moov and moof at the mdat position, while the buffer offset might be
something completely different.
2016-07-28 17:58:16 +03:00
Sebastian Dröge
3010d1ec2d rtp: Filter with the filter caps in the payloader's getcaps 2016-07-25 13:35:18 +03:00
Jan Schmidt
8b4ceb2ef3 splitmuxsink: Fix debug statement signedness.
The ts variable is a GstClockTime, don't print it
as a GstClockTimeDiff.
2016-07-25 18:20:03 +10:00
Jan Schmidt
6755691b28 splitmuxsink: Handle negative running time
Use signed clock times for running time everywhere
so that we handle negative running times without
going haywire, similar to what queue and multiqueue
do these days.
2016-07-20 00:39:38 +10:00
Jan Schmidt
e2505dd7df splitmuxsink: Drop lock when sending dummy event
When pushing the dummy event into the multiqueue,
drop the splitmux lock or else we might deadlock.
2016-07-20 00:32:30 +10:00
Jan Schmidt
a1838927f7 rtph264pay: Intersect with filter caps in getcaps function.
Always intersect with the filter caps in the getcaps function
to make sure we return a subset of what was requested.

Other payloaders also have this problem and need fixing
in future commits.
2016-07-20 00:31:59 +10:00
Jonas Holmberg
833c530553 rtph265pay: Accept array_completeness=1
When parsing NAL unit type in codec_data, check the 6bits of
NAL_unit_type only and do not require the array_completeness bit to be
0, since the default and mandatory value of array_completeness is 1 for
hvc1.

https://bugzilla.gnome.org/show_bug.cgi?id=768653
2016-07-11 11:49:41 +03:00
Sebastian Dröge
ccdd76fd18 udpsrc: Use correct in6_pktinfo struct instead of in_pktinfo
Fixes the build on FreeBSD, which does not have the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=768623
2016-07-10 21:30:58 +03:00
Mats Lindestam
6fe88d8a76 multipartmux: Use PTS and DTS instead of timestamp
And pass-through both of them.

Based on a patch by Göran Jönsson <goranjn@axis.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767900
2016-07-08 16:58:26 +03:00
Edward Hervey
85b0c3a83d qtdemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Edward Hervey
781d3f0208 avidemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Sebastian Dröge
f0ba7a5ca4 matroskamux: Remove suspicious checks for pads being active and linked
We should add all pads, no matter if they are linked or active or not at this
point. Skipping some that are not will cause different behaviour than with
other muxers.
2016-07-07 18:26:48 +03:00
Sebastian Dröge
dbb8ec4639 matroskamux: Error out if we start writing data with some pads not having a codec id yet
This can only happen if a) upstream somehow gets around the CAPS event failing
or b) there never being any CAPS event.

The following code assumes that all pads have a codec-id.

https://bugzilla.gnome.org/show_bug.cgi?id=768509
2016-07-07 18:26:48 +03:00
Sebastian Dröge
cc636760b6 matroskamux: Consistently use gst_matroska_mux_set_codec_id() for setting the codec id 2016-07-07 18:26:48 +03:00
Jonas Holmberg
a06152c40a rtph265pay/depay: Sync against RFC 7798
Handle sprop-vps, sprop-sps and sprop-pps in caps instead of
sprop-parameter-sets.

rtph265pay works with byte-stream and hvc1 formats but not hev1 yet. It
handles profile-id, tier-flag and level-id in caps query.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-07-07 14:59:50 +03:00
Jan Alexander Steffens (heftig)
b3cfbe575c flvdemux: Push nominal bitrate tags
Add per-stream tag lists, which are used to send nominal
bitrate tags. When remuxing FLV => FLV, this now passes
through the upstream bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Jan Alexander Steffens (heftig)
ee44e60f7b flvdemux: Refactor metadata tag handling
The FLV header cannot be trusted to indicate video or
audio presence, as the comments already mention. Don't
delay pushing tags waiting for streams that might never
appear.

Tags are now pushed immediately after they change:
  - After parsing an onMetaData script object
  - After negotiating caps on a pad

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Luis de Bethencourt
a85dbfc246 qtdemux: fix AAC codec_data values
As seen in the parent switch for object_type_id, the 4 possible values are
0x40, 0x66, 0x67 and 0x68. Fixing the nested switch to match these values.

Looks like it was a typo making them decimal instead of hexadecimal.

CID 1363328
2016-07-06 12:47:18 +01:00
Steven Hoving
ec59291b2e rtspsrc: Fix error messages to first convert to doubles before division 2016-07-06 11:22:53 +03:00
Sebastian Dröge
b9532527ec rtspsrc: Set to PLAYING after a seek again after setting up the segment and everything else
There's a small window for a race condition otherwise.
2016-07-05 21:11:35 +03:00
Sebastian Dröge
fd261e1099 aacparse: Reject raw AAC if no codec_data is found in the caps
If necessary, a demuxer will have to invent something here but this is only a
problem with non-conformant files anyway.
2016-07-04 16:58:38 +02:00
Sebastian Dröge
df454fa28f qtdemux: Invent AAC codec_data if none is present
Without, raw AAC can't be handled and we have some information available in
the decoder that most likely allows us to decode the stream in one way or
another. This is the same code already used by matroskademux for the same
reasons, and ffmpeg/vlc play such files just fine too by guesswork.
2016-07-04 16:55:32 +02:00
Sebastian Dröge
5b24841f66 qtmux: Reject raw AAC caps without codec_data
The resulting file is not going to be playable without guesswork and raw caps
should always have codec_data.
2016-07-04 14:54:13 +02:00
Edward Hervey
e3923df800 qtdemux: Handle upstream GAP in push-mode/time segment
This is to handle cases where upstream handles the fragmented streaming in TIME
segments and sends us data with gaps within fragments. This would happen when dealing
with trick-modes.

When upstream (push-based, TIME SEGMENT) wishes to send discontinuous samples,
it must obey the following rules:
* The buffer containing the [moof] must have a valid GST_BUFFER_OFFSET
* The buffers containing the first sample after a gap:
 * MUST start at the beginning of a sample,
 * MUST have the DISCONT flag set,
 * MUST have a valid GST_BUFFER_OFFSET relative to the beginning of the fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=767354
2016-07-01 14:21:04 +02:00
Brad Lackey
6d3071f200 rtspsrc: Don't disable UDP protocols on redirecting
https://bugzilla.gnome.org/show_bug.cgi?id=768232
2016-07-01 12:21:43 +02:00
Seungha Yang
231018bcfe qtdemux: Push caps only when it was updated
Commit 7873bede31 caused new caps
event per moof without consideration of duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=768268
2016-07-01 11:37:20 +02:00
Jonas Holmberg
850a8bc077 rtph265depay: fix invalid memory access
10 bytes was allocated for stream_format but size of "byte-stream" is
more. Use g_strdup() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-30 16:56:24 +01:00
Sebastian Dröge
75963b47f4 udpsrc: Windows has no ipi_spec_dst in struct in_pktinfo 2016-06-28 16:44:50 +03:00
Sebastian Dröge
cdd5fa4d96 udpsrc: #define __APPLE_USE_RFC_3542 to be able to use IPV6_PKTINFO on OSX/iOS 2016-06-28 15:15:14 +03:00
Sebastian Dröge
36a154fa96 udpsrc: Move #includes around to a) work around broken glibc header and b) Windows 2016-06-28 15:08:04 +03:00
Sebastian Dröge
7e47579f17 udpsrc: Fix compilation on Windows and *BSD/OSX 2016-06-28 14:25:03 +03:00
Sebastian Dröge
123d62712c udpsrc: Filter out multicast packets that are not for our multicast address
https://bugzilla.gnome.org/show_bug.cgi?id=767980
2016-06-28 13:40:06 +03:00
Sebastian Dröge
c18b609c06 rtspsrc: When seeking, consider the current element state or pending state instead of the RTSP state
If we consider the RTSP state, what can happen is that it is PLAYING but the
element already asynchronously tried to PAUSE and it just did not happen yet.

We would then override this setting to PAUSED (while the element actually is
in PAUSED) and set the RTSP state to PLAYING again. This would then cause us
to produce packets while the sinks are all PAUSED, piling up thousands of
packets in the rtpjitterbuffer and other elements and finally failing.
2016-06-28 11:01:24 +03:00
Sebastian Dröge
d6f597db20 flvdemux: Add comment about H263/MPEG4P2 being non-standard for FLV
They are however supported by ffmpeg and apparently used out there.

https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-27 09:20:35 +03:00
Vivia Nikolaidou
6ac02f8595 flvdemux: Add support for H263 and MPEG4 part2
https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-24 15:30:03 +03:00
Aaron Boxer
f07c704b49 gstrtpj2kpay: use tile bit and tile number to determine if there are multiple tiles in packet
Now we don't have to rely on a special value for the tile number.

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 13:03:09 +01:00
Tim-Philipp Müller
323244bc04 rtpj2kpay: fix compiler warning on OS/X
gstrtpj2kpay.c:364:21: error: implicit truncation from 'int' to bitfield changes value from -1 to 65535

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 09:34:56 +01:00
Sebastian Dröge
5f2b32e642 rtph264pay: Deprecated sprop-parameter-set property
This is supposed to be either in the codec_data (avc stream format) or inside
the stream, and we extract it from there. It should not be set from a
property as it's stream specific.

https://bugzilla.gnome.org/show_bug.cgi?id=767789
2016-06-21 10:03:04 +03:00
Aleix Conchillo Flaqué
12eb5d6912 rtspsrc: make all srtp encoder properties explicit
The Session Data Protocol doesn't allow specifying a cipher for the
SRTCP, so it will use the SRTP one. In the "srtpenc" element the cipher
"aes-128-icm" is the default for SRTP and SRTCP, but if we want to have
an SRTCP with the "aes-256-icm" cipher then we also need to set the SRTP
cipher to "aes-256-icm", otherwise "aes-128-icm" will be used instead.

https://bugzilla.gnome.org/show_bug.cgi?id=767799
2016-06-20 09:53:24 +02:00
Sebastian Dröge
5a7217a147 qtmux: The prores variant is stored in the variant field, not format
And the caps in the sink pad template already used variant (only).
2016-06-17 16:08:08 +03:00
Jonas Holmberg
83ec89abdd rtph265pay: Remove sprop-parameter-sets property
There is no valid use case when this property is needed since the values
must be in either codec_data or buffer data.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Jonas Holmberg
2039e0d881 rtph265pay: Read NALU type the same way everywhere
Cosmetic change to read NALU type in gst_rtp_h265_pay_decode_nal() the
same way as in other places.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Aurélien Zanelli
f8f8935c77 rtpjitterbuffer: fix RTPJitterBufferMode documentation
Documentation lacks '@' before each enum values and there was an extra
line after symbol section which confuses GTK-Doc parser.

https://bugzilla.gnome.org/show_bug.cgi?id=767788
2016-06-17 15:16:45 +03:00
Miguel París Díaz
83f4c08747 rtpsession: take the lock when changing stats
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-06-17 12:52:29 +03:00
Jürgen Slowack
98b62e397b rtph265: fix NAL unit type parsing and SPS/PPS/VPS detection
Fixes sps/pps/vps insertion via the config-interval property.

https://bugzilla.gnome.org//show_bug.cgi?id=767680
2016-06-15 13:10:50 +01:00
Tim-Philipp Müller
51a0dc2df2 flvdemux: fix indentation 2016-06-10 13:51:39 +01:00
Tim-Philipp Müller
c51831a245 flvdemux: fix date parsing when there are trailing spaces
Fixes parsing of "Thu May 11 15:57:46 2006 ".

https://bugzilla.gnome.org/show_bug.cgi?id=767496
2016-06-10 13:51:39 +01:00
Aaron Boxer
b4a4fa19a1 gstrtpj2k: set sampling field required by RFC
This field is now required in the sink caps.

https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-10 13:14:44 +03:00
Seungha Yang
4e23d206b9 flvdemux: Fix unref assertion failure
Fix unref assertion failure

https://bugzilla.gnome.org/show_bug.cgi?id=767424
2016-06-08 22:01:11 -04:00
Olivier Crête
5328378132 rtpjitterbuffer: Work with non-TIME segments
With non-time segments, it now assumes that the arrival time of packets
is not relevant and that only the RTP timestamp matter and it produces
an output segment start at running time 0.

https://bugzilla.gnome.org/show_bug.cgi?id=766438
2016-06-08 14:49:49 -04:00
Edward Hervey
30d2918ab0 qtdemux: Show state name in debugging
Makes it easier to trace what's going on
2016-06-07 18:40:14 +03:00
Edward Hervey
7d309d3f4b qtdemux: Remove useless variable
That variable is only needed for a debug statement, move it there
2016-06-07 18:40:14 +03:00
Edward Hervey
d8f1a6c58e qtdemux: Add/Fix comments on the various structure variables
No variables were added/removed. This was just a good excuse to:
* Comment what most variables are used for (and when)
* Order them in such a way as to show first the common variables used
  in all cases, followed by those only used in push-mode
2016-06-07 18:40:14 +03:00
Edward Hervey
6f1eed7f02 qtdemux: Remove unused structure
Let's just remove it, been commented for 7+ years :)
2016-06-07 18:40:14 +03:00
Sebastian Dröge
24862c2f74 qtdemux: Forward segments directly if we are operating in PUSH mode on fragmented streams
We shouldn't go through segment activation as we will only have a limited
understanding of how the whole stream timeline looks like from the moof. We
only know about the current fragment, while upstream knows about the whole
stream.

This fixes seeking in DASH streams, both for seeks after the current moof and
for seeks into the current moof. The former would fail because the moof ends
and we can't activate any segment, the latter would cause a segment that stops
at the moof end, and no further fragments would be played because we end up
being EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-07 16:19:39 +03:00
Michael Olbrich
c5da4dc66a matroskademux: preserve seek flags
Without this some flags get lost in streaming mode.

https://bugzilla.gnome.org/show_bug.cgi?id=767194
2016-06-06 10:50:02 +03:00
Miguel París Díaz
389e0abeb0 rtpsource: complete warn log with SSRC
https://bugzilla.gnome.org/show_bug.cgi?id=767195
2016-06-06 10:47:17 +03:00
Olivier Crête
91a2a790e9 rtpvp9depay: Don't assert on flexible mode packets
Instead just post a warning on the bus for now.
2016-06-02 16:17:19 -04:00
Edward Hervey
1d2db2ba4f deinterlace: Ensure DISCONT flag is properly propagated
The output of deinterlace at startup, or when receiving a new DISCONT
buffer, should have the DISCONT flag set on the first buffer.
2016-06-02 11:35:27 +03:00
Sebastian Dröge
4498e57c10 qtdemux: Use the demuxer segment instead of a new one for MSS streams
Upstream might have told us something about the to be expected segment, so
let's use that information instead of coming up with a [0,-1] segment.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
84e698c531 qtdemux: Only activate segments and send SEGMENT events if we have streams
But in that case also remove the pending newsegment event, otherwise we would
later send a possibly outdated event.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f8eb909d90 qtdemux: In PULL mode, nothing is ever going to send us a SEGMENT event
https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f3e68164e4 qtdemux: Don't override TIME segments from upstream that we just saw
The point of d8fb7a9c96 was to not have any
spurious segments stored for later if we do BYTES->TIME conversion, but
overriding any TIME segments from upstream does not make any sense.

See https://bugzilla.gnome.org/show_bug.cgi?id=763165

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Prashant Gotarne
4bdd192fb3 multifilesrc: set position as offset from start-index
query position in GST_FORMAT_BUFFER returns
offset from start-index rather than index.

https://bugzilla.gnome.org/show_bug.cgi?id=752462
2016-05-27 20:32:08 +01:00
Pierre Lamot
3c50fd7669 rtpj2kpay: Fix buffer memory leak
Input buffer memory was not unmapped

https://bugzilla.gnome.org/show_bug.cgi?id=766870
2016-05-27 12:46:23 +01:00
Tim-Philipp Müller
3d979d4e87 videocrop mark crop properties as mutable in playing state 2016-05-23 19:17:08 +01:00
Sebastian Dröge
7cd9d34c80 qtdemux: Set seek event seqnum on all SEGMENT events
Some were forgotten.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:15:44 +03:00
Sebastian Dröge
9e5cda59f8 avidemux: Pass through seek event seqnums in all SEGMENT/EOS events and SEGMENT_DONE messages/events
See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:12:44 +03:00
Sebastian Dröge
0345ba78f5 matroskademux: Set seek event seqnum in EOS and SEGMENT_DONE messages/events
Also actually store the seqnum in pull mode seeks.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 10:57:30 +03:00
Guillaume Desmottes
47a358783e deinterlace: fix caps leak
The caps returned by gst_pad_get_current_caps() was never unreffed when
not early returning.

Fix a leak with the elements/deinterlace test.

https://bugzilla.gnome.org/show_bug.cgi?id=766558
2016-05-20 09:36:09 +03:00
Mikhail Fludkov
ee7e80d615 rtpsession: don't act on suspicious BYE RTCP
Some endpoints (like Tandberg E20) can send BYE packet containing our
internal SSRC. I this case we would detect SSRC collision and get rid
of the source at some point. But because we are still sending packets
with that SSRC the source will be recreated immediately.
This brand new internal source will not have some variables incorrectly
set in its state. For example 'seqnum-base` and `clock-rate` values will be
-1.
The fix is not to act on BYE RTCP if it contains internal or unknown
SSRC.

https://bugzilla.gnome.org/show_bug.cgi?id=762219
2016-05-20 09:28:39 +03:00
Seungha Yang
eb09829a1c matroskademux: don't hold object lock whilst pushing out headers
matroskademux would take the GST_OBJECT_LOCK in
- gst_matroska_demux_push_codec_data_all()
- gst_matroska_demux_query()

Some parse element such as FLAC checks upstream seekability, and
there is some use cases that matroska-demux is linked to a parse element
(e.g.,FLAC format) without intermediate elements (e.g., queue).
In this case, matroska-demux never returns from _push_codec_data_all()
because the parser can return only after it receives the response to
the upstream query, but that's not going to happen because it's
deadlocked.

Elements must not hold the object lock whilst pushing out events
or data.

https://bugzilla.gnome.org/show_bug.cgi?id=766645
2016-05-19 22:01:53 +01:00
Tim-Philipp Müller
0686174f19 udpsrc: fix Since version for new "loop" property 2016-05-18 18:35:27 +01:00
Guillaume Desmottes
a6c4763b42 rtpdec: fix clock leak
gst_system_clock_obtain() returns a new ref.

https://bugzilla.gnome.org/show_bug.cgi?id=766521
2016-05-17 09:59:08 +03:00
Tim-Philipp Müller
21e281feea udpsrc: add doc blurb with since marker for new "loop" property 2016-05-17 05:33:35 +01:00
Dimitrios Katsaros
1f0cfd9ffb avimux: add support for png
https://bugzilla.gnome.org/show_bug.cgi?id=758059
2016-05-16 18:14:21 +01:00
Jan Schmidt
d7eb97393c splitmuxsrc: Connect to demux signals before activating
Fix a race in splitmuxsrc by properly connecting to the
demuxer signals we're interested in *before* setting it running.
2016-05-15 22:09:04 +10:00
Olivier Crête
e21cf3bc1c rtpmp4gpay: Don't produce timestamps based on byte count
The GST_BUFFER_OFFSET of output buffers returned to GstRtpBasePayload
should reflect the number of "samples" in the unit of the RTP clock in this
buffer. If this is not true, then it shouldn't be set.

https://bugzilla.gnome.org/show_bug.cgi?id=761943
2016-05-15 12:28:55 +02:00
Edward Hervey
ac3b1cf2ed matroska-mux: Fix strcmp usage
Just use g_strcmp0 which can handle NULL entries
2016-05-15 12:25:03 +02:00
Seungha Yang
56e273bc21 qtdemux: Parsing elst box based on version
segment_duration and media_time should be parsed based on version
of elst box. Specification defines that an elst box with version 1
has uint64 and int64 values for segment_duration and media_time,
respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=766301
2016-05-15 13:10:03 +03:00
Sebastian Dröge
fe34f46f32 rtpsession: Take the lock already when reading the other stats, not just for the hash table
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-15 12:31:33 +03:00
Tim-Philipp Müller
3320f4f0de matroska: use math-compat.h for NAN define 2016-05-14 17:04:57 +01:00
Jan Schmidt
fa008f271a splitmuxsink: Use GstBin async-handling instead of our own.
Set the async-handling property on GstBin to let it manage
async-handling instead of the local handling from the previous
commit. Works because of #174a5e in core
2016-05-15 00:03:15 +10:00
Olivier Crête
0ebdb97797 jitterbuffer: Upgrade debug message to error
It causes the entire pipeline to fail, it should be easier to find.
2016-05-14 12:36:08 +02:00
Jan Schmidt
08af8cd5b8 splitmuxsink: Hide internal async state changes.
When switching fragments, hide the async-start/async-done
messages from the parent bin, as otherwise we sometimes (very rarely)
hang in PAUSED instead of returning / continuing to PLAYING
state.
2016-05-14 18:34:57 +10:00
Jan Schmidt
f35f604610 splitmuxsink: Remove stray carriage-return from debug 2016-05-14 18:34:57 +10:00
Sebastian Dröge
bb1ae083c6 rtp: Ship gstrtpj2kcommon.h file to fix distcheck 2016-05-13 16:43:21 +03:00
Jesper Larsen
ce05adfb30 avimux: Do not write index and header if idx is NULL
Fixes criticals with e.g.
videotestsrc num-buffers=1 ! identity drop-probability=1.0 ! avimux ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=748700
2016-05-13 09:55:45 +01:00
Aaron Boxer
f89c4f9f4b rtpj2kpay: manage T tile invalidation bit correctly, update tile id in header correctly.
1. according to RFC, T bit is only set when either the RTP packet only contains the J2K main header, or the packet contains tile parts from multiple tiles. This is now being managed correctly in the code. The second scenario cannot happen with our payloader, since tile headers are always placed in their own RTP packet, and so a packet cannot contain tile parts from multiple tiles.
However, I have added code to track if multiple tile parts are included in a single RTP packet, in case in the future we want to put header and data in same packet.

2. Old code would set the tile id to zero for all J2K packets. This is now set correctly to the appropriate tile id.

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:25 +03:00
Aaron Boxer
84ff5511de rtpj2kpay: manage fragmented headers correctly
J2K main header framentation across multiple RTP packets is now handled correctly

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:19 +03:00
Aaron Boxer
d2765be120 rtpj2k: move common code to shared header, code clean up
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:15 +03:00
Aaron Boxer
82c2a5cbf8 rtpj2k: update documentation
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:09 +03:00
Patricia Muscalu
fe4dc610e6 auparse: Fix sticky event misordering warning
Make sure that src pad has caps before sending segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=766359
2016-05-13 10:21:35 +03:00
Sebastian Dröge
204a86af97 rtpsession: Don't notify about stats property changes while taking the session lock
The signal handlers might want to actually get the value of the stats
property, which would take the session lock again and deadlock.

This was introduced by 2e960e7075.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-11 09:28:13 +03:00
Thiago Santos
00f23053b1 qtdemux: improve edts segment handling after seeks in push mode
Properly handle edts segments for push-based operation seeking.
We only support edts that a single segment that has media at the end,
being preceeded by any number of gap segments.

This also allows the qt segment rate to be respected after seeks

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 11:46:46 -03:00
Thiago Santos
6604614dc5 qtdemux: properly activate segment with rate != 1.0
Also use the qt rate to identify the position within a qt segment
to properly translate playback time to qt media time

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 10:49:53 -03:00
Havard Graff
8f7962e1c3 rtpjitterbuffer: Fix stall when receiving already lost packet
When a packet arrives that has already been considered lost as part of a
large gap the "lost timer" for this will be cancelled. If the remaining
packets of this large gap never arrives, there will be missing entries
in the queue and the loop function will keep waiting for these packets
to arrive and never push another packet, effectively stalling the
pipeline.

The proposed fix conciders parts of a large gap definitely lost (since
they are calculated from latency) and ignores the late arrivals.

In practice the issue is rare since large gaps are scheduled immediately,
and for the stall to happen the late arrival needs to be processed
before this times out.

https://bugzilla.gnome.org/show_bug.cgi?id=765933
2016-05-06 14:32:42 +03:00
Miguel París Díaz
2e960e7075 rtpsession: Take session lock when creating stats
The access to the session hash table must happen while the session lock is
taken, otherwise another thread might modify the hash table while we're
creating the stats.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-06 09:24:22 +03:00
Thiago Santos
c70ed4c914 qtdemux: update segment when new duration is found
Otherwise the old segment will have a shorter stop time and would
cause the stream to end too early.
2016-05-05 09:30:48 -03:00
Thiago Santos
a5e02e948b qtdemux: dismember activate_segment into 2 parts
One that updates and push a new segment, the other will move the
stream to the new segment starting position
2016-05-05 09:30:48 -03:00
George Kiagiadakis
bd2a1487cc splitmuxsrc: add a format-location signal that allows bypassing the location property
This signal allows a user to directly return a sorted list of
files to be joined, so that they don't have to follow the
filename pattern that the "location" property expects.

https://bugzilla.gnome.org/show_bug.cgi?id=753625
2016-05-05 10:49:07 +01:00
Xavier Claessens
0fc02f35c7 splitmuxsink: Fix deadlock case when source reaches EOS
https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-05-05 01:22:10 +10:00
Stefan Sauer
36597cf201 wavparse: simplify and correct header scanning
The wav spec tells that 'fmt' (and 'bext' if present) must come before 'data'.
There is no requirement for 'fmt' to be first. We already had a list of chunks
to skip, but it is easier to just skip any chunk while seeking for 'fmt'.

This fixes reading files generated by ProTools.
2016-05-03 23:03:14 -07:00
Mark Nauwelaerts
eb336a804b avimux: set audio header rate according to calculated bps in stop_file
... now that set_fields is no longer called there by
e538608b3f
2016-05-01 15:14:00 +02:00
Sebastian Dröge
e0b26059ae qtdemux: Store the segment sequence number in the EOS events and SEGMENT_DONE events/message
Also instead of storing it per stream, store it globally in the demuxer. It's
the same for each stream anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=765806
2016-04-29 15:13:34 +03:00
Sebastian Dröge
3b7df52c86 udpsrc: Always bind to ANY when address is a multicast address and not only on Windows
For IPv6 addresses, binding to a multicast group does not work on Linux
either. Always bind to ANY and then later join the multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=764679
2016-04-29 11:48:23 +03:00
Sebastian Dröge
f8b87c8a05 qtmux: Allow MPEG-1 Layer 1 and 2 in addition to 3 in MP4
Via the MPEG-4 Part 3 spec we can support the other layers too.
Also correct the samples per frame calculation for MP3 if it's MPEG-2 or
MPEG-2.5.

https://bugzilla.gnome.org/show_bug.cgi?id=765725
2016-04-28 16:26:40 +03:00
Sebastian Dröge
7c728db1f3 rtspsrc: Update caps for TCP whenever they change
We only changed them for UDP so far, which caused the wrong seqnum-base and
other information to be passed to rtpjitterbuffer/etc when seeking. This
usually wasn't that much of a problem as the code there is robust enough, but
every now and then it causes us to drop up to 32756 packets before we
continue doing anything meaningful.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:32 +03:00
Sebastian Dröge
608b4ee53c rtpjitterbuffer: Ensure to not take caps with the wrong pt for getting the clock-rate
Especially the caps on the pad might be out of date, and the new caps would be
provided for the current pt via the request-pt-map signal.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:27 +03:00
Sebastian Dröge
d24e68719b rtspsrc: Don't propagate spurious state change returns from internal elements further
We handle them inside rtspsrc and override them in all other cases anyway, so
do the same for "internal" state changes like PAUSED->PAUSED and
PLAYING->PLAYING.

This keeps unexpected NO_PREROLL to confuse state changes in GstBin.

See also https://bugzilla.gnome.org/show_bug.cgi?id=760532

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:15 +03:00
Sebastian Dröge
e538608b3f avimux: Don't override maximum audio chunk size with the scale again just before writing it
set_fields() should only be called in the beginning, otherwise we will never
remember the maximum audio chunk size and write a wrong block align... which
then causes wrong timestamps and other problems.
2016-04-27 14:09:03 +03:00
Sebastian Dröge
34dc1298e9 avimux: Actually store the largest audio chunk size for the VBR case of MP2/MP3
3ea338ce27 changed avimux to do that, but it
never actually kept track of the max audio chunk for MP3 and MP2. These are
knowing the hdr.scale only after parsing the frames instead of at setcaps
time.
2016-04-27 13:54:31 +03:00
Mats Lindestam
63c284c24e multiudpsink: Allow setting "socket-v6" without setting "socket" too
https://bugzilla.gnome.org/show_bug.cgi?id=764897
2016-04-26 11:05:22 +03:00
Tim-Philipp Müller
4ba6214d3a deinterlace: fix description of linear interlacing method 2016-04-22 15:48:08 +01:00
Thibault Saunier
dd9bfd03ec flv: Handle the case where we do not get any CollectData in handle_buffer
https://bugzilla.gnome.org/show_bug.cgi?id=765320
2016-04-22 08:39:02 -03:00
Seungha Yang
cde45a41a5 qtdemux: Do not use unreliable framerate
timescale/1 is unreliable value for framerate. Due to downstream
element usually use framerate generated by qtdemux, let it be omitted
until the framerate can be reliably calculated.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:48 +03:00
Sebastian Dröge
707c69cb72 Revert "qtdemux: expose streams with first moof for fragmented format"
This reverts commit d8bb6687ea.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:33 +03:00
Alex Ashley
0c4cc14533 qtdemux: support seeking of CENC encrypted streams
When playing a stream that has been protected by DASH CENC, playback
will fail if a seek is performed. Qtdemux produces the error "stream
is protected using cenc, but no cenc protection system information
has been found" and playback stops.

The problem is that gst_qtdemux_reset() gets called as part of the
FLUSH during a seek. This function frees the protection_system_ids
array. When gst_qtdemux_configure_protected_caps() is called after the
seek has completed, the protection_system_ids array is empty and
qtdemux is unable to create the correct output caps for the protected
stream.

This commit changes it to only free the protection_system_ids on
hard resets.

https://bugzilla.gnome.org/show_bug.cgi?id=761787
2016-04-20 12:19:51 -03:00
Tim-Philipp Müller
76506190e9 udpsrc: add "retrieve-sender-address" property
This allows disabling of sender address retrieval, which might
be useful in certain scenarios, like when the socket is connected,
or the sender address is not of interest (e.g. when receiving an
MPEG-TS stream). Disabling sender address retrieval in those
cases can have minor performance advantages.

https://bugzilla.gnome.org/show_bug.cgi?id=563323
2016-04-18 14:33:10 +01:00
Xavier Claessens
7886e8d8a0 spitmuxsink: Avoid creating small file at EOS
When EOS is reached, the current file get closed and the last
GOP in the mq was written in a new file.

https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-04-16 22:14:37 +10:00
Sebastian Dröge
2dee0e385f scaletempo: S16 uses S32 temporary buffers, float/double their own type
Make sure to allocate not only a S16 buffer for S16 but a twice as big one to
hold S32.

https://bugzilla.gnome.org/show_bug.cgi?id=765116
2016-04-15 20:06:42 +03:00
Aleix Conchillo Flaqué
c36930535d rtspsrc: add srtp rollover counters from mikey crypto sessions
The server can send multiple crypto sessions, one for each SSRC with its
own rollover counter. We parse this information and pass it to the SRTP
decoder via the "request-key" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=730540
2016-04-15 18:12:06 +02:00
Jan Schmidt
a660ac7e88 rtpjitterbuffer: Fix debug output when resyncing
Don't output the pointer value of the time() function as a timestamp
by using the correct variable.

Fixes build on Raspberry Pi 3.
2016-04-15 14:35:07 +00:00
Damian Ziobro
ae4484c2ba splitmuxsink: Add max_files_number property
https://bugzilla.gnome.org/show_bug.cgi?id=744612
2016-04-14 04:18:11 +10:00
Reynaldo H. Verdejo Pinochet
6b209acf28 videomixer: drop reference to videomixer 2
Fix a small grammar mistake on "overlayed" while at it.
2016-04-13 10:57:03 -07:00
Paolo Pettinato
40fbffc208 rtpmux: Forward sticky events on buffer lists too, not only on buffers
https://bugzilla.gnome.org/show_bug.cgi?id=764933
2016-04-12 15:22:14 +03:00
Sebastian Dröge
1f21747cc5 deinterlace: Drain the field history if the caps are changing
Otherwise we will use fields from the old caps with everything set up for the
new caps, causing crashes and worse.

Also don't do anything if the same caps are set twice.
2016-04-12 15:01:28 +03:00
Sebastian Dröge
0c84b1b104 deinterlace: Instead of confusing crashes later, just error out immediately if mapping a video frame fails
This probably still crashes but at least we get some hint about what goes
wrong instead of random behaviour later.
2016-04-12 15:00:31 +03:00
Luis de Bethencourt
1bb9d9c682 qtdemux: check stream is available in PIFF parser
qtdemux->streams is an array, it will never evaluate to true when comparing
to NULL. Instead we want to check the number of streams to make sure the
stream is available.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:39:48 +01:00
Luis de Bethencourt
574bf8e02f Revert "qtdemux: redundant check in PIFF parser"
This reverts commit 41e10524f3.
2016-04-12 11:37:36 +01:00
Luis de Bethencourt
41e10524f3 qtdemux: redundant check in PIFF parser
qtdemux->streams is an array of size GST_QTDEMUX_MAX_STREAMS, it will never
evaluate to true when comparing to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:08:37 +01:00
Sebastian Dröge
4a0de53cc1 rtpjitterbuffer: Fix rtp_jitter_buffer_get_ts_diff() fill level calculation
The head of the queue is the oldest packet (as in lowest seqnum), the tail is
the newest packet. To calculate the fill level, we should calculate tail-head
while considering wraparounds. Not the other way around.

Other code is already doing this in the correct order.

https://bugzilla.gnome.org/show_bug.cgi?id=764889
2016-04-12 10:17:57 +03:00
Sebastian Dröge
95dc198563 rtpmanager: It's GST_LIBS, not GST_LIBS_LIBS 2016-04-11 10:44:56 +03:00
Seungha Yang
faa664b8ea qtdemux: Fix parsing segment duration of empty edit list box
For empty edit list, segment-duration in edit list box should not be
used for segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=764870
2016-04-11 10:28:07 +03:00
Nicola Murino
cbdbfc8902 matroskamux: make timecodescale configurable
In some use cases the default timecodescale will produce blocks with the same timestamp

https://bugzilla.gnome.org/show_bug.cgi?id=764769
2016-04-11 10:17:25 +03:00
Edward Hervey
5fa1c2ba59 jiterbuffer: Move assertion to the right location
We shouldn't have "late" lost timers at that point
2016-04-07 13:01:52 +02:00
Edward Hervey
b82da62922 jitterbuffer: Speed up lost timeout handling
When downstream blocks, "lost" timers are created to notify the
outgoing thread that packets are lost.

The problem is that for high packet-rate streams, we might end up with
a big list of lost timeouts (had a use-case with ~1000...).

The problem isn't so much the amount of lost timeouts to handle, but
rather the way they were handled. All timers would first be iterated,
then the one selected would be handled ... to re-iterate the list again.

All of this is being done while the jbuf lock is taken, which in some use-cases
would return in holding that lock for 10s... blocking any buffers from
being accepted in input... which would then arrive late ... which would
create plenty of lost timers ... which would cause the same issue.

In order to avoid that situation, handle the lost timers immediately when
iterating the list of pending timers. This modifies the complexity from
a quadratic to a linear complexity.

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:14:24 +02:00
Edward Hervey
d656fe8d54 jitterbuffer: Don't create lost events if we don't need them
When "do-lost" is set to FALSE we don't use/send the lost events.
In that case, don't create them to start with :)

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:13:56 +02:00
Edward Hervey
cf866a8469 jitterbuffer: Add tracing of lock usage
Helps with debugging lock usage

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:06:18 +02:00
Nirbheek Chauhan
e20a687737 rtpjpegdepay: Don't send invalid frames downstream after packet loss or a DISCONT
After clearing the adapter due to a DISCONT, as might happen when some packet(s)
have been lost, the depayloader was pushing data into the adapter (which had no
header due to the clear), creating a headerless frame out of it, and sending it
downstream. The downstream decoder would then usually ignore it; unless there
were lots of DISCONTs from the jitterbuffer in which case the decoder would reach
its max_errors limit and throw an element error. Now we just discard that data.

It is probaby not worth trying to salvage this data because non-progressive
jpeg does not degrade gracefully and makes the video unwatchable even with
low packet loss such as 3-5%.
2016-04-04 17:40:11 +01:00
Sebastian Dröge
df247f091c rtpjitterbuffer: Add RFC7273 media clock handling
https://bugzilla.gnome.org/show_bug.cgi?id=762259
2016-04-03 11:24:34 +03:00
Philippe Normand
fd7964e746 qtdemux: PIFF box detection and parsing support
The PIFF data is stored in a custom UUID box which is parsed and the
crypto_info of the element is updated accordingly. This allows
downstream decryptors to process and decrypt the protected content.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
2016-04-02 18:01:10 +01:00
Luis de Bethencourt
4b7e377d25 rtpvorbisdepay: remove dead code
payload_buffer hasn't been assigned a value before the jumps to
switch_failed or packet_short. So the value must be NULL. No need
to unmap and unref.

CID #1316476
2016-04-01 12:15:58 +01:00
Luis de Bethencourt
6a16be75bf rtph263pay: fix leak
Free memory of current macroblock once it isn't needed so it isn't leaked
by the call of the gst_rtp_h263_pay_B_mbfinder function.
if (!(mac = gst_rtp_h263_pay_B_mbfinder (context, gob, mac, mb))) {

CID 1212156
2016-03-31 15:25:17 +01:00