]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/vlcproc.hpp
skins2: use the "mute" variable
[vlc] / modules / gui / skins2 / src / vlcproc.hpp
index 64c79420ef6bba37b7c78c0ca2f681d8c5c5156c..8c18aee0352bc516d418656d055ef0afa193702d 100644 (file)
 #include "../utils/position.hpp"
 #include "../utils/var_text.hpp"
 #include "../utils/var_string.hpp"
-#include "../commands/cmd_generic.hpp"
 #include "../controls/ctrl_video.hpp"
 
 class OSTimer;
 class VarBool;
-struct aout_instance_t;
 struct vout_window_t;
 
 
@@ -66,6 +64,10 @@ public:
     /// Getter for the volume variable
     Volume &getVolumeVar() { return *((Volume*)(m_cVarVolume.get())); }
 
+    /// Getter for the current playback speed
+    VarText &getSpeedVar()
+       { return *((VarText*)(m_cVarSpeed.get())); }
+
     /// Getter for the stream name variable
     VarText &getStreamNameVar()
        { return *((VarText*)(m_cVarStreamName.get())); }
@@ -96,7 +98,9 @@ public:
     /// update equalizer
     void update_equalizer( );
 
-    void on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    /// update global variables for the current input
+    void update_current_input( );
+
     void on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal );
     void on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
     void on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal );
@@ -107,18 +111,19 @@ public:
     void on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal );
 
     void on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+    void on_mute_changed( vlc_object_t* p_obj, vlc_value_t newVal );
     void on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal );
 
     void on_intf_show_changed( vlc_object_t* p_obj, vlc_value_t newVal );
 
+    void on_mouse_moved_changed( vlc_object_t* p_obj, vlc_value_t newVal );
+
 protected:
     // Protected because it is a singleton
     VlcProc( intf_thread_t *pIntf );
     virtual ~VlcProc();
 
 private:
-    /// Timer to call manage() regularly (via doManage())
-    OSTimer *m_pTimer;
     /// Playtree variable
     VariablePtr m_cPlaytree;
     VariablePtr m_cVarRandom;
@@ -128,6 +133,8 @@ private:
     VariablePtr m_cVarTime;
     /// Variable for audio volume
     VariablePtr m_cVarVolume;
+    /// Variable for speed playback
+    VariablePtr m_cVarSpeed;
     /// Variable for current stream properties
     VariablePtr m_cVarStreamName;
     VariablePtr m_cVarStreamURI;
@@ -158,27 +165,15 @@ private:
     /// Vout thread
     vout_thread_t *m_pVout;
     /// Audio output
-    aout_instance_t *m_pAout;
+    audio_output_t *m_pAout;
     bool m_bEqualizer_started;
 
-    /**
-     * Poll VLC internals to update the status (volume, current time in
-     * the stream, current filename, play/pause/stop status, ...)
-     * This function should be called regurlarly, since there is no
-     * callback mechanism (yet?) to automatically update a variable when
-     * the internal status changes
-     */
-    void manage();
-
     // reset variables when input is over
     void reset_input();
 
     // init variables (libvlc and playlist levels)
     void init_variables();
 
-    /// Define the command that calls manage()
-    DEFINE_CALLBACK( VlcProc, Manage );
-
     /// Callback for intf-show variable
     static int onIntfShow( vlc_object_t *pObj, const char *pVariable,
                            vlc_value_t oldVal, vlc_value_t newVal,
@@ -227,5 +222,4 @@ private:
                                    void *pParam );
 };
 
-
 #endif