Commit graph

9363 commits

Author SHA1 Message Date
Sebastian Rasmussen 5091b5f39f multiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets
Avoids ERROR log message.

https://bugzilla.gnome.org/show_bug.cgi?id=757449
2017-12-23 12:45:17 +01:00
Vincent Penquerc'h 8b814f6351 flv: flvmux ported to the GstAggregator
This makes it possible to create a flv file from a live source and not stop
when there are packet drops.

https://bugzilla.gnome.org/show_bug.cgi?id=782920
2017-12-20 15:34:11 -05:00
Olivier Crête 6ea569841d multiudpsink: Call gst_base_sink_wait_preroll on unlock
This means that packets will not be lost on fast pause/playing cycles.

Also refactor the code a little to simplify it.

https://bugzilla.gnome.org/show_bug.cgi?id=774945
2017-12-19 16:47:52 -05:00
Olivier Crête 0a15d1782b multiudpsink: Remove unused variable 2017-12-19 15:50:14 -05:00
Edward Hervey 9a7dd45e57 rtspsrc: Fix two leaks
* gst_event_new_stream_start() does not take ownership of the stream_id

* the pipeline_request_id string that is created was not being freed
2017-12-19 11:57:52 +01:00
Nicolas Dufresne 3a17f52ca3 videocrop: Add GstVideoCropMeta support
If downstream supports this meta, it will add or update it from
the GstBuffer in-place rather then copying.

https://bugzilla.gnome.org/show_bug.cgi?id=791453
2017-12-17 15:39:53 -05:00
Sean DuBois de8f080a5c Add AV1 to matroska plugin
https://bugzilla.gnome.org/show_bug.cgi?id=784160
2017-12-15 18:00:31 +01:00
fengalin 3464aac3c9 matroska: fix memory leaks due to toc related updates
https://bugzilla.gnome.org/show_bug.cgi?id=790686
2017-12-15 16:14:43 +02:00
fengalin a6702a76d5 matroska: re-activate and update TOC support
TOC support in mastroskamux has been deactivated for a couple of years. This commit updates it to recent GstToc evolutions and introduces toc unit tests for both matroska-mux and matroska-demux.

There are two UIDs for Chapters in Matroska's specifications:
- The ChapterUID is a mandatory unsigned integer which internally refers to a given chapter. Except for title & language which use dedicated fields, this UID can also be used to add tags to the Chapter. The tags come in a separate section of the container.
- The ChapterStringUID is an optional UTF-8 string which also uniquely refers to a chapter but from an external perspective. It can act as a "WebVTT cue identifier" which "can be used to reference a specific cue, for example from script or CSS".

During muxing, the ChapterUID is generated and checked for unicity, while the ChapterStringUID receives the user defined UID. In order to be able to refer to chapters from the tags section, we maintain an internal Toc tree with the generated ChapterUID.

When demuxing, the ChapterStringUIDs (if available) are assigned to the GstTocEntries UIDs and an internal toc mimicking the toc is used to keep track of the ChapterUIDs and match the tags with the appropriate GstTocEntries.

https://bugzilla.gnome.org/show_bug.cgi?id=790686
2017-12-15 16:14:43 +02:00
Edward Hervey 6e21faffe7 qtdemux: Push a GAP event if there's a second *or more*
And not "more than a second"
2017-12-13 12:06:49 +01:00
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