Request keyframes more frequently on stream start/decoding error.

In this CL:
 - Added FrameObject::is_keyframe() convinience function.
 - Moved logic to request keyframes on decoding error from VideoReceived to
   VideoReceiveStream.
 - Added keyframe_required as a parameter to FrameBuffer::NextFrame.

BUG=webrtc:8074

Review-Url: https://codereview.webrtc.org/2993793002
Cr-Commit-Position: refs/heads/master@{#19280}
This commit is contained in:
philipel
2017-08-09 03:33:59 -07:00
committed by Commit Bot
parent 445f1a1535
commit 26b4804358
7 changed files with 43 additions and 27 deletions

View File

@ -57,7 +57,8 @@ class FrameBuffer {
// kTimeout.
// - If the FrameBuffer is stopped then it will return kStopped.
ReturnReason NextFrame(int64_t max_wait_time_ms,
std::unique_ptr<FrameObject>* frame_out);
std::unique_ptr<FrameObject>* frame_out,
bool keyframe_required = false);
// Tells the FrameBuffer which protection mode that is in use. Affects
// the frame timing.