Skip to content

Commit

Permalink
* added a new skin variable "vlc.hasVout", true when... there is a vo…
Browse files Browse the repository at this point in the history
…ut !
  • Loading branch information
Cyril Deguet committed Mar 25, 2006
1 parent 41c0868 commit 54d75f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/skins/skins2-howto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,9 @@ difficulty to understand how VLC skins work.</para>
<listitem><para>
<emphasis>equalizer.isEnabled</emphasis>: True if the equalizer audio filter is enabled (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>vlc.hasVout</emphasis>: True if a video is being played (since VLC 0.8.5).
</para></listitem>
<listitem><para>
<emphasis>vlc.isFullscreen</emphasis>: True when the video is in fullscreen mode (since VLC 0.8.5).
</para></listitem>
Expand Down
4 changes: 4 additions & 0 deletions modules/gui/skins2/src/vlcproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
REGISTER_VAR( m_cVarEqPreamp, EqualizerPreamp, "equalizer.preamp" )
REGISTER_VAR( m_cVarDvdActive, VarBoolImpl, "dvd.isActive" )
REGISTER_VAR( m_cVarFullscreen, VarBoolImpl, "vlc.isFullscreen" )
REGISTER_VAR( m_cVarHasVout, VarBoolImpl, "vlc.hasVout" )
#undef REGISTER_VAR
m_cVarStreamName = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamName, "streamName" );
Expand Down Expand Up @@ -237,6 +238,7 @@ void VlcProc::manage()
VarBoolImpl *pVarRepeat = (VarBoolImpl*)m_cVarRepeat.get();
VarBoolImpl *pVarDvdActive = (VarBoolImpl*)m_cVarDvdActive.get();
VarBoolImpl *pVarFullscreen = (VarBoolImpl*)m_cVarFullscreen.get();
VarBoolImpl *pVarHasVout = (VarBoolImpl*)m_cVarHasVout.get();

// Refresh audio variables
refreshAudio();
Expand Down Expand Up @@ -282,6 +284,7 @@ void VlcProc::manage()
// Refresh fullscreen status
vout_thread_t *pVout = (vout_thread_t *)vlc_object_find( pInput,
VLC_OBJECT_VOUT, FIND_CHILD );
pVarHasVout->set( pVout != NULL );
if( pVout )
{
pVarFullscreen->set( pVout->b_fullscreen );
Expand All @@ -297,6 +300,7 @@ void VlcProc::manage()
pVarDvdActive->set( false );
pTime->set( 0, false );
pVarFullscreen->set( false );
pVarHasVout->set( false );
}

// Refresh the random variable
Expand Down
1 change: 1 addition & 0 deletions modules/gui/skins2/src/vlcproc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class VlcProc: public SkinObject
/// Variables related to the vout
VariablePtr m_cVarFullscreen;
VarBox m_varVoutSize;
VariablePtr m_cVarHasVout;
/// Equalizer variables
EqualizerBands m_varEqBands;
VariablePtr m_cVarEqPreamp;
Expand Down

0 comments on commit 54d75f7

Please sign in to comment.