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

Side by Side Diff: webrtc/video_send_stream.h

Issue 1374233002: Collecting encode_time_ms for each frame (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing comments Created 5 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 | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_VIDEO_SEND_STREAM_H_ 11 #ifndef WEBRTC_VIDEO_SEND_STREAM_H_
12 #define WEBRTC_VIDEO_SEND_STREAM_H_ 12 #define WEBRTC_VIDEO_SEND_STREAM_H_
13 13
14 #include <map> 14 #include <map>
15 #include <string> 15 #include <string>
16 16
17 #include "webrtc/common_types.h" 17 #include "webrtc/common_types.h"
18 #include "webrtc/config.h" 18 #include "webrtc/config.h"
19 #include "webrtc/frame_callback.h" 19 #include "webrtc/frame_callback.h"
20 #include "webrtc/stream.h" 20 #include "webrtc/stream.h"
21 #include "webrtc/transport.h" 21 #include "webrtc/transport.h"
22 #include "webrtc/video_renderer.h" 22 #include "webrtc/video_renderer.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 class LoadObserver; 26 class LoadObserver;
27 class VideoEncoder; 27 class VideoEncoder;
28 28
29 class EncodingTimeObserver {
30 public:
31 virtual ~EncodingTimeObserver() {}
32
33 virtual void OnReportEncodedTime(int64_t ntp_time_ms, int encode_time_ms) = 0;
34 };
35
29 // Class to deliver captured frame to the video send stream. 36 // Class to deliver captured frame to the video send stream.
30 class VideoCaptureInput { 37 class VideoCaptureInput {
31 public: 38 public:
32 // These methods do not lock internally and must be called sequentially. 39 // These methods do not lock internally and must be called sequentially.
33 // If your application switches input sources synchronization must be done 40 // If your application switches input sources synchronization must be done
34 // externally to make sure that any old frames are not delivered concurrently. 41 // externally to make sure that any old frames are not delivered concurrently.
35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; 42 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0;
36 43
37 protected: 44 protected:
38 virtual ~VideoCaptureInput() {} 45 virtual ~VideoCaptureInput() {}
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 int render_delay_ms = 0; 152 int render_delay_ms = 0;
146 153
147 // Target delay in milliseconds. A positive value indicates this stream is 154 // Target delay in milliseconds. A positive value indicates this stream is
148 // used for streaming instead of a real-time call. 155 // used for streaming instead of a real-time call.
149 int target_delay_ms = 0; 156 int target_delay_ms = 0;
150 157
151 // True if the stream should be suspended when the available bitrate fall 158 // True if the stream should be suspended when the available bitrate fall
152 // below the minimum configured bitrate. If this variable is false, the 159 // below the minimum configured bitrate. If this variable is false, the
153 // stream may send at a rate higher than the estimated available bitrate. 160 // stream may send at a rate higher than the estimated available bitrate.
154 bool suspend_below_min_bitrate = false; 161 bool suspend_below_min_bitrate = false;
162
163 // Called for each encoded frame. Passes the total time spent on encoding.
164 // TODO(ivica): Consolidate with post_encode_callback:
165 // https://code.google.com/p/webrtc/issues/detail?id=5042
166 EncodingTimeObserver* encoding_time_observer = nullptr;
155 }; 167 };
156 168
157 // Gets interface used to insert captured frames. Valid as long as the 169 // Gets interface used to insert captured frames. Valid as long as the
158 // VideoSendStream is valid. 170 // VideoSendStream is valid.
159 virtual VideoCaptureInput* Input() = 0; 171 virtual VideoCaptureInput* Input() = 0;
160 172
161 // Set which streams to send. Must have at least as many SSRCs as configured 173 // Set which streams to send. Must have at least as many SSRCs as configured
162 // in the config. Encoder settings are passed on to the encoder instance along 174 // in the config. Encoder settings are passed on to the encoder instance along
163 // with the VideoStream settings. 175 // with the VideoStream settings.
164 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; 176 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0;
165 177
166 virtual Stats GetStats() = 0; 178 virtual Stats GetStats() = 0;
167 }; 179 };
168 180
169 } // namespace webrtc 181 } // namespace webrtc
170 182
171 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 183 #endif // WEBRTC_VIDEO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698