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

Side by Side Diff: webrtc/video_send_stream.h

Issue 1325263002: Make LoadObserver settable per video send stream. Gives client flexibility and makes the implementa… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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 VideoEncoder; 27 class VideoEncoder;
27 28
28 // Class to deliver captured frame to the video send stream. 29 // Class to deliver captured frame to the video send stream.
29 class VideoCaptureInput { 30 class VideoCaptureInput {
30 public: 31 public:
31 // These methods do not lock internally and must be called sequentially. 32 // These methods do not lock internally and must be called sequentially.
32 // If your application switches input sources synchronization must be done 33 // If your application switches input sources synchronization must be done
33 // externally to make sure that any old frames are not delivered concurrently. 34 // externally to make sure that any old frames are not delivered concurrently.
34 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; 35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0;
35 36
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 int payload_type = -1; 116 int payload_type = -1;
116 } rtx; 117 } rtx;
117 118
118 // RTCP CNAME, see RFC 3550. 119 // RTCP CNAME, see RFC 3550.
119 std::string c_name; 120 std::string c_name;
120 } rtp; 121 } rtp;
121 122
122 // Transport for outgoing packets. 123 // Transport for outgoing packets.
123 newapi::Transport* send_transport = nullptr; 124 newapi::Transport* send_transport = nullptr;
124 125
126 // Callback for overuse and normal usage based on the jitter of incoming
127 // captured frames. 'nullptr' disables the callback.
128 LoadObserver* overuse_callback = nullptr;
129
125 // Called for each I420 frame before encoding the frame. Can be used for 130 // Called for each I420 frame before encoding the frame. Can be used for
126 // effects, snapshots etc. 'nullptr' disables the callback. 131 // effects, snapshots etc. 'nullptr' disables the callback.
127 I420FrameCallback* pre_encode_callback = nullptr; 132 I420FrameCallback* pre_encode_callback = nullptr;
128 133
129 // Called for each encoded frame, e.g. used for file storage. 'nullptr' 134 // Called for each encoded frame, e.g. used for file storage. 'nullptr'
130 // disables the callback. 135 // disables the callback.
131 EncodedFrameObserver* post_encode_callback = nullptr; 136 EncodedFrameObserver* post_encode_callback = nullptr;
132 137
133 // Renderer for local preview. The local renderer will be called even if 138 // Renderer for local preview. The local renderer will be called even if
134 // sending hasn't started. 'nullptr' disables local rendering. 139 // sending hasn't started. 'nullptr' disables local rendering.
(...skipping 22 matching lines...) Expand all
157 // in the config. Encoder settings are passed on to the encoder instance along 162 // in the config. Encoder settings are passed on to the encoder instance along
158 // with the VideoStream settings. 163 // with the VideoStream settings.
159 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; 164 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0;
160 165
161 virtual Stats GetStats() = 0; 166 virtual Stats GetStats() = 0;
162 }; 167 };
163 168
164 } // namespace webrtc 169 } // namespace webrtc
165 170
166 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 171 #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