yolobs-studio/plugins/decklink/plugin-main.cpp

36 lines
829 B
C++
Raw Normal View History

2016-02-23 23:16:51 +00:00
#include <obs-module.h>
2019-07-27 12:47:10 +00:00
#include "decklink-devices.hpp"
2016-02-23 23:16:51 +00:00
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("decklink", "en-US")
2019-07-27 12:47:10 +00:00
MODULE_EXPORT const char *obs_module_description(void)
2016-02-23 23:16:51 +00:00
{
2019-07-27 12:47:10 +00:00
return "Blackmagic DeckLink source";
2016-02-23 23:16:51 +00:00
}
2019-07-27 12:47:10 +00:00
extern struct obs_source_info create_decklink_source_info();
struct obs_source_info decklink_source_info;
2016-02-23 23:16:51 +00:00
2019-07-27 12:47:10 +00:00
extern struct obs_output_info create_decklink_output_info();
struct obs_output_info decklink_output_info;
2016-02-23 23:16:51 +00:00
bool obs_module_load(void)
{
deviceEnum = new DeckLinkDeviceDiscovery();
if (!deviceEnum->Init())
return true;
2019-07-27 12:47:10 +00:00
decklink_source_info = create_decklink_source_info();
obs_register_source(&decklink_source_info);
2016-02-23 23:16:51 +00:00
2019-07-27 12:47:10 +00:00
decklink_output_info = create_decklink_output_info();
obs_register_output(&decklink_output_info);
2016-02-23 23:16:51 +00:00
return true;
}
void obs_module_unload(void)
{
delete deviceEnum;
}