diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 2a717f6eb9..c586f55c5e 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -3423,7 +3423,8 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, if ((is_simpleblock && !(flags & 0x80)) || referenceblock) { delta_unit = TRUE; invisible_frame = ((flags & 0x08)) && - (strcmp (stream->codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8) == 0); + (!strcmp (stream->codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8) || + !strcmp (stream->codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP9)); } } @@ -5065,6 +5066,9 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8)) { caps = gst_caps_new_empty_simple ("video/x-vp8"); *codec_name = g_strdup_printf ("On2 VP8"); + } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP9)) { + caps = gst_caps_new_empty_simple ("video/x-vp9"); + *codec_name = g_strdup_printf ("On2 VP9"); } else { GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id); return NULL; diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h index c1b29362b3..f19a6d2f58 100644 --- a/gst/matroska/matroska-ids.h +++ b/gst/matroska/matroska-ids.h @@ -345,6 +345,7 @@ #define GST_MATROSKA_CODEC_ID_VIDEO_SNOW "V_SNOW" #define GST_MATROSKA_CODEC_ID_VIDEO_DIRAC "V_DIRAC" #define GST_MATROSKA_CODEC_ID_VIDEO_VP8 "V_VP8" +#define GST_MATROSKA_CODEC_ID_VIDEO_VP9 "V_VP9" #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1 "A_MPEG/L1" #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2 "A_MPEG/L2" diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index cad509de13..d31b1ab4dc 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -961,7 +961,8 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps) /* set vp8 defaults or let user override it */ if (GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration_user == FALSE - && (!strcmp (mimetype, "video/x-vp8"))) + && (!strcmp (mimetype, "video/x-vp8") + || !strcmp (mimetype, "video/x-vp9"))) GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration = DEFAULT_PAD_FRAME_DURATION_VP8; @@ -1136,6 +1137,8 @@ skip_details: gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_DIRAC); } else if (!strcmp (mimetype, "video/x-vp8")) { gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_VP8); + } else if (!strcmp (mimetype, "video/x-vp9")) { + gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_VP9); } else if (!strcmp (mimetype, "video/mpeg")) { gint mpegversion; @@ -3262,8 +3265,9 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); is_video_keyframe = TRUE; } else if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DECODE_ONLY) && - !strcmp (collect_pad->track->codec_id, - GST_MATROSKA_CODEC_ID_VIDEO_VP8)) { + (!strcmp (collect_pad->track->codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8) + || !strcmp (collect_pad->track->codec_id, + GST_MATROSKA_CODEC_ID_VIDEO_VP9))) { GST_LOG_OBJECT (mux, "have VP8 video invisible frame, " "ts=%" GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); diff --git a/gst/matroska/webm-mux.c b/gst/matroska/webm-mux.c index 9f04b33364..19aa245772 100644 --- a/gst/matroska/webm-mux.c +++ b/gst/matroska/webm-mux.c @@ -62,10 +62,11 @@ static GstStaticPadTemplate webm_src_templ = GST_STATIC_PAD_TEMPLATE ("src", ); static GstStaticPadTemplate webm_videosink_templ = -GST_STATIC_PAD_TEMPLATE ("video_%u", + GST_STATIC_PAD_TEMPLATE ("video_%u", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS ("video/x-vp8, " COMMON_VIDEO_CAPS) + GST_STATIC_CAPS ("video/x-vp8, " COMMON_VIDEO_CAPS ";" + "video/x-vp9, " COMMON_VIDEO_CAPS) ); static GstStaticPadTemplate webm_audiosink_templ =