-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFactory.cpp
More file actions
46 lines (37 loc) · 1.04 KB
/
Copy pathFactory.cpp
File metadata and controls
46 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**********************************************************\
Auto-generated FactoryMain.cpp
This file contains the auto-generated factory methods
for the BasicMediaPlayer project
\**********************************************************/
#include "FactoryBase.h"
#if FB_WIN
#include "BasicMediaPlayerPlugin.h"
#else
#include "Mac/BasicMediaPlayerPluginMac.h"
#endif
#include <boost/make_shared.hpp>
class PluginFactory : public FB::FactoryBase
{
public:
FB::PluginCorePtr createPlugin(const std::string& mimetype)
{
#if FB_WIN
return boost::make_shared<BasicMediaPlayerPlugin>();
#else
return boost::make_shared<BasicMediaPlayerPluginMac>();
#endif
}
void globalPluginInitialize()
{
BasicMediaPlayerPlugin::StaticInitialize();
}
void globalPluginDeinitialize()
{
BasicMediaPlayerPlugin::StaticDeinitialize();
}
};
FB::FactoryBasePtr getFactoryInstance()
{
static boost::shared_ptr<PluginFactory> factory = boost::make_shared<PluginFactory>();
return factory;
}