Commit graph

9280 commits

Author SHA1 Message Date
George Kiagiadakis
286e1e62be rtprtx{send,receive}: improve the debug messages
* use INFO/DEBUG/LOG/TRACE equaly and meaningfully;
  previously rtprtxsend:LOG and rtprtxreceive:LOG would generate
  a totally different amount of log traffic and sometimes it was
  impossible to see the information you wanted without useless
  spam being printed around
* improve the wording, give a reasonable and self-explanatory
  amount of information
* print SSRCs in hex
* avoid G_FOO_FORMAT for readability (we are just printing integers)
2017-09-07 14:43:32 +03:00
Jan Schmidt
d191584531 qtmux: Allow MPEG layer 1/2, AC3 and Opus in qtmux
qtmux is supposed to be the muxer that allows all formats,
with others (mp4mux and friends) being profile-restricted.
2017-09-06 23:55:38 +10:00
Tim-Philipp Müller
6f9cb1716a rtph265depay: fix keyunit detection
https://bugzilla.gnome.org/show_bug.cgi?id=787254
2017-09-05 13:56:18 +01:00
Edward Hervey
5bc5e07531 dcaparse: Really fix "usage before unmap"
Previous patch would try to unref a buffer that was pushed downstream.

Instead only unref when/if needed and keep usage of the cleanup: goto
block
2017-09-04 17:06:39 +02:00
Arun Raghavan
5cf368b36c dcaparse: Don't unmap buffer before accessing data from it
The previous patch added a check for a substream header after
gst_buffer_unmap(), which is incorrect.
2017-09-03 15:23:10 +05:30
Matej Knopp
f7854411fa dcaparse: preserve DTS HD substream 2017-09-03 15:05:08 +05:30
Arun Raghavan
301e8d558e rtpsbcpay: Fix some tabs that crept in somehow 2017-08-29 22:12:35 +05:30
Sebastian Dröge
71104f452e rtpbin: Also log local and SR RTP running times when doing ntp-sync=true 2017-08-29 19:14:25 +03:00
Matthew Waters
f602b8e5b0 rtpbin: also create session when creating the send_rtcp_src_%u pad
If one requests the send_rtcp_src_%u pad before a recv_rtcp_sink_%u pad,
the session/pad would never be created and NULL was returned.
Switching the request order would work.

https://bugzilla.gnome.org/show_bug.cgi?id=786718
2017-08-29 12:47:30 +10:00
Sky Juan
bc290059a4 ac3parse: fix not-linked handling causing glitches when selecting stream
Fix chain function not handling not-linked from baseparse.

When an input data is separated into 2 buffers, the second buffer
would not be pushed into the adapter if baseparse returns not-linked
for first buffer.

This caused glitches when switching streams and selecting
a stream that was previously unselected.

https://bugzilla.gnome.org/show_bug.cgi?id=786268
2017-08-16 14:09:31 +01:00
Jan Alexander Steffens (heftig)
1de2df03be goom2k1: Convert source files to UTF-8
Causes problems with the new gtk-doc 1.26 otherwise,
but is a good idea in any case.

https://bugzilla.gnome.org/show_bug.cgi?id=786364
2017-08-16 13:07:45 +01:00
Eduard Sinelnikov
6d61471da6 wavparse: Add support for growing WAV files
With some fixes by me.
2017-08-14 16:02:35 +03:00
Arun Raghavan
e6b6583a5e rtpsbcpay: Fix compile error 2017-08-14 17:39:15 +05:30
Jochen Henneberg
f641ac60e3 rtpsbcpay: fix if buffer size exceeds MTU
The plugin queued buffer data if not all buffer data fit
into a single RTP packet. Now RTP packets are pushed as long
as enough data is available.
2017-08-14 16:56:17 +05:30
Mathieu Duponchelle
5e48e85fb7 rtpstats: fix unsigned integer comparisons.
Callers of the API (rtpsource, rtpjitterbuffer) pass clock_rate
as a signed integer, and the comparison "<= 0" is used against
it, leading me to think the intention was to have the field
be typed as gint32, not guint32.

This led to situations where we could call scale_int with
a MAX_UINT32 (-1) guint32 as the denom, thus raising an
assertion.

https://bugzilla.gnome.org/show_bug.cgi?id=785991
2017-08-11 13:29:24 +02:00
Michael Olbrich
61429a78a8 qtdemux: allow larger files
For really long files such as contiguous recordings of a whole day, the
50MB limit is not sufficient.

https://bugzilla.gnome.org/show_bug.cgi?id=781458
2017-08-10 16:17:56 +03:00
Sebastian Dröge
7d89e73336 qtdemux: Fix offsets for reading lpcm specific fields
We were reading at the completely wrong positions, 16 bytes later in the
data.

Also add support for high-aligned samples.
2017-08-10 16:13:05 +03:00
Deepak Srivastava
059420b678 wavparse: Fix memory leak in wavparse element
Fixing of leaking the text field of the GstWavParseNote and
GstWavParseLabl structure.

https://bugzilla.gnome.org/show_bug.cgi?id=785429
2017-08-10 13:23:47 +03:00
Sebastian Dröge
4b8d0a294a mulawdec: Unmap input buffer if failing to map the output buffer 2017-07-27 14:23:14 +03:00
Satya Prakash Gupta
e3f6b9f367 alawdec: Fix Memory leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=785435
2017-07-27 14:23:14 +03:00
Sebastian Dröge
317d3380bb matroskamux: For audio tracks, take the default duration from the first buffer
... if we don't have any better idea from the caps. This allows writing
SimpleBlocks for a majority of audio streams where the duration of
frames is usually fixed. And as a side effect, allows VLC to play
streams with Opus as it only works with SimpleBlocks currently:
  https://trac.videolan.org/vlc/ticket/18545

https://bugzilla.gnome.org/show_bug.cgi?id=784969
2017-07-25 11:28:46 +03:00
Mark Nauwelaerts
7bd439efb5 qtdemux: preferably send open-ended segment rather than repeated segment events 2017-07-19 18:35:58 +02:00
Mark Nauwelaerts
854f85acb4 qtdemux: fix seeking in fragmented file without mfra random access info
... which no longer worked due to unconditionally clearing sample info and
ending up in inconsistent state.  Let's tread a bit more carefully and also
allow for the old seek handling that resorts to scanning if no mfra info
is available.
2017-07-19 18:35:49 +02:00
Nicola Murino
1bbdfa8738 matroskamux: add properties to control cluster duration
https://bugzilla.gnome.org/show_bug.cgi?id=784971
2017-07-18 10:08:33 +03:00
Sebastian Dröge
c0318f3d60 qtdemux: Fix parsing of RLE depth
Regression introduced by 86b427dc70

https://bugzilla.gnome.org/show_bug.cgi?id=784812
2017-07-13 12:47:27 +03:00
Yasushi SHOJI
c7f42cc3bc rtpgsmpay: fix accidental garbage data before actual payload
Do not allocate payload size outbuf if appending payload buffer.

The commit 137672ff18 attached payload
to the output buffer but forgot to remove payload allocation.  That
effectively doubled payload size and add zero'ed or random bytes.

Makes the following pipeline work again:

gst-launch-1.0 -v audiotestsrc wave=2 ! gsmenc ! rtpgsmpay ! rtpgsmdepay ! gsmdec ! autoaudiosink

https://bugzilla.gnome.org/show_bug.cgi?id=784616
2017-07-09 13:21:23 +01:00
Mark Nauwelaerts
286df32e03 matroskademux: segment seek position is expressed in buffer time
... so it need not be corrected again for stream start
2017-07-09 10:55:00 +02:00
Mark Nauwelaerts
dad2b41e4d avidemux: provide average bitrate tag 2017-07-09 10:55:00 +02:00
Olivier Crête
96e71b0286 rtpsession: Send EOS if all internal sources sent bye
The ones which are not internal should not matter, and we should
wait for all sources to have sent their BYEs.

And add unit test

https://bugzilla.gnome.org/show_bug.cgi?id=773218
2017-07-04 21:14:10 -04:00
Olivier Crête
7e7e52caa0 rtpsession: Only send EOS if all sources have been marked bye
Now that multiple sender RTPSource can share the same RTPSession, we
must not send an EOS unless they're all marked bye.
2017-07-04 13:36:44 -04:00
Nicolas Dufresne
bf5cbce3b4 rtprtxreceive: Add memory and boudary checks
This element was not checking if mapping the RTP buffer and the payload
worked, and was not checking if the RTX payload was large enough.

https://bugzilla.gnome.org/show_bug.cgi?id=784484
2017-07-04 09:58:15 -04:00
Tim-Philipp Müller
d712a2f4b7 imagefreeze: fix use-after-free on seek event
Get seqnum before unreffing the seek event.

https://bugzilla.gnome.org/show_bug.cgi?id=784486
2017-07-03 20:43:12 +01:00
Mark Nauwelaerts
f9f1a03653 qtmux: robustify time tracking for sparse subtitle stream 2017-07-01 18:59:14 +02:00
Mark Nauwelaerts
d1d149ce82 qtmux: correctly track chunk size of subtitle stream
... thereby ensuring correct chunk offset tracking for all streams.
2017-07-01 18:59:07 +02:00
Julien Isorce
afbabaefbe rtpstats: fix assertion 'denom > 0' failed
gst_util_uint64_scale_int takes a gint as denom parameter
whereas ctx->clock_rate is a guint32.

It happens when gst_rtp_packet_rate_ctx_reset set clock_rate
to -1.

So just define clock_rate as gint like it is done in rtpsource.h

https://bugzilla.gnome.org/show_bug.cgi?id=784250
2017-06-29 15:58:44 -04:00
Sebastian Dröge
cd17c71dce rtspsrc: Create send/recv mutexes once, not on every connect()
Also fixes a crash caused by freeing an uninitialized mutex in an error
case.

https://bugzilla.gnome.org//show_bug.cgi?id=784282
2017-06-29 18:59:58 +03:00
Mark Nauwelaerts
83987b5037 qtdemux: specify '_swr' atom as a container atom
... so it is parsed as an mp4 style metadata atom as written by muxer
2017-06-28 20:00:44 +02:00
Mark Nauwelaerts
dbcb99ac1d qtmux: initialize mdhd language code as undefined 2017-06-28 20:00:44 +02:00
Nicolas Dufresne
bbe0053f8a rtpjitterbuffer: Add a faststart-min-packets property
When set this property will allow the jitterbuffer to start delivering
packets as soon as N most recent packets have consecutive seqnum. A
faststart-min-packets of zero disables this feature. This heuristic is
also used in rtpsource which implements the probation mechanism and a
similar heuristic is used to handle long gaps.

https://bugzilla.gnome.org/show_bug.cgi?id=769536
2017-06-28 11:51:10 -04:00
Mark Nauwelaerts
949902f1e2 qtmux: correctly calculate overall first_ts to ensure stream sync
... by minding and compensating for the dts_adjustment that may have
been introduced in the PTS timeline.
2017-06-24 17:36:54 +02:00
Mark Nauwelaerts
04fd953713 matroskademux: track highest known cluster position and time
... to use as a fallback initial duration estimate and to provide for
interpolation when scanning for position.
2017-06-24 17:36:54 +02:00
Mark Nauwelaerts
84c6aaf45b matroskademux: improve and simplify searching for cluster and position
... avoiding inefficiency proportional to file size
2017-06-24 17:36:54 +02:00
Mark Nauwelaerts
d7b736fa11 matroskademux: increase chunk size when scanning for cluster 2017-06-24 17:36:54 +02:00
Mark Nauwelaerts
b19ef0df30 matroskademux: maintain variable state when searching for position
... so skipping to next cluster happens efficiently
2017-06-24 17:36:54 +02:00
Sebastian Dröge
c438545dc9 rtspsrc: Actually use the receive lock when receiving, not the send lock 2017-06-22 11:39:16 +03:00
Mathieu Duponchelle
0da5679c6f rtspsrc: do not checksum the stream id
https://bugzilla.gnome.org/show_bug.cgi?id=783307
2017-06-16 17:30:11 +02:00
Tim-Philipp Müller
3a0fe9c2f5 qtmux: add support for muxing PNG
Demuxer already supported it.
2017-06-15 23:31:24 +01:00
Sebastian Dröge
a722f6e832 rtspsrc: Use a mutex for protecting against concurrent send/receives
We currently send data to the RTSP connection from multiple threads:
whenever a command is to be handled and whenever RTCP is generated. This
can cause data corruption or worse if both happen at the same time.

As such, protect gst_rtsp_connection_send() and gst_rtsp_connection_receive()
calls with a mutex. While this means that we hold a mutex during the IO
operation, this is not actually a problem as the IO operation can be
interrupted (gst_rtsp_connection_flush()) at any time and is blocking by
itself anyway.
2017-06-15 15:25:23 +03:00
Sebastian Dröge
deb9c62cd9 qtmux: Un-merge the last two stsc entries after serializing
The last entry will most likely get new samples added to it in "robust"
muxing mode, changing the samples_per_chunk and thus making it wrong to
keep the last two entries merged. It will run into an assertion later
when adding a new sample to the chunk.

Thanks to gdiener@cardinalpeak.com for the analysis of the bug and
proposal for a solution.
2017-06-15 11:50:44 +03:00
Sebastian Dröge
a82e38d607 wavparse: Actually clip to upstream size instead of size of the data chunk
There might be other chunks after the data chunk, so clipping the chunk
size with the data size can lead to a negative number and all following
calculations go wrong and cause crashes or worse.

This was introduced in 3ac119bbe2.

https://bugzilla.gnome.org/show_bug.cgi?id=783760
2017-06-14 00:11:17 +03:00