[vlc-devel] commit: Qt4: control aout through playlist ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Jul 9 21:15:13 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul  9 22:14:20 2009 +0300| [76099331dae4ca5b7da6fc3f615c183fd4470b66] | committer: Rémi Denis-Courmont 

Qt4: control aout through playlist

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

 modules/gui/qt4/actions_manager.cpp              |    6 +++---
 modules/gui/qt4/components/controller_widget.cpp |   14 +++++++++++---
 modules/gui/qt4/components/extended_panels.cpp   |    9 +++------
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/modules/gui/qt4/actions_manager.cpp b/modules/gui/qt4/actions_manager.cpp
index e4c0053..77413ae 100644
--- a/modules/gui/qt4/actions_manager.cpp
+++ b/modules/gui/qt4/actions_manager.cpp
@@ -170,16 +170,16 @@ void ActionsManager::frame()
 
 void ActionsManager::toggleMuteAudio()
 {
-     aout_ToggleMute( p_intf, NULL );
+     aout_ToggleMute( THEPL, NULL );
 }
 
 void ActionsManager::AudioUp()
 {
-    aout_VolumeUp( p_intf, 1, NULL );
+    aout_VolumeUp( THEPL, 1, NULL );
 }
 
 void ActionsManager::AudioDown()
 {
-    aout_VolumeDown( p_intf, 1, NULL );
+    aout_VolumeDown( THEPL, 1, NULL );
 }
 
diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index a680339..839dec6 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -133,7 +133,9 @@ void SoundWidget::updateVolume( int i_sliderVolume )
     if( !b_my_volume )
     {
         int i_res = i_sliderVolume  * (AOUT_VOLUME_MAX / 2) / VOLUME_MAX;
-        aout_VolumeSet( p_intf, i_res );
+        playlist_t *p_playlist = pl_Hold( p_intf );
+        aout_VolumeSet( p_playlist, i_res );
+        pl_Release( p_intf );
     }
     if( i_sliderVolume == 0 )
     {
@@ -154,7 +156,10 @@ void SoundWidget::updateVolume()
 {
     /* Audio part */
     audio_volume_t i_volume;
-    aout_VolumeGet( p_intf, &i_volume );
+    playlist_t *p_playlist = pl_Hold( p_intf );
+
+    aout_VolumeGet( p_playlist, &i_volume );
+    pl_Release( p_intf );
     i_volume = ( ( i_volume + 1 ) *  VOLUME_MAX )/ (AOUT_VOLUME_MAX/2);
     int i_gauge = volumeSlider->value();
     b_my_volume = false;
@@ -184,7 +189,10 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
         }
         else
         {
-            aout_ToggleMute( p_intf, NULL );
+            playlist_t *p_playlist = pl_Hold( p_intf );
+
+            aout_ToggleMute( p_playlist, NULL );
+            pl_Release( p_intf );
         }
         e->accept();
         return true;
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 51b6ecc..203b53b 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -923,12 +923,9 @@ void Equalizer::updateUIFromCore()
 void Equalizer::enable()
 {
     bool en = ui.enableCheck->isChecked();
-    aout_EnableFilter( VLC_OBJECT( p_intf ), "equalizer",
-                       en ? true : false );
-//    aout_EnableFilter( VLC_OBJECT( p_intf ), "upmixer",
-//                       en ? true : false );
-//     aout_EnableFilter( VLC_OBJECT( p_intf ), "vsurround",
-//                       en ? true : false );
+    aout_EnableFilter( THEPL, "equalizer", en );
+//    aout_EnableFilter( THEPL, "upmixer", en );
+//     aout_EnableFilter( THEPL, "vsurround", en );
     enable( en );
 
     if( presetsComboBox->currentIndex() < 0 )




More information about the vlc-devel mailing list