[vlc-devel] [PATCH 1/2] gstdecode: Add support for more video codecs

Vikram Fugro vikram.fugro at gmail.com
Sun Sep 27 11:12:57 CEST 2020


Add support for vp9 and hevc
---
 modules/codec/gstreamer/gstdecode.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/codec/gstreamer/gstdecode.c b/modules/codec/gstreamer/gstdecode.c
index 61cb95f4a6..020bc9ded6 100644
--- a/modules/codec/gstreamer/gstdecode.c
+++ b/modules/codec/gstreamer/gstdecode.c
@@ -363,6 +363,11 @@ static GstStructure* vlc_to_gst_fmt( const es_format_t *p_fmt )
             gst_structure_set( p_str, "stream-format", G_TYPE_STRING,
                     "byte-stream", NULL );
         break;
+    case VLC_CODEC_HEVC:
+        p_str = gst_structure_new_empty( "video/x-h265" );
+        gst_structure_set( p_str, "alignment", G_TYPE_STRING, "au",
+                "stream-format", G_TYPE_STRING, "hvc1", NULL );
+        break;
     case VLC_CODEC_MP4V:
         p_str = gst_structure_new_empty( "video/mpeg" );
         gst_structure_set( p_str, "mpegversion", G_TYPE_INT, 4,
@@ -371,6 +376,9 @@ static GstStructure* vlc_to_gst_fmt( const es_format_t *p_fmt )
     case VLC_CODEC_VP8:
         p_str = gst_structure_new_empty( "video/x-vp8" );
         break;
+    case VLC_CODEC_VP9:
+        p_str = gst_structure_new_empty( "video/x-vp9" );
+        break;
     case VLC_CODEC_MPGV:
         p_str = gst_structure_new_empty( "video/mpeg" );
         gst_structure_set( p_str, "mpegversion", G_TYPE_INT, 2,
-- 
2.25.1



More information about the vlc-devel mailing list