mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-03 10:47:23 +02:00
Port from git
This commit is contained in:
33
Source/Video/VideoFactory.cpp
Normal file
33
Source/Video/VideoFactory.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/* This file is subject to the terms and conditions defined in
|
||||
* file 'LICENSE.txt', which is part of this source code package.
|
||||
*/
|
||||
#include "VideoFactory.h"
|
||||
#include "IVideo.h"
|
||||
#include "GStreamerVideo.h"
|
||||
|
||||
bool VideoFactory::Enabled = true;
|
||||
int VideoFactory::NumLoops = 0;
|
||||
|
||||
IVideo *VideoFactory::CreateVideo()
|
||||
{
|
||||
IVideo *instance = NULL;
|
||||
|
||||
if(Enabled)
|
||||
{
|
||||
instance = new GStreamerVideo();
|
||||
instance->Initialize();
|
||||
((GStreamerVideo *)(instance))->SetNumLoops(NumLoops);
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
void VideoFactory::SetEnabled(bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
}
|
||||
|
||||
void VideoFactory::SetNumLoops(int numLoops)
|
||||
{
|
||||
NumLoops = numLoops;
|
||||
}
|
||||
Reference in New Issue
Block a user