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

Unified Diff: webrtc/video_send_stream.h

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Revert changes to OveruseFrameDetector. Fix merge mistake 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video_send_stream.h
diff --git a/webrtc/video_send_stream.h b/webrtc/video_send_stream.h
index c0bee4ed3c9d5cdabea5a28530a43df8d24818c0..91a7cfc6ca0ae5d4b1b1561e519e8efb303ec5f7 100644
--- a/webrtc/video_send_stream.h
+++ b/webrtc/video_send_stream.h
@@ -27,7 +27,6 @@
namespace webrtc {
-class LoadObserver;
class VideoEncoder;
class VideoSendStream {
@@ -67,6 +66,10 @@ class VideoSendStream {
int preferred_media_bitrate_bps = 0;
bool suspended = false;
bool bw_limited_resolution = false;
+ bool cpu_limited_resolution = false;
+ // Total number of times resolution as been requested to be changed due to
+ // CPU adaptation.
+ int number_of_cpu_adapt_changes = 0;
std::map<uint32_t, StreamStats> substreams;
};
@@ -151,10 +154,6 @@ class VideoSendStream {
// Transport for outgoing packets.
Transport* send_transport = nullptr;
- // Callback for overuse and normal usage based on the jitter of incoming
- // captured frames. 'nullptr' disables the callback.
- LoadObserver* overuse_callback = nullptr;
-
// Called for each I420 frame before encoding the frame. Can be used for
// effects, snapshots etc. 'nullptr' disables the callback.
rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback = nullptr;
@@ -192,8 +191,17 @@ class VideoSendStream {
// When a stream is stopped, it can't receive, process or deliver packets.
virtual void Stop() = 0;
+ // Based on the spec in
+ // https://w3c.github.io/webrtc-pc/#idl-def-rtcdegradationpreference.
+ enum class DegradationPreference {
+ kMaintainResolution,
+ // TODO(perkj): Implement kMaintainFrameRate. kBalanced will drop frames
+ // if the encoder overshootor or the encoder can not encode fast enough.
nisse-webrtc 2016/10/28 10:53:44 "s " missing in "overshoots or"
perkj_webrtc 2016/10/28 14:05:34 Done.
+ kBalanced,
+ };
virtual void SetSource(
- rtc::VideoSourceInterface<webrtc::VideoFrame>* source) = 0;
+ rtc::VideoSourceInterface<webrtc::VideoFrame>* source,
+ const DegradationPreference& degradation_preference) = 0;
// Set which streams to send. Must have at least as many SSRCs as configured
// in the config. Encoder settings are passed on to the encoder instance along
« webrtc/video/vie_encoder_unittest.cc ('K') | « webrtc/video/vie_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698