fix decklink-out: use stream_frame_ counter for DeckLink scheduling instead of TAI-based grains_read_
This commit is contained in:
@@ -190,6 +190,7 @@ bool DeckLinkOutNode::open_device() {
|
||||
frame->Release();
|
||||
}
|
||||
|
||||
stream_frame_ = preroll_frames_;
|
||||
if (output_->StartScheduledPlayback(0, time_scale_, 1.0) != S_OK) {
|
||||
spdlog::error("DeckLink-out: failed to start scheduled playback");
|
||||
return false;
|
||||
@@ -267,9 +268,10 @@ void DeckLinkOutNode::schedule_frame(void* mxl_payload, long width, long height,
|
||||
buf->Release();
|
||||
}
|
||||
|
||||
auto stream_time = grains_read_ * frame_duration_;
|
||||
auto stream_time = stream_frame_ * frame_duration_;
|
||||
output_->ScheduleVideoFrame(frame, stream_time, frame_duration_, time_scale_);
|
||||
frame->Release();
|
||||
stream_frame_++;
|
||||
}
|
||||
|
||||
void DeckLinkOutNode::process() {
|
||||
|
||||
@@ -62,6 +62,7 @@ private:
|
||||
|
||||
std::atomic<bool> playing_{false};
|
||||
int create_fail_count_ = 0;
|
||||
uint64_t stream_frame_ = 0;
|
||||
bool is_interlaced_ = false;
|
||||
long out_width_ = 1920;
|
||||
long out_height_ = 1080;
|
||||
|
||||
Reference in New Issue
Block a user