X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fsrc%2Fvlcproc.hpp;h=1e4fac2ffaca3a57a7234a3436a1472c568ae553;hb=1426a88f97b17b67b5538072e1efce3e874aaa40;hp=d56a59e1fe3114b853b50a87808848c28dc184ea;hpb=6b229b7e4d030f2ed1f19cc118d1312efb2488bf;p=vlc diff --git a/modules/gui/skins2/src/vlcproc.hpp b/modules/gui/skins2/src/vlcproc.hpp index d56a59e1fe..1e4fac2ffa 100644 --- a/modules/gui/skins2/src/vlcproc.hpp +++ b/modules/gui/skins2/src/vlcproc.hpp @@ -5,7 +5,7 @@ * $Id$ * * Authors: Cyril Deguet - * Olivier Teulière + * Olivier Teulière * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef VLCPROC_HPP @@ -27,7 +27,7 @@ #include -#include "../vars/playlist.hpp" +#include "../vars/equalizer.hpp" #include "../vars/playtree.hpp" #include "../vars/time.hpp" #include "../vars/volume.hpp" @@ -37,6 +37,8 @@ class OSTimer; class VarBool; +struct aout_instance_t; +struct vout_window_t; /// Singleton object handling VLC internal state and playlist @@ -50,9 +52,6 @@ class VlcProc: public SkinObject /// Delete the instance of VlcProc static void destroy( intf_thread_t *pIntf ); - /// Getter for the playlist variable - Playlist &getPlaylistVar() { return *((Playlist*)m_cPlaylist.get()); } - /// Getter for the playtree variable Playtree &getPlaytreeVar() { return *((Playtree*)m_cPlaytree.get()); } @@ -70,6 +69,14 @@ class VlcProc: public SkinObject VarText &getStreamURIVar() { return *((VarText*)(m_cVarStreamURI.get())); } + /// Getter for the stream bitrate variable + VarText &getStreamBitRateVar() + { return *((VarText*)(m_cVarStreamBitRate.get())); } + + /// Getter for the stream sample rate variable + VarText &getStreamSampleRateVar() + { return *((VarText*)(m_cVarStreamSampleRate.get())); } + /// Getter for the vout size variable VarBox &getVoutSizeVar() { return m_varVoutSize; } @@ -94,9 +101,7 @@ class VlcProc: public SkinObject private: /// Timer to call manage() regularly (via doManage()) OSTimer *m_pTimer; - /// Playlist variable - VariablePtr m_cPlaylist; - /// Playtree variable FIXME + /// Playtree variable VariablePtr m_cPlaytree; VariablePtr m_cVarRandom; VariablePtr m_cVarLoop; @@ -108,6 +113,8 @@ class VlcProc: public SkinObject /// Variable for current stream properties VariablePtr m_cVarStreamName; VariablePtr m_cVarStreamURI; + VariablePtr m_cVarStreamBitRate; + VariablePtr m_cVarStreamSampleRate; /// Variable for the "mute" state VariablePtr m_cVarMute; /// Variables related to the input @@ -115,8 +122,18 @@ class VlcProc: public SkinObject VariablePtr m_cVarStopped; VariablePtr m_cVarPaused; VariablePtr m_cVarSeekable; - /// Variable for the vout + /// Variables related to the vout + VariablePtr m_cVarFullscreen; VarBox m_varVoutSize; + VariablePtr m_cVarHasVout; + /// Variables related to audio + VariablePtr m_cVarHasAudio; + /// Equalizer variables + EqualizerBands m_varEqBands; + VariablePtr m_cVarEqPreamp; + VariablePtr m_cVarEqualizer; + /// Variable for DVD detection + VariablePtr m_cVarDvdActive; /// Set of handles of vout windows /** @@ -126,6 +143,8 @@ class VlcProc: public SkinObject set m_handleSet; /// Vout thread vout_thread_t *m_pVout; + /// Audio output + aout_instance_t *m_pAout; /** * Poll VLC internals to update the status (volume, current time in @@ -139,6 +158,13 @@ class VlcProc: public SkinObject /// Define the command that calls manage() DEFINE_CALLBACK( VlcProc, Manage ); + /// Refresh audio variables + void refreshAudio(); + /// Refresh playlist variables + void refreshPlaylist(); + /// Refresh input variables + void refreshInput(); + /// Update the stream name variable void updateStreamName( playlist_t *p_playlist ); @@ -157,6 +183,17 @@ class VlcProc: public SkinObject vlc_value_t oldVal, vlc_value_t newVal, void *pParam ); + /// Callback for item-change variable + static int onItemAppend( vlc_object_t *pObj, const char *pVariable, + vlc_value_t oldVal, vlc_value_t newVal, + void *pParam ); + + /// Callback for item-change variable + static int onItemDelete( vlc_object_t *pObj, const char *pVariable, + vlc_value_t oldVal, vlc_value_t newVal, + void *pParam ); + + /// Callback for playlist-current variable static int onPlaylistChange( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, @@ -167,6 +204,11 @@ class VlcProc: public SkinObject vlc_value_t oldVal, vlc_value_t newVal, void *pParam ); + /// Callback for interaction variable + static int onInteraction( vlc_object_t *pObj, const char *pVariable, + vlc_value_t oldVal, vlc_value_t newVal, + void *pParam ); + /// Callback to request a vout window static void *getWindow( intf_thread_t *pIntf, vout_thread_t *pVout, int *pXHint, int *pYHint, @@ -177,8 +219,18 @@ class VlcProc: public SkinObject static void releaseWindow( intf_thread_t *pIntf, void *pWindow ); /// Callback to change a vout window - static int controlWindow( intf_thread_t *pIntf, void *pWindow, + static int controlWindow( struct vout_window_t *pWnd, int query, va_list args ); + + /// Callback for equalizer-bands variable + static int onEqBandsChange( vlc_object_t *pObj, const char *pVariable, + vlc_value_t oldVal, vlc_value_t newVal, + void *pParam ); + + /// Callback for equalizer-preamp variable + static int onEqPreampChange( vlc_object_t *pObj, const char *pVariable, + vlc_value_t oldVal, vlc_value_t newVal, + void *pParam ); };