summaryrefslogtreecommitdiff
path: root/gst/matroska/matroska-mux.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-09-11 09:24:35 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-09-13 10:05:18 +0300
commit3592bf772686867066c68754680d551e2f0a0f80 (patch)
tree7acc93bd198d09063388977d2d1816f0b1d38057 /gst/matroska/matroska-mux.c
parent732b352df61d0cd33e3f43c86b5c10f1abd26549 (diff)
downloadgstreamer-plugins-good-3592bf772686867066c68754680d551e2f0a0f80.tar.gz
matroska: Add support for muxing/demuxing ffv1
Previously only demuxing when stored via the RIFF/AVI mapping was supported. See https://github.com/FFmpeg/FFV1/blob/master/ffv1.md#matroska-file-format Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/923 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1080>
Diffstat (limited to 'gst/matroska/matroska-mux.c')
-rw-r--r--gst/matroska/matroska-mux.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 28970a6f1..c7a5adfd6 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -146,7 +146,8 @@ static GstStaticPadTemplate videosink_templ =
"video/x-prores, "
COMMON_VIDEO_CAPS "; "
"video/x-wmv, " "wmvversion = (int) [ 1, 3 ], " COMMON_VIDEO_CAPS "; "
- "video/x-av1, " COMMON_VIDEO_CAPS)
+ "video/x-av1, " COMMON_VIDEO_CAPS ";"
+ "video/x-ffv, ffversion = (int) 1, " COMMON_VIDEO_CAPS)
);
#define COMMON_AUDIO_CAPS \
@@ -1344,6 +1345,12 @@ skip_details:
if (codec_buf != NULL)
gst_buffer_extract_dup (codec_buf, 0, gst_buffer_get_size (codec_buf),
&context->codec_priv, &context->codec_priv_size);
+ } else if (!strcmp (mimetype, "video/x-ffv")) {
+ gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_FFV1);
+ gst_matroska_mux_free_codec_priv (context);
+ if (codec_buf != NULL)
+ gst_buffer_extract_dup (codec_buf, 0, gst_buffer_get_size (codec_buf),
+ &context->codec_priv, &context->codec_priv_size);
} else if (!strcmp (mimetype, "video/mpeg")) {
gint mpegversion;