src/DecoderFFmpeg.cpp
//	Record buffer state either FULL or EMPTY. It would be considered by ViveMediaDecoder.cs for buffering judgement.

Record buffer state either FULL or EMPTY. It would be considered by ViveMediaDecoder.cs for buffering judgement.
Record buffer state either FULL or EMPTY . It would be considered by ViveMediaDecoder . cs for buffering judgement .
void DecoderFFmpeg::updateBufferState() {
	if (mVideoInfo.isEnabled) {
		if (mVideoFrames.size() >= mVideoBuffMax) {
			mVideoInfo.bufferState = BufferState::FULL;
		} else if(mVideoFrames.size() == 0) {
			mVideoInfo.bufferState = BufferState::EMPTY;
		} else {
			mVideoInfo.bufferState = BufferState::NORMAL;
		}
	}
	if (mAudioInfo.isEnabled) {
		if (mAudioFrames.size() >= mAudioBuffMax) {
			mAudioInfo.bufferState = BufferState::FULL;
		} else if (mAudioFrames.size() == 0) {
			mAudioInfo.bufferState = BufferState::EMPTY;
		} else {
			mAudioInfo.bufferState = BufferState::NORMAL;
		}
	}
}
void DecoderFFmpeg :: updateBufferState ( ) { if ( mVideoInfo . isEnabled ) { if ( mVideoFrames . size ( ) >= mVideoBuffMax ) { mVideoInfo . bufferState = BufferState :: FULL ; } else if ( mVideoFrames . size ( ) == 0 ) { mVideoInfo . bufferState = BufferState :: EMPTY ; } else { mVideoInfo . bufferState = BufferState :: NORMAL ; } } if ( mAudioInfo . isEnabled ) { if ( mAudioFrames . size ( ) >= mAudioBuffMax ) { mAudioInfo . bufferState = BufferState :: FULL ; } else if ( mAudioFrames . size ( ) == 0 ) { mAudioInfo . bufferState = BufferState :: EMPTY ; } else { mAudioInfo . bufferState = BufferState :: NORMAL ; } } }
Record buffer state either FULL or EMPTY.
Record buffer state either FULL or EMPTY .