Implement FrameRecord and ProfilerData structures which use std::mutex for the frame vector and std::atomic for counters. GStreamer pad probes run on streaming threads.
Why
Without thread safety, concurrent probe callbacks corrupt the frame vector. std::atomic for counters avoids lock overhead on hot path.
Acceptance criteria
Resources
- std::atomic cppreference
- GST_BUFFER_FLAG_DELTA_UNIT
Implement FrameRecord and ProfilerData structures which use std::mutex for the frame vector and std::atomic for counters. GStreamer pad probes run on streaming threads.
Why
Without thread safety, concurrent probe callbacks corrupt the frame vector. std::atomic for counters avoids lock overhead on hot path.
Acceptance criteria
Resources