Commit graph

9544 commits

Author SHA1 Message Date
Sebastian Dröge 8a3075fbae qtmux: Properly allocate 256 bytes per CDP packet in prefill mode
Instead of allowing 256 but only pre-allocating 100.
2018-08-02 12:27:45 +03:00
Sebastian Dröge bbfd76e94e Revert "qtmux: Allow for CDP packets up to 320 bytes"
This reverts commit 5eed1d49bd.

255 is actually the maximum, there's a bug if more is arriving.
2018-08-02 12:27:17 +03:00
Sebastian Dröge 5eed1d49bd qtmux: Allow for CDP packets up to 320 bytes
Apparently they can be bigger than 256 bytes sometimes.
2018-08-01 16:51:11 +03:00
Nicolas Dufresne 2b11c62571 rtppayload: Fix VP8/VP9/OPUS dual encoding name handling
All these were copy pasted and would lead to assertion when chained with
rtpmux. This commit rewrite the negotiation with downstream. This also
drop the fallback to ancient names if the pad is unlinked. This was
completly arbitrary decision that made no sense.

https://bugzilla.gnome.org/show_bug.cgi?id=796809
2018-08-01 09:42:36 -04:00
Sebastian Dröge 7679412b69 qtdemux: Don't assert in prefill mode if a track has no samples at all
Just write it with a duration of 0, no samples, etc.
2018-07-31 12:47:47 +03:00
Sebastian Dröge 6ce2a5f7bf qtdemux: Don't assert if a file does not have any active streams
** (gst-play-1.0:9113): CRITICAL **: 12:31:54.360: qtdemux_is_streams_update: assertion 'qtdemux->active_streams != NULL' failed
2018-07-31 12:33:54 +03:00
Sebastian Dröge e58dceec3a qtmux: Reserve 256 bytes for CDP packets in pre-fill mode
92 is sometimes too small and compared to the wasted space for other
codecs 256 bytes is small (and should be the maximum CDP packet size)
2018-07-30 13:35:02 +03:00
Nirbheek Chauhan 8f807477eb meson: Add feature options for all plugins
Checks for GL, Qt5, and C++ are still automagic. FIXMEs have been
added for these so they can be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:42:54 +05:30
Vivia Nikolaidou f2c2560db2 deinterlace: Closed caption pass-through
Pass through closed caption data when deinterlacing. When two
deinterlaced frames are created for the same interlaced frame (e.g.
fields=all), the second of the two frames will have no closed caption
data.

Also fixed memory leaks related to timecode meta pass-through.

https://bugzilla.gnome.org/show_bug.cgi?id=796876
2018-07-27 14:26:49 +03:00
Olivier Crête 6c478453a8 qtmux: Implement muxing of AV1 into MP4 files
According to
https://aomediacodec.github.io/av1-isobmff/
2018-07-26 14:14:53 -04:00
Olivier Crête d641b37fcb matroskamux: Put codec_data as CodecPrivate for AV1 2018-07-26 14:14:53 -04:00
Olivier Crête e3b14e345d matroskamux: Accept muxing AV1 2018-07-26 14:14:53 -04:00
Olivier Crête e07ce9afb4 qtdemux: Recognize more AV1 atoms 2018-07-26 14:14:53 -04:00
Olivier Crête 415caf4b87 matroskademux: Extract codec_data for AV1
According to
https://github.com/Matroska-Org/matroska-specification/blob/av1-mappin/codec/av1.md
2018-07-26 14:14:53 -04:00
Olivier Crête 43ee4055c3 qtdemux: Extract AV1 codec_data and put it in the caps
Also extract the presentation-delay and put it in the caps.
2018-07-26 14:14:53 -04:00
Olivier Crête b6e8c6323e qtdemux: Add initial support for AV1 demuxing
Following the spec at
https://aomediacodec.github.io/av1-isobmff/
2018-07-26 14:14:53 -04:00
Jan Schmidt f067b50dd6 rtspsrc: Add a small configurable teardown delay
This causes rtspsrc to send a teardown and wait on
PAUSED->READY transition, with a configurable delay.
Otherwise, typically teardown never gets sent in
playbin / uridecodebin where the transition back to NULL
happens too quickly.

The timeout is set to 100ms default.

https://bugzilla.gnome.org/show_bug.cgi?id=751994
2018-07-27 00:41:57 +10:00
Sebastian Dröge 9a80cdbb40 rtpgstpay: Add support for force-keyunit events
This triggers immediate re-sending of the configuration data in-band.

https://bugzilla.gnome.org/show_bug.cgi?id=796877
2018-07-26 16:54:28 +03:00
Sebastian Dröge f3631e6837 rtp: Use running_time instead of PTS for config-interval calculations
PTS can start again from a different offset while the running time is
increasing. The only thing that matters here is the running time.

https://bugzilla.gnome.org/show_bug.cgi?id=796807
2018-07-24 18:14:28 +03:00
Michael Olbrich bd05ab8358 rtpL8pay: don't try to modify a read-only structure
Just remove the code. It's not doing anything useful anyways. The modified
caps are the result of a caps query, so either not used afterwards of a
reference to some internal caps of another element that should not be
modified.

https://bugzilla.gnome.org/show_bug.cgi?id=796837
2018-07-19 14:07:03 -04:00
Vivia Nikolaidou ceac1b51b1 deinterlace: Timecode pass-through
When it is trivial to pass-through a timecode, by only removing the
"interlaced" flag, do pass-through. Otherwise, double the fps_n and
adjust the "frames" field.

https://bugzilla.gnome.org/show_bug.cgi?id=796818
2018-07-17 16:29:37 +03:00
Jan Schmidt f672116c72 splitmux: Improve handling of repeated timestamps
When handling input with timestamps that repeat, sometimes
splitmuxsink would get confused and ignore a keyframe.

The logic in question is a holdover from before the cmd queue
moved the file cutting to the multiqueue output side and made
it deterministic, so it's no longer needed on the input
here.

https://bugzilla.gnome.org/show_bug.cgi?id=796773
2018-07-17 10:57:42 +10:00
Jan Schmidt f667ab05d2 Revert "splitmuxsrc: Make sure events are writable"
This reverts commit 3ac5430311.

There's no need to make a freshly created event writable,
and the other half of this patch was already fixed
and pushed in f2f15a1
2018-07-17 01:33:55 +10:00
Jan Schmidt 3ac5430311 splitmuxsrc: Make sure events are writable
Before setting the seqnum on events sent downstream,
make sure they are writable.
2018-07-17 00:17:18 +10:00
Havard Graff ac6e77acad rtpsession: Don't start the RTCP thread until it's needed
Always wait with starting the RTCP thread until either a RTP or RTCP
packet is sent or received. Special handling is needed to make sure the
RTCP thread is started when requesting an early RTCP packet.

We want to wait with starting the RTCP thread until it's needed in order
to not send RTCP packets for an inactive source.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
2018-07-12 18:37:33 +02:00
Thibault Saunier 57be4d2da3 scaletempo: Mark as Audio in classification 2018-07-08 20:10:12 -04:00
Edward Hervey 9be72b585d qtdemux: Store and propagate SEGMENT sequence numbers
* When receiving a segment in TIME, use that seqnum
* Only reset the stored sequence number when doing HARD reset
  (and not when we get a FLUSH event from upstream)
2018-07-06 15:21:33 +02:00
Philippe Normand 4c10a1ba27 matroskademux: Set subtitle tag title from TrackName field
GUI applications can then use the title tag to set menu items or labels
representing the track.

https://bugzilla.gnome.org/show_bug.cgi?id=796567
2018-06-29 17:11:28 +01:00
Alicia Boya García 025a430d08 qtdemux: rework segment event pushing, again
This patch aims at fixing the recent regressions in the adaptive test
suite.

All segment pushing in push mode is now done with
gst_qtdemux_check_send_pending_segment(), which is idempotent and
handles both edit lists cases and cases where the upstream TIME segments
have to be sent directly.

Fragmented files that start with a non-zero tfdt are also taken into
account, but their handling has been vastly simplified: now they are
handled as implicit default seeks so there is no need to extend the
GstSegment formulas as was being done before.

qtdemux->segment.duration is no longer modified when
upstream_format_is_time, respecting in this way the durations provided
by dashdemux and fixing bugs in reverse playback tests where mangled
durations appeared in the emitted segments.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-06-29 09:19:31 -04:00
Alicia Boya García 2c394304b7 qtdemux: Don't send EOS during upstream reverse playback
Upstream driving elements such as dashdemux often do reverse playback by
feeding qtdemux with the fragments containing the requested playback
range in reverse order.

But the requested playback range stop may be somewhere in the
middle of a fragment. In that case, a naive pts >= segment.stop
condition may declare end of segment prematurely when demuxing this
first fragment.

This used not to happen because there were places in moov parsing where
segment.stop was overwritten to GST_CLOCK_TIME_NONE even if
upstream_format_is_time -- resulting in this case in a segment with rate
< 0 and stop == -1 and hence not triggering the EOS check, but that was
likely an accident.

This patch modifies the EOS check to take this case into account, not
sending EOS when upstream_format_is_time if rate < 0.

This fixes adaptive.dash.playback.seek_end_live.DASHIF_livestream_testpic_2s

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-06-29 09:19:31 -04:00
Tim-Philipp Müller 238a37295c Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-23 23:44:19 +02:00
Sebastian Dröge f2f15a119f splitmuxsrc: Make sure events are writable before setting their seqnum 2018-06-18 12:13:48 +03:00
Thibault Saunier 1840159d0b qtdemux: Do not set INVALID seqnum on events 2018-06-06 11:44:33 -04:00
Seungha Yang 6b29a4507e qtdemux: Forward upstream time-format segment without mapping
Sample table based segment event (genereted by qtdemux) could break
presentation timeline. For example, qtdemux should not modify upstream
time format segment (e.g., adaptivedemux use case)

https://bugzilla.gnome.org/show_bug.cgi?id=796480
2018-06-06 10:54:55 -04:00
Edward Hervey 418a6270e5 rtspsrc: Seek handling is always done with a valid event
Remove the checks
2018-06-06 07:48:32 +02:00
Edward Hervey 14a9cc603e wavparse: Don't set invalid seqnum on events
Some codepath will call gst_wavparse_perform_seek without an event
and therefore without a valid seqnum
2018-06-06 07:48:32 +02:00
Thibault Saunier 0fbde2a079 qtdemux: Clarify field name about stream-encryption-system
This field is actually only informatory and the user can potentially
choose something else. EME tests in WebKit testsuite actually doesn't
take it into and force another encryption system to be used, and expects
to be given the occasion to do so.

This basically also reverts 3e063703b3.
2018-05-28 16:52:10 -04:00
Thiago Santos ae7b531902 qtdemux: mark segment as sent after pushing when moov is received
Otherwise we would try to send it a second time if the same moov is
received or in any other situation that might trigger segment sending.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-05-28 11:26:36 -07:00
Thiago Santos 364a921d3f qtdemux: do not update segment.stop is it is not a valid time
Otherwise it overflows and starts having a meaningful and wrong value.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-05-25 08:34:29 -07:00
Thiago Santos 9c514f9c7c qtdemux: offset edts segments by the min timestamp of the stream
Otherwise if the stream is starting at timestamp=X it would wait
'X' to start playing.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-05-25 08:34:29 -07:00
Thiago Santos bfd0e0225e qtdemux: rework segment event pushing
Instead of always keeping a safe segment (start=0) event from the beginning,
delay the creation of this event to when we really know the timestamp of the
first sample. This is important to properly start fragmented streams that
we might join in the middle or to play isolated fragment files that might
have an advanced tfdt.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
2018-05-25 08:34:29 -07:00
Thibault Saunier 43a540b1cd qtdemux: Do not unref a NULL stream_tags
stream->stream_tags is reset to NULL once we expose the stream and
these have been consumed, we need to check that when cleaning up
the stream.
2018-05-25 10:54:54 +02:00
Thibault Saunier 3e063703b3 qtdemux: Do not run the preferred decryptor context query if no decryptor avalaible
Ultimately this avoids a segfault as the code expect a non NULL array
here.
2018-05-25 10:53:16 +02:00
Alicia Boya García c2a0da8096 qtdemux: Allow edit lists on fragmented files on push mode
Fragmented files often use elst.duration=0 which before
ee78825eae was wrongly interpreted as
having no frames.

Since that issue has now been fixed, there is no reason to disable edit
lists in fragmented files. This commit enables them, therefore producing
correct stream time for files containing edit lists.

https://bugzilla.gnome.org/show_bug.cgi?id=793058
2018-05-24 15:53:48 +02:00
Alicia Boya García 5388d6e6a2 qtdemux: fix computation of first_duration for fragmented files in push mode
Since ca068865c3 the duration of the first
frame is not used for estimating the frame rate.

For this purpose, stream->first_duration was initialized with the
duration of the first frame. In fragmented files, this was previously
done by peeking the first moof, but that can only be done in pull mode.

Fortunately, we don't really need to do that, at least with the current
design: When we are estimating the frame rate we already have the
sample table, regardless of the scheduling mode and whether the file is
fragmented or not, so we can obtain first_duration there much more
reliably.

This fixes frame rate estimation for fragmented files in push mode.

https://bugzilla.gnome.org/show_bug.cgi?id=796384
2018-05-24 15:53:48 +02:00
Vivia Nikolaidou d11339d616 splitmuxsink: Added new async-finalize mode
This mode is useful for muxers that can take a long time to finalize a
file. Instead of blocking the whole upstream pipeline while the muxer is
doing its stuff, we can unlink it and spawn a new muxer+sink combination
to continue running normally.

This requires us to receive the muxer and sink (if needed) as factories,
optionally accompanied by their respective properties structures. Also
added the muxer-added and sink-added signals, in case custom code has to
be called for them.

https://bugzilla.gnome.org/show_bug.cgi?id=783754
2018-05-24 12:47:24 +03:00
Alicia Boya García d35f893715 qtdemux: Don't send gaps bigger than 1 second (now in push mode too)
This applies the same workaround to gaps that is being used in pull
mode.

https://bugzilla.gnome.org/show_bug.cgi?id=778426
2018-05-24 11:09:53 +02:00
Seungha Yang f61c2bc301 qtdemux: Properly handle edit list in push mode
If there are empty segments in edit list, demux should
adjust "accumulated_base" to apply it into running time.

https://bugzilla.gnome.org/show_bug.cgi?id=778426
2018-05-24 11:09:53 +02:00
Mathieu Duponchelle d9235404aa matroska-mux: write colorimetry
This is a straightforward translation of 5dd39d8, can be trivially
checked by running:

gst-launch-1.0 -v videotestsrc ! video/x-raw, colorimetry=2:4:7:1 ! \
matroskamux ! matroskademux ! fakesink

and verifying that the colorimetry is correctly preserved.

https://bugzilla.gnome.org/show_bug.cgi?id=796344
2018-05-23 15:14:23 +02:00
Alicia Boya García ee78825eae qtdemux: fix buggy duration in edits with duration=0 in fragmented files without a mehd
https://bugzilla.gnome.org/show_bug.cgi?id=794858
2018-05-23 14:25:56 +02:00