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

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: 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 int payload_type = -1; 112 int payload_type = -1;
112 } rtx; 113 } rtx;
113 114
114 // RTCP CNAME, see RFC 3550. 115 // RTCP CNAME, see RFC 3550.
115 std::string c_name; 116 std::string c_name;
116 } rtp; 117 } rtp;
117 118
118 // Transport for outgoing packets. 119 // Transport for outgoing packets.
119 newapi::Transport* send_transport = nullptr; 120 newapi::Transport* send_transport = nullptr;
120 121
122 // Callback for overuse and normal usage based on the jitter of incoming
123 // captured frames. 'nullptr' disables the callback.
124 LoadObserver* overuse_callback = nullptr;
125
121 // Called for each I420 frame before encoding the frame. Can be used for 126 // Called for each I420 frame before encoding the frame. Can be used for
122 // effects, snapshots etc. 'nullptr' disables the callback. 127 // effects, snapshots etc. 'nullptr' disables the callback.
123 I420FrameCallback* pre_encode_callback = nullptr; 128 I420FrameCallback* pre_encode_callback = nullptr;
124 129
125 // Called for each encoded frame, e.g. used for file storage. 'nullptr' 130 // Called for each encoded frame, e.g. used for file storage. 'nullptr'
126 // disables the callback. 131 // disables the callback.
127 EncodedFrameObserver* post_encode_callback = nullptr; 132 EncodedFrameObserver* post_encode_callback = nullptr;
128 133
129 // Renderer for local preview. The local renderer will be called even if 134 // Renderer for local preview. The local renderer will be called even if
130 // sending hasn't started. 'nullptr' disables local rendering. 135 // sending hasn't started. 'nullptr' disables local rendering.
(...skipping 22 matching lines...) Expand all
153 // in the config. Encoder settings are passed on to the encoder instance along 158 // in the config. Encoder settings are passed on to the encoder instance along
154 // with the VideoStream settings. 159 // with the VideoStream settings.
155 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; 160 virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0;
156 161
157 virtual Stats GetStats() = 0; 162 virtual Stats GetStats() = 0;
158 }; 163 };
159 164
160 } // namespace webrtc 165 } // namespace webrtc
161 166
162 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 167 #endif // WEBRTC_VIDEO_SEND_STREAM_H_
OLDNEW
« webrtc/video/video_send_stream.cc ('K') | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698