mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
matroskademux: Add HEVC / h265 support
This commit is contained in:
parent
73fe1d1f6f
commit
77745289c4
2 changed files with 21 additions and 0 deletions
|
@ -5125,6 +5125,26 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
|
|||
NULL);
|
||||
}
|
||||
*codec_name = g_strdup ("H264");
|
||||
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEGH_HEVC)) {
|
||||
caps = gst_caps_new_empty_simple ("video/x-h265");
|
||||
if (data) {
|
||||
GstBuffer *priv;
|
||||
|
||||
gst_codec_utils_h265_caps_set_level_tier_and_profile (caps, data + 1,
|
||||
size - 1);
|
||||
|
||||
priv = gst_buffer_new_wrapped (g_memdup (data, size), size);
|
||||
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, priv, NULL);
|
||||
gst_buffer_unref (priv);
|
||||
|
||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "hvc1",
|
||||
"alignment", G_TYPE_STRING, "au", NULL);
|
||||
} else {
|
||||
GST_WARNING ("No codec data found, assuming output is byte-stream");
|
||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "byte-stream",
|
||||
NULL);
|
||||
}
|
||||
*codec_name = g_strdup ("HEVC");
|
||||
} else if ((!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO1)) ||
|
||||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO2)) ||
|
||||
(!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_REALVIDEO3)) ||
|
||||
|
|
|
@ -346,6 +346,7 @@
|
|||
#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_VIDEO_MPEGH_HEVC "V_MPEGH/ISO/HEVC"
|
||||
|
||||
#define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1 "A_MPEG/L1"
|
||||
#define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2 "A_MPEG/L2"
|
||||
|
|
Loading…
Reference in a new issue