yolobs-studio/plugins/decklink/DecklinkBase.h

37 lines
972 B
C
Raw Permalink Normal View History

2019-07-27 12:47:10 +00:00
#pragma once
#include <map>
#include <vector>
#include <mutex>
#include <obs-module.h>
#include "platform.hpp"
#include "decklink-device-discovery.hpp"
#include "decklink-device-instance.hpp"
#include "decklink-device-mode.hpp"
class DecklinkBase {
protected:
DecklinkBase(DeckLinkDeviceDiscovery *discovery_);
2019-09-22 21:19:10 +00:00
ComPtr<DeckLinkDeviceInstance> instance;
DeckLinkDeviceDiscovery *discovery;
std::recursive_mutex deviceMutex;
volatile long activateRefs = 0;
BMDPixelFormat pixelFormat = bmdFormat8BitYUV;
video_colorspace colorSpace = VIDEO_CS_DEFAULT;
video_range_type colorRange = VIDEO_RANGE_DEFAULT;
speaker_layout channelFormat = SPEAKERS_STEREO;
2019-07-27 12:47:10 +00:00
public:
virtual bool Activate(DeckLinkDevice *device, long long modeId);
2020-10-01 20:15:25 +00:00
virtual bool Activate(DeckLinkDevice *device, long long modeId,
BMDVideoConnection bmdVideoConnection,
BMDAudioConnection bmdAudioConnection);
virtual void Deactivate() = 0;
2019-07-27 12:47:10 +00:00
DeckLinkDevice *GetDevice() const;
};