Stefan Andersson
1c8b01ccbc
matroska-demux: Prevent corrupt cluster duplication
...
Make sure to always update next_cluster_offset, if next cluster offset
isn't known set it to zero. If next_cluster_offfset isn't updated it will
be the same as current and if the cluster parsing fails the same cluster
will be parsed again leading to duplication of the data in the cluster.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8855 >
2025-04-16 20:37:08 +02:00
Doug Nazar
6e9667b65c
matroskademux: Add support for relative position cues
...
Cueing data can contain the block number within a cluster and/or
a relative offset into the cluster.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5535 >
2025-03-28 17:47:27 -04:00
Doug Nazar
3578b23ba2
matroskamux: Add support for chroma siting
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534 >
2025-03-28 11:44:13 -04:00
Doug Nazar
123a7a515f
matroskamux: Add support for interlaced field order
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534 >
2025-03-28 11:44:13 -04:00
Doug Nazar
671dd6a61e
matroskamux: Always use v4 for DocType version
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534 >
2025-03-28 11:43:50 -04:00
Doug Nazar
8e6ec1fc34
matroskademux: Handle chroma site color information
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5534 >
2025-03-28 11:22:39 -04:00
Carlos Bentzen
8cfbdd7cf6
matroskamux: add support for VVC/H.266 video
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441 >
2025-02-10 22:49:35 +00:00
Carlos Bentzen
1be3d7f37b
matroskademux: add support for VVC/H.266 video
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441 >
2025-02-10 22:49:35 +00:00
Carlos Bentzen
deaa9260f3
matroska: add V_MPEGI/ISO/VVC id
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8441 >
2025-02-10 22:49:35 +00:00
Robert Mader
12d2a4e2a1
matroskademux: Implement rotation tag support
...
Similar to qtdemux.
Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
In particular the Yaw value seems to get ignored by many clients.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319 >
2025-02-05 13:26:08 +01:00
Robert Mader
a7c2899990
matroskamux: Implement rotation tag support
...
Similar to qtmux, but for mkv and webm containers.
Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
In particular the Yaw value seems to get ignored by many clients.
Can be tested with:
```
gst-launch-1.0 \
videotestsrc num-buffers=90 ! \
taginject tags="image-orientation=rotate-270" ! \
capsfilter caps=video/x-raw,width=640,height=480,max-framerate=30/1 ! \
videoconvert ! \
queue ! \
vp8enc ! \
queue ! \
webmmux ! \
filesink location=./test.webm
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319 >
2025-02-05 12:03:26 +00:00
Robert Mader
b2702b6f10
matroska: Add projection IDs
...
These will allow us to support rotate methods with matroska v4 and
the corresponding webm.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319 >
2025-02-05 12:03:26 +00:00
Tomas Granath
fa9b630fc8
matroskademux: Mark streams as EOS when outside the requested segment
...
Ensure that streams with no (more) data are marked as EOS when
advancing past the requested segment. Without this change the
EOS would be postponed to the end of the file in that case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8395 >
2025-02-03 09:06:28 +00:00
Thibault Saunier
26e6109b44
matroskademux: Add support to seek with stop in push mode
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8340 >
2025-01-24 15:30:53 +00:00
Mathieu Duponchelle
3de86b2b97
docs: port plugins to explicit sources
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8273 >
2025-01-13 19:17:13 +01:00
Edward Hervey
8bc17b58a2
good: Clearly specify fallthrough in switch/case
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229 >
2025-01-13 12:51:45 +00:00
Edward Hervey
2a6c1bbb01
matroska: Reorder switch/case for parsing
...
Just makes it clearer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229 >
2025-01-13 12:51:45 +00:00
Sebastian Dröge
06a0ab7b33
matroskamux: Consider audio buffers as keyframes when writing out simpleblocks
...
Otherwise mpv complains and considers the file broken.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4142
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8225 >
2025-01-06 11:43:59 +00:00
Sebastian Dröge
32e79c1041
matroskamux: Fix audio-only stream conditions
...
The num_a_streams and related counters are used for pad numbers and don't give
the absolute number of streams in this run of the muxer.
Also, consider the output audio-only if there are more than 1 audio stream too.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4142
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8225 >
2025-01-06 11:43:59 +00:00
Sebastian Dröge
474eb62d85
matroskademux: Put a copy of the codec data into the A_MS/ACM caps
...
The original codec data buffer is owned by matroskademux and does not
necessarily live as long as the caps.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-280
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3894
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
b84a0f3263
matroskademux: Skip over zero-sized Xiph stream headers
...
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-251
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3867
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
c20eff779d
matroskademux: Skip over laces directly when postprocessing the frame fails
...
Otherwise NULL buffers might be handled afterwards.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-249
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3865
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
395f2b3ffd
matroskademux: Don't take data out of an empty adapter when processing WavPack frames
...
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-249
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3865
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
8aa1c185cf
matroskademux: Check for big enough WavPack codec private data before accessing it
...
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-250
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3866
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
b7ad9a2c5d
matroskademux: Fix off-by-one when parsing multi-channel WavPack
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:52 +00:00
Sebastian Dröge
c0dceda8e9
matroskademux: Only unmap GstMapInfo in WavPack header extraction error paths if previously mapped
...
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-197
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3863
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057 >
2024-12-03 20:02:51 +00:00
Sebastian Dröge
2bbf095e5b
matroskamux: Simplify timestamp comparison logic in find_best_pad()
...
If a buffer has no timestamp it is immediately muxed so we can directly break
the loop and simplify comparisons in the other cases.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872 >
2024-11-15 22:33:53 +00:00
Sebastian Dröge
a391728ad4
matroskamux: Don't time out in live mode if no timestamped next buffer is available
...
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872 >
2024-11-15 22:33:53 +00:00
Philippe Normand
701f563996
matroskamux: Delay stream-header until all sink pads have caps
...
If we don't wait, an incomplete header might be generated due to a race between
the _aggregate thread and the sink pad setcaps.
Fixes #3929
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872 >
2024-11-15 22:33:53 +00:00
Sebastian Dröge
12b434ae9d
matroskamux: Add support for latency timeouts in live pipelines
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510 >
2024-10-01 13:20:18 +00:00
Sebastian Dröge
945a7bdfc4
matroskamux: Port to GstAggregator
...
Co-authored-by: Tim-Philipp Müller <tim@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510 >
2024-10-01 13:20:18 +00:00
Sebastian Dröge
6233eb0ff3
common: Stop using GQuark-based GstStructure field name API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432 >
2024-09-26 19:21:29 +03:00
Sebastian Dröge
762a281b0c
matroskamux: Include end padding in the block duration for Opus streams
...
It has to be included in the block duration but in GStreamer we're not
including it in the buffer duration, so it has to be added again here.
Not including it in the block duration can lead to fatal errors when playing
back with Firefox if there are more padding samples than actual samples, e.g.
> D/MediaDemuxer WebMDemuxer[7f6a0808b900] ::GetNextPacket: Padding frames larger
> than packet size, flagging the packet for error (padding: {13500000,1000000000},
> duration: {6000,1000000}, already processed: false)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7502 >
2024-09-13 20:38:51 +00:00
Philippe Normand
e9ecde83a7
matroska-demux: Basic support for container-specific-track-id tag
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6041 >
2024-02-12 10:37:29 +00:00
Thibault Saunier
e1a8ce16b4
matroskademux: Lower verbosity of some often happenning warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6011 >
2024-01-30 09:09:22 +00:00
David Craven
c79d16ae80
matroska: demux: Strip signal byte from encrypted blocks
...
Removes the signal byte when the frame is unencrypted to
be consistent with when the frame is encrypted.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4997 >
2023-07-11 10:26:36 +00:00
Edward Hervey
2f95cbd551
matroska-demux: Properly handle early time-based segments
...
Refusing an incoming segment in < GST_MATROSKA_READ_STATE_DATA should only be
done if the incoming segment is not in GST_FORMAT_TIME.
In GST_FORMAT_TIME, we are just storing the values and returning, so we can
invert the order of the checks.
Fixes proper segment propagation in matroska/webm DASH use-cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3914 >
2023-06-22 06:56:33 +00:00
Mark Hymers
1ae8af4909
matroska: Add support for more pixel formats
...
- Add support for GRAY16_LE (using ffmpeg fourcc mapping)
- Update documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4824 >
2023-06-14 13:40:58 +00:00
Daniel Morin
00178cbd89
matroska: Add new pixels format support
...
- Add support for GRAY10_BE32
- Add support for RGBA64_LE and BGRA64_LE
Sponsored by Living Optics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4824 >
2023-06-14 13:40:57 +00:00
Tim-Philipp Müller
f3c126d07c
matroska-demux: fix accumulated base offset in segment seeks
...
When doing a segment seek, the base offset in the new segment
would be increased by segment.position which is basically the
timestamp of the last packet. This does not include the duration
of the last packet though, so might be slightly shorter than the
actual duration of the clip or the requested segment.
Increase the base offset by the segment duration instead when
accumulating segments, which is more correct as it doesn't cut
off the last frame and makes the effective loop segment duration
consistent with the actual duration returned from a duration
query.
In case a segment stop was specified it's also possible that
some data was sent beyond the stop that's necessary for decoding
so the base offset increment should be based on that then and
not on the timestamp of the last buffer pushed out.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4604 >
2023-06-13 18:19:48 +00:00
Sebastian Dröge
621ec7b6e8
matroskademux: Make gst_byte_reader_get_data() usage less confusing
...
This is effectively the same behaviour but retrieving 0 bytes of data is
confusing to read.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210 >
2023-03-18 16:34:19 +02:00
Tim-Philipp Müller
0fc568c6b1
gst-plugins-good: re-indent with GNU indent 2.2.12
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182 >
2023-03-17 03:18:54 +00:00
Arun Raghavan
82b892ba3e
matroskamux: Set rate/channels in Opus template caps
...
For some reason these were missed, and if caps didn't have them, we would emit
an invalid Matroska file with a 0 value for Sampling Frequency or channels.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2354
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4151 >
2023-03-14 11:09:08 -04:00
Shengqi Yu
83576690b6
matroskademux: Consider TrackUID==0 a warning and not handle it as error
...
some special files whose trackUID is 0 can be played on the other
player. But it cannot be played in GStreamer, because trackUID 0 will be
treated as an error in matroskademux.
So, it makes sense to only consider trackUID==0 a warning and not handle
it as error
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1821
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4036 >
2023-03-01 07:38:24 +00:00
Tim-Philipp Müller
e256472ca6
matroska: drop use of GSlice
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695 >
2023-01-24 15:25:06 +00:00
Sebastian Dröge
067b5d92b4
matroska: Add stream-format = (string) obu-stream
to AV1 caps
...
Anything else is not allowed in Matroska/WebM.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740 >
2023-01-19 12:10:40 +02:00
Víctor Manuel Jáquez Leal
64cb38685b
matroskademux: Handle element's duration query.
...
This is small regression from commit f7abd81a.
When calling `gst_element_query()` no pad is associated with that query, but the
current code always forwards the query to the associated pad, which is NULL in
previous case. This patch checks for the pad before forwarding the query.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3404 >
2022-11-14 15:10:44 +00:00
Thibault Saunier
f7abd81a45
matroskademux: Let upstream handle seeking/duration query in time if possible
...
So proper response are given for dash streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159 >
2022-10-27 19:45:44 +00:00
Thibault Saunier
8c7579e129
matroskademux: Start support for upstream segments in TIME format
...
So we can use matroskademux for dash webm dash streams.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159 >
2022-10-27 19:45:44 +00:00
Thibault Saunier
6a4425e46a
meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
...
Removing some copy pasted code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970 >
2022-09-01 21:17:35 +00:00