Commit graph

9344 commits

Author SHA1 Message Date
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