[vlc-devel] [PATCH] ActiveX: added playback mode processing

Sergey Radionov rsatom at gmail.com
Sat Apr 21 18:16:29 CEST 2012


---
 activex/plugin.cpp |    8 +++-----
 activex/plugin.h   |    4 ++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/activex/plugin.cpp b/activex/plugin.cpp
index fe5c5b8..7db51f7 100644
--- a/activex/plugin.cpp
+++ b/activex/plugin.cpp
@@ -522,11 +522,6 @@ void VLCPlugin::initVLC()
     ppsz_argv[ppsz_argc++] = "--intf=dummy";
     ppsz_argv[ppsz_argc++] = "--no-video-title-show";
 
-
-    // loop mode is a configuration option only
-    if( _b_autoloop )
-        ppsz_argv[ppsz_argc++] = "--loop";
-
     _p_libvlc = libvlc_new(ppsz_argc, ppsz_argv);
     if( !_p_libvlc )
         return;
@@ -534,6 +529,9 @@ void VLCPlugin::initVLC()
     if( !vlc_player::open(_p_libvlc) )
         return;
 
+    vlc_player::set_mode(_b_autoloop ? libvlc_playback_mode_loop :
+                                       libvlc_playback_mode_default);
+
     set_player_window();
 
     // initial playlist item
diff --git a/activex/plugin.h b/activex/plugin.h
index e1ed102..06fb5c0 100644
--- a/activex/plugin.h
+++ b/activex/plugin.h
@@ -124,6 +124,10 @@ public:
     inline void setAutoLoop(BOOL autoloop)
     {
         _b_autoloop = autoloop;
+        if( vlc_player::is_open() ){
+            vlc_player::set_mode(autoloop ? libvlc_playback_mode_loop :
+                                            libvlc_playback_mode_default);
+        }
         setDirty(TRUE);
     };
     inline BOOL getAutoLoop(void) { return _b_autoloop;};
-- 
1.7.7.1.msysgit.0




More information about the vlc-devel mailing list