Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: remoting/protocol/webrtc_frame_scheduler.h

Issue 2616213002: Fix WebrtcVideoStream to handle failed capture requests. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/webrtc_frame_scheduler.h
diff --git a/remoting/protocol/webrtc_frame_scheduler.h b/remoting/protocol/webrtc_frame_scheduler.h
index c69b113be1d5b5c430f81a1ec9f8efbb7ca63279..6a148b8df76a68dd7fc3f13c4b0ff88667fe6b71 100644
--- a/remoting/protocol/webrtc_frame_scheduler.h
+++ b/remoting/protocol/webrtc_frame_scheduler.h
@@ -8,7 +8,6 @@
#include "base/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "remoting/codec/webrtc_video_encoder.h"
-#include "third_party/webrtc/video_encoder.h"
namespace remoting {
namespace protocol {
@@ -33,18 +32,17 @@ class WebrtcFrameScheduler {
virtual void Pause(bool pause) = 0;
// Called after |frame| has been captured to get encoding parameters for the
- // frame. Returns false if the frame should be dropped (e.g. when there are
- // no changed), true otherwise.
- virtual bool GetEncoderFrameParams(
- const webrtc::DesktopFrame& frame,
- WebrtcVideoEncoder::FrameParams* params_out) = 0;
-
- // Called after a frame has been encoded and passed to the sender. If
- // |frame_stats| is not null then sets send_pending_delay, rtt_estimate and
- // bandwidth_estimate_kbps fields.
+ // frame. Returns false if the frame should be dropped (e.g. when there are no
+ // changed), true otherwise. |frame| may be set to nullptr if the capture
joedow 2017/01/09 20:00:28 s/changed/changes
Sergey Ulanov 2017/01/09 22:24:06 Done.
+ // request failed.
+ virtual bool OnFrameCaptured(const webrtc::DesktopFrame* frame,
+ WebrtcVideoEncoder::FrameParams* params_out) = 0;
+
+ // Called after a frame has been encoded and passed to the sender.
+ // |encoded_frame| may be nullptr. If |frame_stats| is not null then sets
+ // send_pending_delay, rtt_estimate and bandwidth_estimate_kbps fields.
virtual void OnFrameEncoded(
- const WebrtcVideoEncoder::EncodedFrame& encoded_frame,
- const webrtc::EncodedImageCallback::Result& send_result,
+ const WebrtcVideoEncoder::EncodedFrame* encoded_frame,
HostFrameStats* frame_stats) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698