[vlc-commits] macosx: fix avcodec-hw option implementation

Felix Paul Kühne git at videolan.org
Thu Dec 27 13:08:27 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Dec 27 12:18:42 2012 +0100| [d1ce26a733502c1d11f5fe2d7b4591f3648d8a9e] | committer: Felix Paul Kühne

macosx: fix avcodec-hw option implementation

The option is presented to the user in a simplified way, since there is only one hardware acceleration module on the Mac.

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

 modules/gui/macosx/simple_prefs.m |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 11e4b002..92fad40 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -545,7 +545,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
     [self setupField: o_input_httpproxypwd_sfld forOption:"http-proxy-pwd"];
     [o_input_postproc_fld setIntValue: config_GetInt(p_intf, "postproc-q")];
     [o_input_postproc_fld setToolTip: _NS(config_GetLabel(p_intf, "postproc-q"))];
-    [self setupButton: o_input_avcodec_hw_ckb forBoolValue:"avcodec-hw"];
+    [o_input_avcodec_hw_ckb setState: !strcmp(config_GetPsz(p_intf,"avcodec-hw"), "vdadecoder")];
+    [o_input_avcodec_hw_ckb setToolTip: _NS(config_GetLabel(p_intf,"avcodec-hw") ?: "")];
 
     [self setupButton: o_input_avi_pop forIntList: "avi-index"];
 
@@ -882,7 +883,10 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
         SaveIntList(o_input_avi_pop, "avi-index");
 
         config_PutInt(p_intf, "rtsp-tcp", [o_input_rtsp_ckb state]);
-        config_PutInt(p_intf, "avcodec-hw", [o_input_avcodec_hw_ckb state]);
+        if ([o_input_avcodec_hw_ckb state])
+            config_PutPsz(p_intf, "avcodec-hw", "vdadecoder");
+        else
+            config_PutPsz(p_intf, "avcodec-hw", "");
         SaveIntList(o_input_skipLoop_pop, "avcodec-skiploopfilter");
 
         config_PutInt(p_intf, "mkv-preload-local-dir", [o_input_mkv_preload_dir_ckb state]);



More information about the vlc-commits mailing list