[vlc-devel] [PATCH 2/4] gstdecode: Add suppor for more video codecs

Vikram Fugro vikram.fugro at gmail.com
Sun Jun 28 14:36:40 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 c7003bd6d2..37ad788d7c 100644
--- a/modules/codec/gstreamer/gstdecode.c
+++ b/modules/codec/gstreamer/gstdecode.c
@@ -365,6 +365,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,
@@ -373,6 +378,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