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

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
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..da8aabe5ce9252b0062c5c4bd03082c5b6c18c38 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
+ // changes), true otherwise. |frame| may be set to nullptr if the capture
+ // 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;
};
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698