obs-studio/plugins/decklink/decklink-device-mode.hpp
tt2468 0698eeda94 decklink: Don't show incompatible formats
Changes the formats dropdown for decklink output to only show formats
using the same framerate as OBS does. OBS cannot perform framerate
conversions, meaning that if OBS's framerate is set to 45fps, and
decklink output is set to 60fps, the output will either lag heavily
or simply not function.
2021-07-15 07:29:13 -07:00

32 lines
674 B
C++

#pragma once
#include "platform.hpp"
#include <string>
#include <numeric>
#define MODE_ID_AUTO -1
class DeckLinkDeviceMode {
protected:
long long id;
IDeckLinkDisplayMode *mode;
std::string name;
public:
DeckLinkDeviceMode(IDeckLinkDisplayMode *mode, long long id);
DeckLinkDeviceMode(const std::string &name, long long id);
virtual ~DeckLinkDeviceMode(void);
BMDDisplayMode GetDisplayMode(void) const;
BMDDisplayModeFlags GetDisplayModeFlags(void) const;
long long GetId(void) const;
const std::string &GetName(void) const;
bool IsEqualFrameRate(int64_t num, int64_t den);
void SetMode(IDeckLinkDisplayMode *mode);
int GetWidth();
int GetHeight();
};