Skip to content
Snippets Groups Projects

Implements #134 source groups

Merged Nicolas Pope requested to merge feature/134/usegroup into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -235,11 +235,16 @@ void Group::_addFrameset(int64_t timestamp) {
//if (count > 10 || count < 1) return;
if (count >= kFrameBufferSize-1) count = 1;
for (int i=0; i<count; ++i) {
int64_t lt = (framesets_[head_].timestamp == -1) ? timestamp-mspf_ : framesets_[head_].timestamp;
head_ = (head_+1) % kFrameBufferSize;
//UNIQUE_LOCK(framesets_[head_].mtx, lk);
if (!framesets_[head_].mtx.try_lock()) LOG(ERROR) << "Frameset in use!!";
if (!framesets_[head_].mtx.try_lock()) {
LOG(ERROR) << "Frameset in use!!";
break;
}
framesets_[head_].timestamp = lt+mspf_;
framesets_[head_].count = 0;
framesets_[head_].mask = 0;
Loading