File: DecklinkBase.h

package info (click to toggle)
obs-studio 30.2.3%2Bdfsg-3.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,928 kB
  • sloc: ansic: 202,137; cpp: 112,403; makefile: 868; python: 599; sh: 275; javascript: 19
file content (36 lines) | stat: -rw-r--r-- 972 bytes parent folder | download | duplicates (4)
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
#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_);
	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;

public:
	virtual bool Activate(DeckLinkDevice *device, long long modeId);
	virtual bool Activate(DeckLinkDevice *device, long long modeId,
			      BMDVideoConnection bmdVideoConnection,
			      BMDAudioConnection bmdAudioConnection);
	virtual void Deactivate() = 0;

	DeckLinkDevice *GetDevice() const;
};