bool BaseInFileStream::SignalSeek(double &absoluteTimestamp) { //1. Seek to the correct point if (!InternalSeek(absoluteTimestamp)) { FATAL("Unable to seek to %.02f", absoluteTimestamp); return false; } //2. If the stream is active, re-initiate the feed reaction if (!_paused) ReadyForSend(); //3. Done return true; }
bool BaseInFileStream::SignalResume() { //1. Is this already active if (!_paused) return true; //2. Put the stream in active mode _paused = false; //3. Start the feed reaction ReadyForSend(); //5. Done return true; }
bool BaseInFileStream::SignalResume() { //1. Is this already active if (_streamingState == FILE_STREAMING_STATE_PLAYING) return true; //2. Put the stream in active mode _streamingState = FILE_STREAMING_STATE_PLAYING; //3. Start the feed reaction ReadyForSend(); //5. Done return true; }
bool BaseInFileStream::SignalSeek(double &absoluteTimestamp) { //1. Seek to the correct point if (!InternalSeek(absoluteTimestamp)) { FATAL("Unable to seek to %.02f", absoluteTimestamp); return false; } //2. If the stream is active, re-initiate the feed reaction if (_streamingState == FILE_STREAMING_STATE_FINISHED) { _streamingState = FILE_STREAMING_STATE_PLAYING; ReadyForSend(); } //3. Done return true; }
bool BaseInFileStream::SignalPlay(double &absoluteTimestamp, double &length) { //0. fix absoluteTimestamp and length absoluteTimestamp = absoluteTimestamp < 0 ? 0 : absoluteTimestamp; //TODO: implement the limit playback //1. Seek to the correct point if (!InternalSeek(absoluteTimestamp)) { FATAL("Unable to seek to %.02f", absoluteTimestamp); return false; } //2. Put the stream in active mode _paused = false; //3. Start the feed reaction ReadyForSend(); //4. Done return true; }
bool BaseInFileStream::SignalPlay(double &absoluteTimestamp, double &length) { INFO("signal play"); //0. fix absoluteTimestamp and length absoluteTimestamp = absoluteTimestamp < 0 ? 0 : absoluteTimestamp; _playLimit = length; FINEST("absoluteTimestamp: %.2f; _playLimit: %.2f", absoluteTimestamp, _playLimit); //TODO: implement the limit playback //1. Seek to the correct point if (!InternalSeek(absoluteTimestamp)) { FATAL("Unable to seek to %.02f", absoluteTimestamp); return false; } //2. Put the stream in active mode _streamingState = FILE_STREAMING_STATE_PLAYING; //3. Start the feed reaction ReadyForSend(); //4. Done return true; }