[vlc-devel] [PATCH 2/2] ui: add x265 encoder in Stream Output dialog for HEVC

mahesh at multicorewareinc.com mahesh at multicorewareinc.com
Mon Jul 11 15:09:09 CEST 2016


From: Mahesh <mahesh at multicorewareinc.com>

---
 modules/gui/qt/components/sout/profile_selector.cpp | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt/components/sout/profile_selector.cpp b/modules/gui/qt/components/sout/profile_selector.cpp
index cfb1882..2fe35c5 100644
--- a/modules/gui/qt/components/sout/profile_selector.cpp
+++ b/modules/gui/qt/components/sout/profile_selector.cpp
@@ -257,8 +257,9 @@ void VLCProfileSelector::updateOptions( int i )
 
         if ( !value.isEmpty() )
         {
+            QString encoder;
             smrl.option( "vcodec", value );
-
+            encoder = value;
             HASHPICK( "vcodec", "bitrate" );
             if ( value.toInt() > 0 )
             {
@@ -272,7 +273,7 @@ void VLCProfileSelector::updateOptions( int i )
                 smrl.option( "vfilter", valuesList.join( ":" ) );
             }
 
-            /*if ( codec is h264 )*/
+            
             {
                 /* special handling */
                 QStringList codecoptions;
@@ -285,9 +286,18 @@ void VLCProfileSelector::updateOptions( int i )
                 if( !value.isEmpty() )
                     codecoptions << QUrl::fromPercentEncoding( value.toLatin1() );
 
-                if ( codecoptions.count() )
-                    smrl.option( "venc",
-                        QString("x264{%1}").arg( codecoptions.join(",") ) );
+                if ( encoder == "hevc" )
+                { 
+                    if ( codecoptions.count() )
+                         smrl.option( "venc",
+                             QString("x265{%1}").arg( codecoptions.join(",") ) );
+                }
+                else
+                {
+                    if ( codecoptions.count() )
+                         smrl.option( "venc",
+                             QString("x264{%1}").arg( codecoptions.join(",") ) );
+                }
             }
 
             HASHPICK( "vcodec", "framerate" );
-- 
1.8.3.1



More information about the vlc-devel mailing list