Commit graph

466 commits

Author SHA1 Message Date
Sebastian Dröge
1cd4baa16a matroskademux: Remove leftover assertion from 0.10
We now allocate memory via GstAllocator and as such can handle arbitrary
alignments, not only <= G_MEM_ALIGN.

https://bugzilla.gnome.org/show_bug.cgi?id=755708
2015-09-28 18:03:51 +02:00
Sebastian Dröge
7046852e7d gst: Don't use deprecated gst_segment_to_position() 2015-09-26 00:12:46 +02:00
Jan Alexander Steffens (heftig)
3f8efd8af8 matroskademux: Align raw video frames to 32 bytes
Outputting unaligned video frames causes videoscale et al to
crash when attempting SIMD-accelerated conversion.

https://bugzilla.gnome.org/show_bug.cgi?id=736965
2015-08-31 14:35:59 +03:00
Glen Diener
cd57697a2c matroskademux: Preserve forward referenced track tags
https://bugzilla.gnome.org/show_bug.cgi?id=752850
2015-08-05 16:46:33 -04:00
Dimitrios Christidis
744167056c matroskademux: fix for subtitle buffers with NUL terminators
Commit 45892ec8 created a regression where g_utf8_validate() would fail
if the subtitle buffer had a NUL terminator as part of the data.

https://bugzilla.gnome.org/show_bug.cgi?id=752421
2015-07-21 14:25:12 +01:00
Tim-Philipp Müller
2e3a5ba227 Update mailing list address from sourceforge to freedesktop 2015-07-16 17:19:03 +01:00
Dimitrios Christidis
45892ec8be matroskademux: fix trailing '*' displayed with some text subtitles
The subtitle buffer we push out should not include a NUL terminator
as part of the data, we just add such a terminator for safety, but
it should not be included in the buffer size.

A NUL terminator is not valid UTF-8, so checks will fail if it's
included in the size, and the NUL will be replaced by the fallback
character specified when converting, i.e. '*'.

https://bugzilla.gnome.org/show_bug.cgi?id=752421
2015-07-16 13:18:06 +01:00
Luis de Bethencourt
063f553275 docs: decodebin2 -> decodebin 2015-06-25 10:57:29 +01:00
Jan Schmidt
e5db2673bd matroska-demux: Use gst_video_multiview_guess_half_aspect()
Use the gst_video_multiview_guess_half_aspect() utility function
to set the half-aspect flag (or not) on stereoscopic frame-packed
videos.
2015-06-23 11:58:41 +10:00
Vineeth TM
9a1ed36b7a matroska: remove useless check
No need to check for context availability while freeing. We are inside
inside a code block with a condition that dereferences context.
if (context->type == 0 ...

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 12:26:23 +01:00
Jan Schmidt
0c46c5c3e2 matroska-demux: Actually set detected 3D info into output caps.
Use the information read from the StereoMode info
to configure multiview-mode and multiview-flags in the
video caps.
2015-06-12 01:57:36 +10:00
Jan Schmidt
ec5bc9dccb matroska: Implement basic stereoscopic video support
Implement support for the packed video formats WebM
uses, not all the values that Matroska might use.

In practice, it's really hard to find any samples in the
wild of any.

Supported in both the muxer and demuxer.
2015-06-11 12:11:42 +10:00
Guillaume Desmottes
7f4f4131df matroskademux: fix seek event leak
gst_matroska_demux_handle_seek_event() doesn't consume the
event so we have to unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=748584
2015-04-28 19:24:40 +01:00
Sebastian Dröge
9119fbd774 matroska-demux: Send pending tags when adding a new pad
We might've parsed those tags before already and tried to push them to
non-existing pads before. Now let's do it for real.
2015-04-28 15:42:49 +02:00
Luis de Bethencourt
9391622579 Rename property enums from ARG_ to PROP_
Property enum items should be named PROP_ for consistency and readability.
2015-04-27 11:22:11 +01:00
Mark Nauwelaerts
593cfa086c matroskademux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:58:56 +02:00
Thiago Santos
d56b11af56 matroska: store stream tags and push as updated
New tags can be found on different parts of the file, so this patch
keeps the stream taglists around for the life cycle of the pad
and adds those new tags as found. Then a new tag is found, the
pad's is marked with a tags changed flag, making the element push
a new tag event on the next check. Before this, we were sending
only the newly found tags, as the element was losing its taglist
when pushing the event.
2015-03-28 11:20:39 -03:00
Ramiro Polla
7b2b619a8f matroskademux: send global tags incrementally
Instead of sending only new tags once they are found, merge the taglist
and send them incrementally.
2015-03-28 10:24:57 -03:00
Nicola Murino
bb3d82ef04 matroskademux: for dts only stream set pts=dts for intra only formats
https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-03-15 14:28:36 +00:00
Ramiro Polla
0fad053497 matroskademux: fix sending of tags
* Fix critical when new tags are found after segment event has already
  been sent.
* Send global tags before stream tags.
* Split sending of tags out of gst_matroska_demux_send_event() into its
  own function.

https://bugzilla.gnome.org/show_bug.cgi?id=745973
2015-03-14 18:17:48 +00:00
Nicola Murino
f727762c1f matroska: Add an helper method to get buffer timestamps
... and replace GST_BUFFER_TIMESTAMP that always return PTS with this method
that return PTS or DTS based on stream type.

https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-03-04 11:36:24 +01:00
Nicola Murino
e676b8ba9c matroskamux/demux: initialize dts_only
https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-02-27 09:56:06 +02:00
Matej Knopp
fa283f407f matroskademux: V_MS/VFW/FOURCC streams have DTS instead of PTS
When such stream is present demuxer should set DTS on buffers instead
of PTS. This is consistent with how VLC and libav/ffmpeg handle VFW
streams.

Sample file
https://s3.amazonaws.com/MatejK/Samples/Matroska-VFW-DTS-Only.mkv

https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-02-26 11:12:34 +02:00
Jan Schmidt
4a77c8a84f matroska: Fix seeking past the end of the file in reverse mode.
Snap to the end of the file when seeking past the end in reverse mode,
and also fix GST_SEEK_TYPE_END and GST_SEEK_TYPE_NONE handling
for the stop position by always seeking on a segment in stream time
2015-01-31 06:15:44 +11:00
Sebastian Dröge
67d4b85d6a matroskademux: Improve detection of being stuck at the same offset
Only error out if we read from the same position again and got the
same length. Just the same position is not necessarily enough.
2014-12-29 15:35:19 +01:00
Sebastian Dröge
e596a3b6a7 matroskademux: Don't get stuck at the same offset when searching for clusters
This could happen if there is an invalid cluster with size 0, and in that
case just error out instead of looping forever.
2014-12-29 15:02:52 +01:00
Edward Hervey
cbe56d2331 matroska-demux: Cache upstream length
Instead of constantly querying upstream, just cache the last duration,
and in the unlikelyness we might have gone over query again before
deciding we are EOS.

Cut 15% cpu off matroskademux streaming thread (srsly...)
2014-12-19 10:59:18 +01:00
Vincent Penquerc'h
b7413279d9 matroska: mux/demux the OpusHead header
This is meant to be so (https://wiki.xiph.org/MatroskaOpus - while
it is marked as a draft, this part was confirmed to be correct on
IRC), and allows one to determine whether a demuxed stream is
multistream or not, and thus set the multistream caps field
accordingly. In turn, this means downstream does not have to guess.

https://bugzilla.gnome.org/show_bug.cgi?id=740744
2014-12-18 11:38:49 +00:00
Nicola Murino
c466ff4748 matroskademux: set framerate 0/1 when duration is not known
https://bugzilla.gnome.org/show_bug.cgi?id=740130
2014-12-04 18:20:37 +01:00
Jonas Holmberg
1371fa0c61 matroskademux: make demuxer reusable
Remove pads from flow combiner and reset last
flow return to FLOW_OK by resetting the flow combiner.
This prevents FLOW_FLUSHING when trying to re-use the
demuxer after setting it back to NULL/READY state.

https://bugzilla.gnome.org/show_bug.cgi?id=737359
2014-09-25 16:14:18 +01:00
Tim-Philipp Müller
4c08f2694d matroskademux: handle real audio 28_8
Fixes duplicate check for 14_4.

https://bugzilla.gnome.org//show_bug.cgi?id=736543
2014-09-12 10:35:36 +01:00
Sebastian Dröge
a3a5530518 matroska-demux: Don't handle parse errors at the end of file as an error
But only if they happen after the Matroska segment.

https://bugzilla.gnome.org/show_bug.cgi?id=735833
2014-09-05 11:36:30 +03:00
Jan Schmidt
f1c3a40547 matroska: Use gst_video_guess_framerate() function
Remove local framerate guessing function in favour of
the new gst_video_guess_framerate() function.
2014-08-15 01:17:27 +10:00
Vincent Penquerc'h
5653b1a25a matroskademux: send gap events instead of segment tricks
This fixes missing frames from being time skipped.

https://bugzilla.gnome.org/show_bug.cgi?id=732372
2014-07-01 15:14:34 +01:00
Thiago Santos
c7c25071e3 matroskademux: use GstFlowCombiner
Use the flow combiner to have the standard combination results and avoid
repeating the same code

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:51:02 -03:00
Tim-Philipp Müller
b158a1c068 matroska-demux: add mapping for Opus audio codec
https://bugzilla.gnome.org/show_bug.cgi?id=727305
2014-03-30 00:31:11 +00:00
Mark Nauwelaerts
3414e3d0b9 matroskademux: segment closing not needed in 1.x
... as sender should keep track of segment base accumulation.
Rather, it may have some adverse effects as a spurious segment event,
e.g. in collectpads.
2014-03-25 21:02:45 +01:00
Mark Nauwelaerts
9a30726226 matroskademux: early sending pending codec-data for all streams
... at least before syncing across all streams might cause some gap
activity on any of those streams, notably sparse streams.

See also #712134
2014-03-25 21:02:45 +01:00
Per x Johansson
2a362c6fb1 matroskademux: fix assert on fps lower than 1
Fixes assert caused by gst_duration_to_fraction calling
gst_util_uint64_scale_int with a denominator of 0 when fps is less
than 1.

https://bugzilla.gnome.org/show_bug.cgi?id=726106
2014-03-12 09:08:31 +01:00
Tim-Philipp Müller
f3163fb45f matroskademux: align raw audio memory to powers of two
https://bugzilla.gnome.org/show_bug.cgi?id=725008
2014-02-27 00:46:39 +00:00
Tim-Philipp Müller
c3dc53e551 matroskademux: calculate alignment properly for audio depths not a multiple of 8 2014-02-27 00:46:39 +00:00
Matej Knopp
d33b4dce63 matroskademux: fix crash with 24-bit raw audio
Do not try to align audio buffers to odd numbers,
which will get us a NULL buffer which we then
crash on.

https://bugzilla.gnome.org/show_bug.cgi?id=725008
2014-02-27 00:46:28 +00:00
divhaere
19a307930a matroska: add support for GRAY8, BGR and RGB video colourspaces in V_UNCOMPRESSED codec
https://bugzilla.gnome.org/show_bug.cgi?id=723849
2014-02-11 21:22:33 +01:00
Reynaldo H. Verdejo Pinochet
2f8a1aa870 matroska: factor out read context init/reset
While at this, move _track_reset() to track-ids
so it can be called from the common read context
reset routine.

https://bugzilla.gnome.org/show_bug.cgi?id=722705
2014-02-06 13:25:12 -03:00
Reynaldo H. Verdejo Pinochet
cf0c780138 matroskaparse: better default caps when none set
Uses information gathered during EBML parsing to
forge a more suitable set of caps instead of blindly
assuming everything is video/x-matroska.

For consistency, stream type reset was added to
matroska-demux too.

https://bugzilla.gnome.org/show_bug.cgi?id=722311
2014-01-21 11:11:46 -03:00
Sebastian Dröge
809d105982 matroskademux: Don't skip all video frames until the first keyframe
Instead do it like all other demuxers and let parsers and decoders
handle that. The keyframe information inside the container might
be completely wrong like in the sample file of the bug report,
and if it is correct and we push no keyframes, then the parsers
and decoders will handle that properly anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=682276
2014-01-15 22:49:58 +01:00
Sebastian Dröge
77745289c4 matroskademux: Add HEVC / h265 support 2014-01-06 14:55:36 +01:00
Sebastian Dröge
7cae8922cb matroskademux: Check for the correct size of codec_data in the ACM case 2013-12-23 15:46:43 +01:00
Sebastian Dröge
fb14f66696 matroska-demux: Allow a bit more variation when detecting common framerates
Instead of +/- 1ns we allow 2ns now. Due to rounding errors there are
some Matroska files out there with 33.333331ms per frame for 30fps.
2013-11-26 11:17:42 +01:00
Sebastian Dröge
20ad174679 matroska-demux: Use gst_util_double_to_fraction() instead of GValue magic 2013-11-26 10:21:04 +01:00