Implement checking if frames are in use.

This commit is contained in:
Bartosz Taudul 2022-09-05 20:12:12 +02:00
parent 53632ccb5b
commit 23ebce2862
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 7 additions and 0 deletions

View File

@ -2397,6 +2397,12 @@ size_t Worker::GetFullFrameCount( const FrameData& fd ) const
} }
} }
bool Worker::AreFramesUsed() const
{
if( m_data.frames.Data().size() > 1 ) return true;
return m_data.framesBase->frames.size() > 2;
}
int64_t Worker::GetFrameTime( const FrameData& fd, size_t idx ) const int64_t Worker::GetFrameTime( const FrameData& fd, size_t idx ) const
{ {
if( fd.continuous ) if( fd.continuous )

View File

@ -463,6 +463,7 @@ public:
std::mutex& GetDataLock() { return m_data.lock; } std::mutex& GetDataLock() { return m_data.lock; }
size_t GetFrameCount( const FrameData& fd ) const { return fd.frames.size(); } size_t GetFrameCount( const FrameData& fd ) const { return fd.frames.size(); }
size_t GetFullFrameCount( const FrameData& fd ) const; size_t GetFullFrameCount( const FrameData& fd ) const;
bool AreFramesUsed() const;
int64_t GetLastTime() const { return m_data.lastTime; } int64_t GetLastTime() const { return m_data.lastTime; }
uint64_t GetZoneCount() const { return m_data.zonesCnt; } uint64_t GetZoneCount() const { return m_data.zonesCnt; }
uint64_t GetZoneExtraCount() const { return m_data.zoneExtra.size() - 1; } uint64_t GetZoneExtraCount() const { return m_data.zoneExtra.size() - 1; }