void VoutManager::destroy( intf_thread_t *pIntf )
{
- if( pIntf->p_sys->p_voutManager )
- {
- delete pIntf->p_sys->p_voutManager;
- pIntf->p_sys->p_voutManager = NULL;
- }
+ delete pIntf->p_sys->p_voutManager;
+ pIntf->p_sys->p_voutManager = NULL;
}
{
if( (*it).pCtrlVideo == NULL )
{
- pCtrlVideo->attachVoutWindow( (*it).pVoutWindow );
+ pCtrlVideo->attachVoutWindow( (*it).pVoutWindow,
+ (*it).width, (*it).height );
(*it).pCtrlVideo = pCtrlVideo;
break;
}
// save vout characteristics
m_SavedVoutVec.push_back( SavedVout( pVout, pVoutWindow, pCtrlVideo ) );
- msg_Dbg( getIntf(), "New incoming vout=0x%x, handle=0x%x, VideoCtrl=0x%x",
+ msg_Dbg( getIntf(), "New incoming vout=0x%p, handle=0x%p, VideoCtrl=0x%p",
pVout, handle, pCtrlVideo );
return handle;
{
if( (*it).pVout == pVout )
{
- msg_Dbg( pIntf, "vout released vout=0x%x, VideoCtrl=0x%x",
+ msg_Dbg( pIntf, "vout released vout=0x%p, VideoCtrl=0x%p",
pVout, (*it).pCtrlVideo );
// if a video control was being used, detach from it
{
intf_thread_t *pIntf = (intf_thread_t *)pWnd->p_private;
VoutManager *pThis = pIntf->p_sys->p_voutManager;
+ vout_thread_t* pVout = pWnd->vout;
switch( query )
{
if( i_width && i_height )
{
- // Post a resize vout command
- CmdResizeVout *pCmd =
- new CmdResizeVout( pThis->getIntf(), pWnd->handle.hwnd,
- i_width, i_height );
- AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( CmdGenericPtr( pCmd ) );
+ pThis->lockVout();
+
+ vector<SavedVout>::iterator it;
+ for( it = pThis->m_SavedVoutVec.begin();
+ it != pThis->m_SavedVoutVec.end(); it++ )
+ {
+ if( (*it).pVout == pVout )
+ {
+ // Post a vout resize command
+ CmdResizeVout *pCmd =
+ new CmdResizeVout( pThis->getIntf(),
+ (*it).pVoutWindow,
+ (int)i_width, (int)i_height );
+ AsyncQueue *pQueue =
+ AsyncQueue::instance( pThis->getIntf() );
+ pQueue->push( CmdGenericPtr( pCmd ) );
+ break;
+ }
+ }
+
+ pThis->unlockVout();
}
}