File: DecklinkInput.hpp

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 (56 lines) | stat: -rw-r--r-- 1,473 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include "DecklinkBase.h"

class DeckLinkInput : public DecklinkBase {
protected:
	bool isCapturing = false;
	obs_source_t *source;

	void SaveSettings();
	static void DevicesChanged(void *param, DeckLinkDevice *device,
				   bool added);

public:
	DeckLinkInput(obs_source_t *source, DeckLinkDeviceDiscovery *discovery);
	virtual ~DeckLinkInput(void);

	long long GetActiveModeId(void) const;
	obs_source_t *GetSource(void) const;

	inline BMDPixelFormat GetPixelFormat() const { return pixelFormat; }
	inline void SetPixelFormat(BMDPixelFormat format)
	{
		pixelFormat = format;
	}
	inline video_colorspace GetColorSpace() const { return colorSpace; }
	inline void SetColorSpace(video_colorspace format)
	{
		colorSpace = format;
	}
	inline video_range_type GetColorRange() const { return colorRange; }
	inline void SetColorRange(video_range_type format)
	{
		colorRange = format;
	}
	inline speaker_layout GetChannelFormat() const { return channelFormat; }
	inline void SetChannelFormat(speaker_layout format)
	{
		channelFormat = format;
	}

	bool Activate(DeckLinkDevice *device, long long modeId,
		      BMDVideoConnection bmdVideoConnection,
		      BMDAudioConnection bmdAudioConnection) override;
	void Deactivate() override;
	bool Capturing();

	bool buffering = false;
	bool dwns = false;
	std::string hash;
	long long id;
	bool swap = false;
	bool allow10Bit = false;
	BMDVideoConnection videoConnection;
	BMDAudioConnection audioConnection;
};