[vlc-commits] chromecast: always set vb value for vtenc

Thomas Guillem git at videolan.org
Tue Jul 3 17:13:30 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul  3 17:10:09 2018 +0200| [03e013a6b77ddf7fa0fe99af77803d3e6071ff6d] | committer: Thomas Guillem

chromecast: always set vb value for vtenc

Since this value is handled as a max rate.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03e013a6b77ddf7fa0fe99af77803d3e6071ff6d
---

 modules/stream_out/chromecast/cast.cpp | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index b775c5fec7..8830f57cad 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -1016,26 +1016,22 @@ static std::string GetVencAvcodecVTOption( sout_stream_t * /* p_stream */,
                                            const video_format_t * p_vid,
                                            int i_quality )
 {
-    const bool b_hdres = p_vid == NULL || p_vid->i_height == 0 || p_vid->i_height >= 800;
     std::stringstream ssout;
     ssout << "venc=avcodec{codec=h264_videotoolbox,options{realtime=1}}";
-    if( b_hdres )
+    switch( i_quality )
     {
-        switch( i_quality )
-        {
-            /* Here, performances issues won't come from videotoolbox but from
-             * some old chromecast devices */
+        /* Here, performances issues won't come from videotoolbox but from
+         * some old chromecast devices */
 
-            case CONVERSION_QUALITY_HIGH:
-                break;
-            case CONVERSION_QUALITY_MEDIUM:
-                ssout << ",vb=8000000";
-                break;
-            case CONVERSION_QUALITY_LOW:
-            case CONVERSION_QUALITY_LOWCPU:
-                ssout << ",vb=3000000";
-                break;
-        }
+        case CONVERSION_QUALITY_HIGH:
+            break;
+        case CONVERSION_QUALITY_MEDIUM:
+            ssout << ",vb=8000000";
+            break;
+        case CONVERSION_QUALITY_LOW:
+        case CONVERSION_QUALITY_LOWCPU:
+            ssout << ",vb=3000000";
+            break;
     }
 
     return ssout.str();



More information about the vlc-commits mailing list