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

Unified Diff: webrtc/video_send_stream.h

Issue 1569853002: Measure encoding time on encode callbacks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: updated comment Created 4 years, 10 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 | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_send_stream.h
diff --git a/webrtc/video_send_stream.h b/webrtc/video_send_stream.h
index 83a96d3fed02d496358ad0a9df8bcfa22d2b4242..63acb0944b808c3ef788b2e6d3063d53bac299a8 100644
--- a/webrtc/video_send_stream.h
+++ b/webrtc/video_send_stream.h
@@ -26,13 +26,6 @@ namespace webrtc {
class LoadObserver;
class VideoEncoder;
-class EncodingTimeObserver {
- public:
- virtual ~EncodingTimeObserver() {}
-
- virtual void OnReportEncodedTime(int64_t ntp_time_ms, int encode_time_ms) = 0;
-};
-
// Class to deliver captured frame to the video send stream.
class VideoCaptureInput {
public:
@@ -91,6 +84,11 @@ class VideoSendStream : public SendStream {
// sources anymore.
bool internal_source = false;
+ // Allow 100% encoder utilization. Used for HW encoders where CPU isn't
+ // expected to be the limiting factor, but a chip could be running at
+ // 30fps (for example) exactly.
+ bool full_overuse_time = false;
+
// Uninitialized VideoEncoder instance to be used for encoding. Will be
// initialized from inside the VideoSendStream.
VideoEncoder* encoder = nullptr;
@@ -144,7 +142,9 @@ class VideoSendStream : public SendStream {
I420FrameCallback* pre_encode_callback = nullptr;
// Called for each encoded frame, e.g. used for file storage. 'nullptr'
- // disables the callback.
+ // disables the callback. Also measures timing and passes the time
+ // spent on encoding. This timing will not fire if encoding takes longer
+ // than the measuring window, since the sample data will have been dropped.
EncodedFrameObserver* post_encode_callback = nullptr;
// Renderer for local preview. The local renderer will be called even if
@@ -164,11 +164,6 @@ class VideoSendStream : public SendStream {
// below the minimum configured bitrate. If this variable is false, the
// stream may send at a rate higher than the estimated available bitrate.
bool suspend_below_min_bitrate = false;
-
- // Called for each encoded frame. Passes the total time spent on encoding.
- // TODO(ivica): Consolidate with post_encode_callback:
- // https://code.google.com/p/webrtc/issues/detail?id=5042
- EncodingTimeObserver* encoding_time_observer = nullptr;
};
// Gets interface used to insert captured frames. Valid as long as the
« no previous file with comments | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698