void AsyncVideoCapture::waitFrame() { while (!gotFrame()) { frameSignal_.wait(); } }
VideoFrame *AsyncVideoCapture::next() { if (gotFrame()) { ++lastNum_; captureSignal_.set(); return &frame_[lastNum_ & 1]; } return 0; }
AudioCallDevice::AudioCallDevice (int32_t callIdx, CallManager *manager) : Idx_ { callIdx } , Manager_ { manager } , DataWriter_ { std::make_unique<CallDataWriter> (callIdx, manager) } { connect (Manager_, SIGNAL (gotFrame (int32_t, QByteArray)), this, SLOT (handleGotFrame (int32_t, QByteArray))); connect (DataWriter_.get (), SIGNAL (gotError (QString)), this, SLOT (handleWriteError (QString))); }