m_xShift( 0 ), m_yShift( 0 ), m_bAutoResize( autoResize ),
m_pVoutWindow( NULL ), m_bIsUseable( false )
{
- // Observe the vout size variable if the control is auto-resizable
- if( m_bAutoResize )
- {
- VarBox &rVoutSize = VlcProc::instance( pIntf )->getVoutSizeVar();
- rVoutSize.addObserver( this );
- }
-
VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
rFullscreen.addObserver( this );
}
CtrlVideo::~CtrlVideo()
{
- VarBox &rVoutSize = VlcProc::instance( getIntf() )->getVoutSizeVar();
- rVoutSize.delObserver( this );
-
VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
rFullscreen.delObserver( this );
}
-void CtrlVideo::onUpdate( Subject<VarBox> &rVoutSize, void *arg )
-{
- int newWidth = ((VarBox&)rVoutSize).getWidth() + m_xShift;
- int newHeight = ((VarBox&)rVoutSize).getHeight() + m_yShift;
-
- resizeControl( newWidth, newHeight );
-}
-
-
void CtrlVideo::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
// Visibility changed
/// Control video
-class CtrlVideo: public CtrlGeneric, public Observer<VarBox>
+class CtrlVideo: public CtrlGeneric
{
public:
CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
/// Get the type of control (custom RTTI)
virtual string getType() const { return "video"; }
- /// Method called when the vout size is updated
- virtual void onUpdate( Subject<VarBox> &rVoutSize, void* );
-
/// Method called when visibility or ActiveLayout is updated
virtual void onUpdate( Subject<VarBool> &rVariable , void* );
VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
- m_varVoutSize( pIntf ), m_varEqBands( pIntf ),
- m_pVout( NULL ), m_pAout( NULL ), m_bEqualizer_started( false ),
- m_cmdManage( this )
+ m_varEqBands( pIntf ), m_pVout( NULL ), m_pAout( NULL ),
+ m_bEqualizer_started( false ), m_cmdManage( this )
{
// Create a timer to poll the status of the vlc
OSFactory *pOsFactory = OSFactory::instance( pIntf );
VarText &getStreamSampleRateVar()
{ return *((VarText*)(m_cVarStreamSampleRate.get())); }
- /// Getter for the vout size variable
- VarBox &getVoutSizeVar() { return m_varVoutSize; }
-
/// Getter/Setter for the fullscreen variable
VarBool &getFullscreenVar() { return *((VarBool*)(m_cVarFullscreen.get())); }
void setFullscreenVar( bool );
VariablePtr m_cVarRecording;
/// Variables related to the vout
VariablePtr m_cVarFullscreen;
- VarBox m_varVoutSize;
VariablePtr m_cVarHasVout;
/// Variables related to audio
VariablePtr m_cVarHasAudio;