Phase 7 step 2
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include "DeckLinkSession.h"
|
||||
|
||||
#include "GlRenderConstants.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
@@ -210,7 +208,7 @@ bool DeckLinkSession::DiscoverDevicesAndModes(const VideoFormatSelection& videoM
|
||||
BMDTimeValue frameDuration = 0;
|
||||
BMDTimeScale frameTimescale = 0;
|
||||
outputMode->GetFrameRate(&frameDuration, &frameTimescale);
|
||||
mScheduler.Configure(frameDuration, frameTimescale);
|
||||
mScheduler.Configure(frameDuration, frameTimescale, mPlayoutPolicy);
|
||||
mState.frameBudgetMilliseconds = mScheduler.FrameBudgetMilliseconds();
|
||||
|
||||
mState.inputFrameRowBytes = mState.inputFrameSize.width * 2u;
|
||||
@@ -379,7 +377,9 @@ bool DeckLinkSession::ConfigureOutput(OutputFrameCallback callback, const VideoF
|
||||
mState.statusMessage = "Selected DeckLink output supports external keying. Set enableExternalKeying to true in runtime-host.json to request it.";
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
const VideoPlayoutPolicy policy = NormalizeVideoPlayoutPolicy(mPlayoutPolicy);
|
||||
mPlayoutPolicy = policy;
|
||||
for (unsigned i = 0; i < policy.outputFramePoolSize; i++)
|
||||
{
|
||||
CComPtr<IDeckLinkMutableVideoFrame> outputFrame;
|
||||
|
||||
@@ -523,7 +523,9 @@ bool DeckLinkSession::Start()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < kPrerollFrameCount; i++)
|
||||
const VideoPlayoutPolicy policy = NormalizeVideoPlayoutPolicy(mPlayoutPolicy);
|
||||
mPlayoutPolicy = policy;
|
||||
for (unsigned i = 0; i < policy.targetPrerollFrames; i++)
|
||||
{
|
||||
CComPtr<IDeckLinkMutableVideoFrame> outputVideoFrame;
|
||||
if (!AcquireNextOutputVideoFrame(outputVideoFrame))
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "DeckLinkVideoIOFormat.h"
|
||||
#include "VideoIOFormat.h"
|
||||
#include "VideoIOTypes.h"
|
||||
#include "VideoPlayoutPolicy.h"
|
||||
#include "VideoPlayoutScheduler.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
@@ -79,6 +80,7 @@ private:
|
||||
CComPtr<IDeckLinkKeyer> keyer;
|
||||
std::deque<CComPtr<IDeckLinkMutableVideoFrame>> outputVideoFrameQueue;
|
||||
VideoIOState mState;
|
||||
VideoPlayoutPolicy mPlayoutPolicy;
|
||||
VideoPlayoutScheduler mScheduler;
|
||||
InputFrameCallback mInputFrameCallback;
|
||||
OutputFrameCallback mOutputFrameCallback;
|
||||
|
||||
Reference in New Issue
Block a user