Skip to content
Snippets Groups Projects
Commit 53d11874 authored by Pierre Lamot's avatar Pierre Lamot Committed by Thomas Guillem
Browse files

qt: add vlc_player_locker


Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 5d94bd56
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@
#include <vlc_common.h>
#include <vlc_interface.h> /* intf_thread_t */
#include <vlc_playlist_legacy.h> /* playlist_t */
#include <vlc_player.h> /* vlc_player_t */
#include <qconfig.h>
......@@ -106,6 +107,28 @@ struct vlc_playlist_locker {
playlist_t* p_playlist;
};
/**
* This class may be used for scope-bound locking/unlocking
* of a player_t*. As hinted, the player is locked when
* the object is created, and unlocked when the object is
* destroyed.
*/
struct vlc_player_locker {
vlc_player_locker( vlc_player_t* p_player )
: p_player( p_player )
{
vlc_player_Lock( p_player );
}
~vlc_player_locker()
{
vlc_player_Unlock( p_player );
}
private:
vlc_player_t* p_player;
};
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
#define THEAM ActionsManager::getInstance( p_intf )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment