Commit graph

9453 commits

Author SHA1 Message Date
Edward Hervey 2e45926a96 qtdemux: Don't push GAP event if first buffer is within 1s
If we saw empty segments, we previously unconditionally pushed a
GAP event downstream regardless of the duration of that empty
segment.

In order to avoid issues with initial negotiation of downstream elements
(which would negotiate to something before receiving any data due to
that initial GAP event), check if there's at least a second of difference
(like we do for other GAP-related checks in qtdemux) before
deciding to push a GAP event downstream.
2017-12-13 11:35:37 +01:00
Edward Hervey 5c341f0980 qtdemux: Don't set pared=True on underspecified audio/mpeg
This *really* needs to go through a parser to figure out what the
exact content type is.
2017-12-13 10:21:17 +01:00
Michael Catanzaro d9235cdb49 equalizer: Fix -Wincompatible-pointer-types warning
This is caused by the new type propagation for g_object_ref.

https://bugzilla.gnome.org/show_bug.cgi?id=791494
2017-12-11 21:57:25 +00:00
John Nikolaides 91dfc20a04 splitmuxsink: added a "split now" action signal
Now, the video file can be split at an arbitrary time chosen by the user.

https://bugzilla.gnome.org/show_bug.cgi?id=787922
2017-12-08 21:16:15 +02:00
Alvaro Margulis 66f253ed9b multiudpsink: fix bind address leak
https://bugzilla.gnome.org/show_bug.cgi?id=790986
2017-12-08 00:31:32 +00:00
Tim-Philipp Müller d4c04cb079 Revert "flacparse: fix header rewriting being ignored"
This caused broken metadata and also looks a bit dodgy.
Revert until we can figure out a solution that works for
all cases and doesn't break anything.

This reverts commit adeee44b07.

https://bugzilla.gnome.org/show_bug.cgi?id=727802
https://bugzilla.gnome.org/show_bug.cgi?id=785558
2017-12-07 11:17:32 +00:00
Matt Staples ea1b10e4ca rtspsrc: Add a signal to allow outgoing messages to be modified or dropped
This feature allows applications to implement extensions to the RTSP
protocol, such as those defined in the ONVIF Streaming Specification.

https://bugzilla.gnome.org/show_bug.cgi?id=762884
2017-12-06 10:46:01 +02:00
Haakon Sporsheim 3c0d006c03 rtpsession: Handle zero length feedback packets
https://bugzilla.gnome.org/show_bug.cgi?id=791074
2017-12-02 13:58:34 +00:00
Florian Zwoch b4ca81591c qtdemux: fix debug log for 'hvcC' codec_data
https://bugzilla.gnome.org/show_bug.cgi?id=784749
2017-12-02 13:46:29 +00:00
Sebastian Dröge b02350bd62 flacparse: Request at least the full header size when parsing headers
Otherwise baseparse will incrementally send us bigger buffers until the
full header size is reached, which is not only pointless but also means
that baseparse will reallocate and copy into a bigger buffer for every
input buffers. In pull mode that's done in 64kb increments, in push mode
usually in much smaller increments, causing a lot of overhead for
example when parsing high-quality coverart.
2017-11-29 17:28:25 +02:00
Edward Hervey 10bc8fdfd2 rtspsrc: Do more checks for seekability
When receiving a seek event, check whether we can actually seek based
on the information the server provided.

Also add more documentation on what the seekable field means
2017-11-24 15:39:38 +01:00
Jan Schmidt a260eb80fb qtmux: Always update reserved-duration-remaining
If a reserved-max-duration is set, we should always track
and update the reserved-duration-remaining estimate, even
if we're not sending periodic moov updates downstream for
full robust muxing.
2017-11-25 00:56:11 +11:00
Jan Schmidt 76e458a119 splitmuxsink: Use muxer reserved space properties if present.
If the use-robust-muxing property is set, check if the
assigned muxer has reserved-max-duration and
reserved-duration-remaining properties, and if so set
the configured maximum duration to the reserved-max-duration
property, and monitor the remaining space to start
a new file if the reserved header space is about to run out -
even though it never ought to.
2017-11-25 00:56:11 +11:00
Jan Schmidt 3a813a0dcc splitmux: Fix file switch-on-caps-change.
Switching to a new fragment because the input caps have
changed didn't properly end the previous file. Use the normal
EOS sequence to ensure that happens. Add a test that it works.
2017-11-24 16:56:03 +11:00
Tim-Philipp Müller c8ff205089 rtph265depay: don't insert SPS/PPS inline for hvc1 output
Only for byte-stream or hev1. For hvc1 the SPS/PPS are in the
caps as codec_data field and in this case they shouldn't be in
the stream data as well. The output caps should be updated with
the new codec_data if needed, for hvc1.
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 8da79ca824 rtph265depay: store negotiated output format as enum
We keep the boolean byte_stream around since it's nicer for
readability and most of the code just cares about byte_stream
or not. This is useful for future-proofing the code for when
we add support for hev1 output as well.
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 46861027b9 rtph265depay: add support for hvc1 as output format 2017-11-23 09:36:15 +01:00
Tim-Philipp Müller b84201bf81 rtph265pay: don't add trailing zeros to VPS/PPS/SPS
This would happen if input is byte-stream with four-byte
sync markers instead of three-byte ones. The code that
scans for sync markers will place the start of the NALU
on the third-last byte of the NALU sync marker, which
means that any additional zeros may be counted as belonging
to the previous NALU instead of being part of the next sync
marker. Fix that so we don't send VPS/SPS/PPS with trailing
zeros in this case.

See https://bugzilla.gnome.org/show_bug.cgi?id=732758
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 311b9895ba rtph265depay: assemble AUs into downstream-allocated memory
When merging NALs into AUs, use downstream-provided allocator
to allocate memory and copy NALs directly into that memory when
assembling them.
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 2d0ea4d381 rtph265depay: try to negotiate an allocator with downstream 2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 528b7e01f1 rtph265depay: simplify buffer accumulation control flow
There is no difference between pushing out a buffer directly
with gst_rtp_base_depayload_push() and returning it from the
process function. The base class will just call _depayload_push()
on the returned buffer as well.

So instead of marshalling buffers through three layers and back,
just push them from one place in handle_nal() and always return
NULL from the process vfunc. This simplifies the code a little.

Also rename _push_fragmentation_unit() to _finish_fragmentation_unit()
for clarity. Push sounds like it means being pushed out, whereas
it might just be pushed into an adapter.

This change has the side-effect that multiple NALs in a single STAP
(such as SPS/PPS) may no longer be pushed out as a single buffer if
we output NALs in byte-stream format (i.e. not aggregate AUs), but
that shouldn't really make any difference to anyone.
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 289882497a rtph265depay: fix crash with empty sprops-parameters
https://bugzilla.gnome.org/show_bug.cgi?id=780040
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller 0580efc6a6 rtph265depay: minor clean-up
Declutter caps update code a bit.
2017-11-23 09:36:15 +01:00
Philip Craig ec11b228a4 rtph264pay: don't add trailing zeros to PPS/SPS
This would happen if input is byte-stream with four-byte
sync markers instead of three-byte ones. The code that
scans for sync markers will place the start of the NALU
on the third-last byte of the NALU sync marker, which
means that any additional zeros may be counted as belonging
to the previous NALU instead of being part of the next sync
marker. Fix that so we don't send SPS/PPS with trailing
zeros in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=732758
2017-11-23 09:36:15 +01:00
Tim-Philipp Müller f3e4df72a1 rtph264depay: assemble AUs into downstream-allocated memory
When merging NALs into AUs, use downstream-provided allocator
to allocate memory and copy NALs directly into that memory when
assembling them.
2017-11-23 09:35:59 +01:00
Tim-Philipp Müller b6f13ce4e9 rtph264depay: try to negotiate an allocator with downstream 2017-11-23 09:35:59 +01:00
Tim-Philipp Müller 44f70445b6 rtph264depay: minor clean-up
Declutter caps update code a bit.
2017-11-23 09:27:22 +01:00
Edward Hervey 22ab222dbc qtdemux: Run gst-indent 2017-11-23 08:00:58 +01:00
Edward Hervey 4e90993423 rganalysis: Fix left shift of signed values
left shifting signed values is undefined.

Instead of doing "x << offs" which is undefined, do the equivalent
"x * (1 << offs)" which is well defined
2017-11-23 07:59:07 +01:00
Edward Hervey d08e155ec8 qtdemux: Check presence of bitrate tags
Check whether the tag was present before printing it out

CID #1418501
2017-11-23 07:57:44 +01:00
Edward Hervey 92c3207463 rtspsrc: Use the proper maximum value for seekable
it's a gfloat, not a gdouble
2017-11-21 09:33:49 +01:00
Jan Schmidt 3ba556a54d qtdemux: Use new GST_SEQNUM_INVALID constant 2017-11-18 02:33:01 +11:00
Jan Schmidt 97e8fd8272 splitmuxsrc: Don't return FALSE from event handling.
Returning FALSE because we drop an event means that
internal sources like qtdemux might throw an error
and break the whole pipeline. The only time it can
happen is either flushing or shutdown, and those
will be handled anyway.
2017-11-18 02:33:00 +11:00
Jun Xie 7c8aeff262 qtdemux: reset reused QtDemuxStream while parsing a new 'trak'
if QtDemuxStream is reused, then we need to reset it.

https://bugzilla.gnome.org/show_bug.cgi?id=788759
2017-11-17 11:49:24 +02:00
Seungha Yang 8aa5c59b5f isomp4: Add official fourcc for VP8 codec
fourcc for VP8 codec is "vp08" defined by spec. To follow it,
add it to demux and change legacy VP8 fourcc "VP80" to "vp08" in mux.
Also, enable sync table in case of VP8 codec.
See also https://www.webmproject.org/vp9/mp4/

https://bugzilla.gnome.org/show_bug.cgi?id=790026
2017-11-13 10:08:14 -05:00
Seungha Yang 93f19b19d2 isomp4: Add support VP9 codec
Add fourcc for VP9 codec and support it by qtdemux and qtmux
See also https://www.webmproject.org/vp9/mp4/

https://bugzilla.gnome.org/show_bug.cgi?id=790026
2017-11-13 10:08:14 -05:00
Edward Hervey f89d672eb7 matroskademux: Remove bogus error message
It's just informational
2017-11-13 13:51:20 +01:00
Edward Hervey 50c3733a89 rtpmpvpay: Don't create empty buffer list
If there's nothing to send, just return
2017-11-10 15:51:05 +01:00
Seungha Yang 5dd39d8946 matroskademux: Add parsing Colour element
... and forward colorimetry to downstream. The Colour element describes
various color information (similar to 'colr' box in isobmff).
Note that, due to the comparatively limited syntax for color information
in vpx codecs, the color information in mkv/wemb container level
should be used for sophisticated color handling (e.g., HDR video).

https://bugzilla.gnome.org/show_bug.cgi?id=790023
2017-11-08 11:01:55 +02:00
Youness Alaoui 593615de46 rtpg722pay: Add encoding-params to the src caps template
The G722 payload only accepts G722 audio with channels=1, so it must
specify the encoding-params=1 in its src caps, otherwise it causes issues
with farstream which thinks it supports 2 channels G722 and when
confronted with a remote that has G722/8000/2, it will negotiate it
and error out with a not-negotiated when the caps don't intersect
at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=789878
2017-11-03 17:20:31 -04:00
Sebastian Dröge af3ce874a0 rtspsrc: Add "accept-certificate" signal for manually checking a TLS certificate for validity
https://bugzilla.gnome.org/show_bug.cgi?id=785024
2017-11-01 13:42:45 +02:00
Sangkyu Park 257f7c9063 rtspsrc: Print RTSP/SDP messages to gstreamer log instead of stdout
- 'debug' property is deprecated
- All RTSP messages are printed to gstreamer log with 'log' level.

https://bugzilla.gnome.org/show_bug.cgi?id=788917
2017-11-01 11:35:44 +02:00
Justin Kim 2a5aafe425 rtpsesson: downgrade message level to debug when detected XR
When XR packet is detected, warning message leads to misunderstandings.
Until RFC3611 is implemented in gst-plugins-base, the level needs to
be downgraded to avoid confusion.

https://bugzilla.gnome.org/show_bug.cgi?id=789746
2017-11-01 10:57:00 +02:00
Ashish Kumar 1aed3948a8 gst-plugins-good: atoms_recovery: Handled buffer mapping failure
https://bugzilla.gnome.org/show_bug.cgi?id=789413
2017-10-24 22:04:27 -07:00
Thiago Santos 923b83a48c atomsrecovery: read from mdat only what is on headers
It is possible that the mdat has more data than what was stored in the
headers file. If we put that to the output the file will have bogus data
at the end and some players will complain.

https://bugzilla.gnome.org/show_bug.cgi?id=784258
2017-10-24 21:33:25 -07:00
Thiago Santos 69605b6c61 isomp4: atomsrecovery: handle common and large atom headers
Do not assume all files are large files. Check and use the short or
extended atom size field only if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=784258
2017-10-24 21:33:25 -07:00
Thibault Saunier 6d72ae13fe rtsp: Add missing Since marker 2017-10-16 14:21:56 +02:00
Sebastian Dröge 728a1629cf qtdemux: Fix compiler warning
qtdemux.c: In function ‘gst_qtdemux_configure_stream’:
qtdemux.c:7764:34: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
     if ((stream->n_samples == 1) && (stream->first_duration == 0)
         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-10-10 18:04:50 +03:00
Nael Ouedraogo 5874bafa4f qtdemux: fix assert when moof containing one sample
Avoid computing frame rate when a stream contain moof with only one
sample, to avoid an assert. The moof is considered as still picture.

The same is already done for one sample given in the moov.

https://bugzilla.gnome.org/show_bug.cgi?id=782217
2017-10-10 18:03:42 +03:00
Thibault Saunier fb952e3470 rtspsrc: Avoid potentially dereferencing NULL pointer
CID 1418986
2017-10-09 14:39:14 +02:00
Tim-Philipp Müller 6cb51bd8cf rtpjitterbuffer: fix debug message on pt mismatch 2017-10-08 00:07:43 +01:00
Tim-Philipp Müller d5f72418c8 rtpbin, rtspsrc: fix compiler warnings about 64-bit integer signednes
"warning: this decimal constant is unsigned only in ISO C90" with
gcc 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3)
2017-10-07 15:55:24 +01:00
Sebastian Dröge 263494f9c7 rtpsbcdepay: Fix potential NULL pointer dereference
CID 1418864
2017-10-07 14:06:38 +03:00
Sebastian Dröge 7d80fa4bbf audioecho: Micro-optimize
Gives 1.28x speedup in surround-delay=false mode
2017-10-07 03:03:46 +03:00
Sebastian Dröge ad062e1879 audioecho: Don't do linear interpolation between samples
Linear interpolation adds quite some noise, and it's unlikely that
anybody will ever need sub-sample accurate delays. Proper resampling
before that will lead to better results.
2017-10-07 03:03:46 +03:00
Nicolas Dufresne 986f3e15b2 flvdemux: Only set pixel-aspect-ratio if specified
If it's not specified, we should let the decoder figure it out.
Apparently the code was already in place, all was to make the code
conditional.

https://bugzilla.gnome.org/show_bug.cgi?id=787795
2017-10-05 21:20:19 -04:00
Nicolas Dufresne 307018da89 flvdemux: Don't pull passed the EOS
When a truncated FLV is provided and processed in pull mode, we
may endup trying to pull passed EOS, causing a rather confusing
warning as the pull offset is an integer overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=787795
2017-10-05 21:20:19 -04:00
Nicolas Dufresne cfc1638ca5 flvdemux: Ignore invalid H.264 codec data
This code basically skip over codec_data with empty payload. In
this case, the codec_data variable is the size of the header for
the CODEC part of Video Tag. The remaining is supposed to be the
H.264 codec data, hence should not be empty.

https://bugzilla.gnome.org/show_bug.cgi?id=787795
2017-10-05 21:20:19 -04:00
Nicolas Dufresne 18dbd49fb8 flvdemux: Avoid integer overflow on invalid CTS
If the CTS is negative an would lead to a negtive PTS, clip
the CTS so the PTS will be 0.

https://bugzilla.gnome.org/show_bug.cgi?id=787795
2017-10-05 21:20:19 -04:00
Thibault Saunier 125e835045 rtspsrc: Fix build 2017-10-05 14:37:54 -03:00
Thibault Saunier ffcd173c09 rtspsrc: Handle TCP as lower transport with RTSP 2.0
Meaning that the interleave fields have to be updated as
if streams setup was working when using pipelined setup
request. Otherwise there is a mismatch between the server
channel count and our own.

This also makes RTSP 2.0 over HTTP working.

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 12:05:40 -03:00
Thibault Saunier 8121752887 rtsp: Start implementing support for RTSP 2.0
- Handle version negotation:

  Added a `default-version` property so that the user can configure
  what to use in case the server does not support version negotation
  (which actually exist)

- Handle pipelined requests, which allow avoiding full round trip to
  setup the RTP streams (request are sent in a raw, and response are
  handled as they arrive).

- Handle the new Media-Properties header

- Handle the new Seek-Style header

- Handle the new Accept-Ranges header

Handling of IPV6 should already be OK.

We are still missing (at least) the following features (which do not
seem really mandatory as they require a "persistent connection between
server and client"):

  - Server to Client TEARDOWN command (Not so usefull fmpov)
  - PLAY_NOTIFY (not needed for our server yet)
  - Support for the new REDIRECT features

and probably some more protocol changes might not be handled yet.

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 12:05:40 -03:00
Thibault Saunier 5faad79049 rtspsrc: Use a macro to debug RTSP messages
Simplifying the code a little.

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 12:05:39 -03:00
Reynaldo H. Verdejo Pinochet 0ddb65dec7 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 16:30:10 -07:00
Sebastian Dröge 26cf8c1dc9 rtspsrc: Ignore medias marked as sendonly
We're never going to receive anything from them, so don't create pads
for them. These medias are destinations where *we* could send something.
2017-10-01 16:09:13 +02:00
Sebastian Dröge 58f0eabd61 sbcdepay: Add property to ignore input timestamps
This then just counts samples and calculates the output timestamps based
on that and the very first observed timestamp. The timestamps on the
buffers are continued to be used to detect discontinuities that are too
big and reset the counter at that point.

When receiving data via Bluetooth, many devices put completely wrong
values into the RTP timestamp field. For example iOS seems to put a
timestamp in milliseconds in there, instead of something based on the
current sample offset (RTP clock-rate == sample rate).

https://bugzilla.gnome.org/show_bug.cgi?id=787297
2017-09-28 14:15:12 +03:00
Ponnam Srinivas c0622addf6 rtph265depay: Fix Memory leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=787937
2017-09-26 11:09:53 +03:00
Deepak Srivastava 49ed67c4f2 deinterlace: Fixed memory leak in error code path
https://bugzilla.gnome.org/show_bug.cgi?id=788041
2017-09-22 17:25:50 +03:00
Tim-Philipp Müller a802f5df42 rtpjitterbuffer: implement basic chain_list function
Doesn't do anything fancy yet, but still avoids lots of
unnecessary locking/unlocking that would happen if the
default chain_list fallback function in GstPad got invoked.
2017-09-17 16:33:15 +01:00
Tim-Philipp Müller 07dd3dba6f multifilesink: use new gst_buffer_list_calculate_size() 2017-09-17 12:50:30 +01:00
Patrick Radizi 3de0244532 rtpbin: add option for sanity checking timestamp offset
Timestamp offsets needs to be checked to detect unrealistic values
caused for example by NTP clocks not in sync. The new parameter
max-ts-offset lets the user decide an upper offset limit. There
are two different cases for checking the offset based on if
ntp-sync is used or not:
1) ntp-sync enabled
   Only negative offsest are allowed since a positive offset would
   mean that the sender and receiver clocks are not in sync.
   Default vaule of max-ts-offset = 0 (disabled)
2) ntp-sync disabled
   Both positive and negative offsets are allowed.
   Default vaule of max-ts-offset = 3000000000
The reason for different default values is to be backwards
compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=785733
2017-09-15 13:33:14 +03:00
Patrick Radizi 23f7739ba4 rtpbin: add option for increasing ts_offset gradually
Instant large changes to ts_offset may cause timestamps to move
backwards and also cause visible effects in media playback. The new
option max-ts-offset-adjustment lets the application control the rate to
apply changes to ts_offset.

https://bugzilla.gnome.org/show_bug.cgi?id=784002
2017-09-14 13:15:56 +03:00
Mark Nauwelaerts cf3f195012 matroskademux: search_cluster should find preceding cluster before target
... since failing this constraint takes search_pos by surprise which might
then end up in an infinite loop.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=787538
2017-09-11 20:39:22 +02:00
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
Vivia Nikolaidou 96cd941788 splitmux: Drop allocation queries
They can cause us to deadlock, while we're waiting for a new frame and
upstream is waiting for the allocation query to be answered before
sending a frame

https://bugzilla.gnome.org/show_bug.cgi?id=783753
2017-06-13 18:29:37 +03:00
Mathieu Duponchelle f6283b082e rtspsrc: uniquify stream ids
https://bugzilla.gnome.org/show_bug.cgi?id=783307
2017-06-07 23:30:05 +02:00
Jimmy Ohn 55e0b18186 qtdemux: remove not needed code
remove not needed code about res variable.

https://bugzilla.gnome.org/show_bug.cgi?id=783422
2017-06-06 11:02:59 +02:00
Tim-Philipp Müller 18b53c2236 rtph265depay: fix caps leak 2017-06-02 11:30:15 +01:00
Tim-Philipp Müller a68a7fb65d rtph264depay: simplify buffer accumulation control flow
There is no difference between pushing out a buffer directly
with gst_rtp_base_depayload_push() and returning it from the
process function. The base class will just call _depayload_push()
on the returned buffer as well.

So instead of marshalling buffers through three layers and back,
just push them from one place in handle_nal() and always return
NULL from the process vfunc. This simplifies the code a little.

Also rename _push_fragmentation_unit() to _finish_fragmentation_unit()
for clarity. Push sounds like it means being pushed out, whereas
it might just be pushed into an adapter.

This change has the side-effect that multiple NALs in a single STAP
(such as SPS/PPS) may no longer be pushed out as a single buffer if
we output NALs in byte-stream format (i.e. not aggregate AUs), but
that shouldn't really make any difference to anyone.
2017-06-01 17:32:17 +01:00
Juan Navarro 72d2afda18 rtpsession: print value of unknown RTCP Payload Type
This adds printing the actual value of any unknown RTCP PT
to the already existing WARNING log message.

https://bugzilla.gnome.org/show_bug.cgi?id=783248
2017-05-31 10:20:27 +03:00
Tim-Philipp Müller a9f9166004 rtpopusdepay: minor perf improvements
Use the ::process_rtp_packet() vfunc to avoid mapping the
RTP buffer twice.

gst_rtp_buffer_get_payload_buffer() returns a new sub-buffer
which will always be writable, so no need to make it writable.
2017-05-24 16:41:45 +01:00
Tim-Philipp Müller f9a740b319 rtp: opus: use existing utility funcs for copying/dropping metas
We had our own copies of those while the code was in -bad, but now
we can use the existing utility functions instead of re-implementing
them.
2017-05-24 16:18:01 +01:00
Tim-Philipp Müller 4a28e649c3 rtp: cache meta tag quarks and add more utility functions for metas
Every g_quark_from_static_string() is a hash table lookup serialised
on the global quark lock in GLib. Let's just look up the two quarks
we need once and cache them locally for future use. While we're at it,
add new utility functions for the two most commonly used tags
(audio + video). Make first argument a gpointer so we don't have to
cast and make the code ugly. These are used for logging purposes
only anyway.
2017-05-24 13:32:10 +01:00
vijay 810c0bb084 aacparse : Fix, Caps were not set while reusing aacparse
While reusing aacparse caps were not set.This fix enables aacparse to reuse in same pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=783027
2017-05-24 13:59:52 +02:00
Tim-Philipp Müller e67a5a9f18 multifile: remove some cruft 2017-05-21 10:33:43 +01:00
Luis de Bethencourt fb00a357cd multifilesink: fix property name in example pipeline
Since the move from CVS the property name of the documentation example
has been filename instead of location. Users trying the gst-launch
command as is will get:
no property name "filename" in element

Fixing it.
2017-05-20 11:51:33 +01:00
Edward Hervey 4f713717de isomp4: Safely ignore [skip] atoms
Instead of warning about them
2017-05-18 18:12:15 +02:00
Tim-Philipp Müller 6cb49cf2c3 Fix up package name and origin in some plugins 2017-05-18 10:44:07 +01:00
Nicolas Dufresne b68d936ae0 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:41:19 -04:00
Vivia Nikolaidou a910329f6d splitmuxsink: Add alignment-threshold argument
If a non-reference stream is behind the reference stream by an amount of
time smaller than the alignment threshold (in nsec), it counts as being
after it.

https://bugzilla.gnome.org/show_bug.cgi?id=782563
2017-05-16 15:30:52 +03:00
Vivia Nikolaidou 5f7fe63fea qtmux: Do not check timecode data for mp4 container
Timecode trak is only supported for mov right now, not for mp4. That
code would otherwise create an invalid trak if the muxed video contained
timecode metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=782684
2017-05-16 15:16:58 +03:00
Sebastian Dröge 347e814074 qtmux: When accepting renegotiation, just return TRUE and change nothing
We only accept new caps if they are basically the same. We don't want to
reset anything as if the caps are new, otherwise various state could get
out of sync with the current run.
2017-05-11 20:01:15 +02:00
Sebastian Dröge 10f4693163 qtmux: In prefill mode, only pad buffers with > 0 sized memories as needed
Adding a 0-byte memory has not much effect.

Also add some debug output.
2017-05-11 19:21:22 +02:00
Sebastian Dröge 63492ee141 qtmux: Lateness is in QT timescale, diff in GstClockTime
Print the right one in debug output to get meaningful numbers.
2017-05-10 15:58:41 +02:00
Sebastian Dröge 163b62fc25 qtmux: Error out if a gap edit list has to be written in prefill mode
We don't have any space reserved for this in the moov and the
pre-finalized moov would have broken A/V synchronization. Error out here
now
2017-05-10 14:31:40 +02:00
Sebastian Dröge c0f505e80e qtmux: Calculate with reserved moov size instead of last moov size
We have some padding added after the initial moov, so a bigger updated
moov can be handled to some degree and is expected. Previously we just
ignored the padding and errored out in cases when the padding would've
just been enough.
2017-05-10 11:42:09 +02:00
Sebastian Dröge 419f53259f qtmux: Error out directly if sending filler data results in a flow error
CID 1405994
2017-05-10 11:12:23 +02:00
Sebastian Dröge 3fcfe774e6 qtmux: In prefill mode, handle the case when only the first chunk was ever used 2017-05-09 16:02:43 +02:00
Sebastian Dröge 55f949676e qtmux: Add new prefill recording mode
This sets up a moov with the correct sample positions beforehand and
only works with constant framerate, I-frame only streams.

Currently only support for ProRes and raw audio is implemented but
adding new codecs is just a matter of defining appropriate maximum frame
sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=781447
2017-05-09 14:17:04 +02:00
Sebastian Dröge f0163a016c qtmux: Error out on discontinuities/gaps when muxing raw audio
When muxing raw audio, we have no way of storing timestamps but are just
storing a continuous stream of audio samples. If the difference between
the expected and the real timestamp becomes to big, we should error out
instead of silently creating files with wrong A/V sync.

https://bugzilla.gnome.org/show_bug.cgi?id=780679
2017-05-09 14:16:51 +02:00
Tim-Philipp Müller d826c5ad96 matroskademux: improve index memory usage
Re-arrange order of index entry struct members to avoid padding
bytes in the middle of the struct, thus potentially reducing the
overall size of the struct and reducing memory used by the index.
On Linux x86_64 the size goes down from 32 bytes to 24 bytes for
each index entry.
2017-05-06 22:39:31 +01:00