Skip to content

Commit bf9f98c

Browse files
committed
Fix false positive no frames detection for Qt6VideoSink.
1 parent 61dd75d commit bf9f98c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

SerialPrograms/Source/CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ CameraVideoSource::CameraVideoSource(
162162
WallClock now = current_time();
163163
{
164164
WriteSpinLock lg(m_frame_lock);
165+
// cout << now << endl;
165166
m_last_frame = frame;
166167
m_last_frame_timestamp = now;
167168
uint64_t seqnum = m_last_frame_seqnum.load(std::memory_order_relaxed);

SerialPrograms/Source/CommonFramework/VideoPipeline/VideoSession.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,16 @@ double VideoSession::fps_display() const{
210210
}
211211
void VideoSession::on_frame(std::shared_ptr<const VideoFrame> frame){
212212
m_frame_listeners.run_method_unique(&VideoFrameListener::on_frame, frame);
213-
WriteSpinLock lg(m_fps_lock);
214-
m_fps_tracker_source.push_event(frame->timestamp);
215-
}
216-
void VideoSession::on_rendered_frame(WallClock timestamp){
217213
{
218214
WriteSpinLock lg(m_fps_lock);
219-
m_fps_tracker_rendered.push_event(timestamp);
215+
m_fps_tracker_source.push_event(frame->timestamp);
220216
}
221217
global_watchdog().delay(*this);
222218
}
219+
void VideoSession::on_rendered_frame(WallClock timestamp){
220+
WriteSpinLock lg(m_fps_lock);
221+
m_fps_tracker_rendered.push_event(timestamp);
222+
}
223223

224224

225225
void VideoSession::on_watchdog_timeout(){

0 commit comments

Comments
 (0)