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

Side by Side Diff: remoting/protocol/webrtc_frame_scheduler.h

Issue 2425873002: Add network parameters fields in FrameStatsMessage (Closed)
Patch Set: . Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_
6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "remoting/codec/webrtc_video_encoder.h" 10 #include "remoting/codec/webrtc_video_encoder.h"
11 #include "third_party/webrtc/video_encoder.h" 11 #include "third_party/webrtc/video_encoder.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 namespace protocol { 14 namespace protocol {
15 15
16 struct HostFrameStats;
16 class VideoChannelStateObserver; 17 class VideoChannelStateObserver;
17 class WebrtcDummyVideoEncoderFactory; 18 class WebrtcDummyVideoEncoderFactory;
18 19
19 // An abstract interface for frame schedulers, which are responsible for 20 // An abstract interface for frame schedulers, which are responsible for
20 // scheduling when video frames are captured and for defining encoding 21 // scheduling when video frames are captured and for defining encoding
21 // parameters for each frame. 22 // parameters for each frame.
22 class WebrtcFrameScheduler { 23 class WebrtcFrameScheduler {
23 public: 24 public:
24 WebrtcFrameScheduler() {} 25 WebrtcFrameScheduler() {}
25 virtual ~WebrtcFrameScheduler() {} 26 virtual ~WebrtcFrameScheduler() {}
26 27
27 // Starts the scheduler. |capture_callback| will be called whenever a new 28 // Starts the scheduler. |capture_callback| will be called whenever a new
28 // frame should be captured. 29 // frame should be captured.
29 virtual void Start(WebrtcDummyVideoEncoderFactory* video_encoder_factory, 30 virtual void Start(WebrtcDummyVideoEncoderFactory* video_encoder_factory,
30 const base::Closure& capture_callback) = 0; 31 const base::Closure& capture_callback) = 0;
31 32
32 // Pause and resumes the scheduler. 33 // Pause and resumes the scheduler.
33 virtual void Pause(bool pause) = 0; 34 virtual void Pause(bool pause) = 0;
34 35
35 // Called after |frame| has been captured to get encoding parameters for the 36 // Called after |frame| has been captured to get encoding parameters for the
36 // frame. Returns false if the frame should be dropped (e.g. when there are 37 // frame. Returns false if the frame should be dropped (e.g. when there are
37 // no changed), true otherwise. 38 // no changed), true otherwise.
38 virtual bool GetEncoderFrameParams( 39 virtual bool GetEncoderFrameParams(
39 const webrtc::DesktopFrame& frame, 40 const webrtc::DesktopFrame& frame,
40 WebrtcVideoEncoder::FrameParams* params_out) = 0; 41 WebrtcVideoEncoder::FrameParams* params_out) = 0;
41 42
42 // Called after a frame has been encoded and passed to the sender. 43 // Called after a frame has been encoded and passed to the sender. If
44 // |frame_stats| is not null then sets send_pending_delay, rtt_estimate and
45 // bandwidth_estimate_kbps fields.
43 virtual void OnFrameEncoded( 46 virtual void OnFrameEncoded(
44 const WebrtcVideoEncoder::EncodedFrame& encoded_frame, 47 const WebrtcVideoEncoder::EncodedFrame& encoded_frame,
45 const webrtc::EncodedImageCallback::Result& send_result) = 0; 48 const webrtc::EncodedImageCallback::Result& send_result,
49 HostFrameStats* frame_stats) = 0;
46 }; 50 };
47 51
48 } // namespace protocol 52 } // namespace protocol
49 } // namespace remoting 53 } // namespace remoting
50 54
51 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_ 55 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698