drawable(Win32): fix compil
[vlc.git] / modules / gui / skins2 / commands / cmd_voutwindow.cpp
blob265bdac68acc80fb9d1f9565322a86d4aab92708
1 /*****************************************************************************
2 * cmd_voutwindow.cpp
3 *****************************************************************************
4 * Copyright (C) 2009 the VideoLAN team
5 * $Id$
7 * Author: Erwan Tulou <erwan10 aT videolan doT org >
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #include "cmd_voutwindow.hpp"
25 #include "../src/vout_manager.hpp"
26 #include "../src/vout_window.hpp"
29 CmdNewVoutWindow::CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd )
30 : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
33 void CmdNewVoutWindow::execute()
35 intf_sys_t *p_sys = getIntf()->p_sys;
37 vlc_mutex_lock( &p_sys->vout_lock );
39 p_sys->handle = p_sys->p_voutManager->acceptWnd( m_pWnd );
40 p_sys->b_vout_ready = true;
41 vlc_cond_signal( &p_sys->vout_wait );
43 vlc_mutex_unlock( &p_sys->vout_lock );
47 CmdReleaseVoutWindow::CmdReleaseVoutWindow( intf_thread_t *pIntf,
48 vout_window_t* pWnd )
49 : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
52 void CmdReleaseVoutWindow::execute()
54 intf_sys_t *p_sys = getIntf()->p_sys;
56 vlc_mutex_lock( &p_sys->vout_lock );
58 p_sys->p_voutManager->releaseWnd( m_pWnd );
59 p_sys->b_vout_ready = true;
60 vlc_cond_signal( &p_sys->vout_wait );
62 vlc_mutex_unlock( &p_sys->vout_lock );