Merge pull request #476 from bssteph/master
Clean up Intensity Pro 4K commit a bit
This commit is contained in:
commit
7788ccdd86
@ -17,10 +17,10 @@ DeckLinkDeviceInstance::DeckLinkDeviceInstance(DeckLink *decklink_,
|
||||
// implement BMDDeckLinkPersistentID
|
||||
if (std::string("Intensity Pro 4K").compare(device_->GetName()) == 0) {
|
||||
currentFrame.format = VIDEO_FORMAT_BGRX;
|
||||
doRgb = true;
|
||||
pixelFormat = bmdFormat8BitBGRA;
|
||||
} else {
|
||||
currentFrame.format = VIDEO_FORMAT_UYVY;
|
||||
doRgb = false;
|
||||
pixelFormat = bmdFormat8BitYUV;
|
||||
}
|
||||
|
||||
currentPacket.samples_per_sec = 48000;
|
||||
@ -91,14 +91,8 @@ bool DeckLinkDeviceInstance::StartCapture(DeckLinkDeviceMode *mode_)
|
||||
|
||||
input->SetCallback(this);
|
||||
|
||||
BMDPixelFormat pixelFormat;
|
||||
const BMDDisplayMode displayMode = mode_->GetDisplayMode();
|
||||
|
||||
if (doRgb)
|
||||
pixelFormat = bmdFormat8BitBGRA;
|
||||
else
|
||||
pixelFormat = bmdFormat8BitYUV;
|
||||
|
||||
const HRESULT videoResult = input->EnableVideoInput(displayMode,
|
||||
pixelFormat, bmdVideoInputFlagDefault);
|
||||
|
||||
|
@ -8,8 +8,8 @@ protected:
|
||||
struct obs_source_audio currentPacket;
|
||||
DeckLink *decklink = nullptr;
|
||||
DeckLinkDevice *device = nullptr;
|
||||
bool doRgb = false;
|
||||
DeckLinkDeviceMode *mode = nullptr;
|
||||
BMDPixelFormat pixelFormat = bmdFormat8BitYUV;
|
||||
ComPtr<IDeckLinkInput> input;
|
||||
volatile long refCount = 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user