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

Side by Side Diff: webrtc/video_send_stream.h

Issue 1924793002: Remove webrtc/stream.h and unutilized inheritance. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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/common_video/include/frame_callback.h" 18 #include "webrtc/common_video/include/frame_callback.h"
19 #include "webrtc/config.h" 19 #include "webrtc/config.h"
20 #include "webrtc/media/base/videosinkinterface.h" 20 #include "webrtc/media/base/videosinkinterface.h"
21 #include "webrtc/stream.h"
22 #include "webrtc/transport.h" 21 #include "webrtc/transport.h"
23 #include "webrtc/media/base/videosinkinterface.h" 22 #include "webrtc/media/base/videosinkinterface.h"
24 23
25 namespace webrtc { 24 namespace webrtc {
26 25
27 class LoadObserver; 26 class LoadObserver;
28 class VideoEncoder; 27 class VideoEncoder;
29 28
30 // Class to deliver captured frame to the video send stream. 29 // Class to deliver captured frame to the video send stream.
31 class VideoCaptureInput { 30 class VideoCaptureInput {
32 public: 31 public:
33 // These methods do not lock internally and must be called sequentially. 32 // These methods do not lock internally and must be called sequentially.
34 // If your application switches input sources synchronization must be done 33 // If your application switches input sources synchronization must be done
35 // 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.
36 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; 35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0;
37 36
38 protected: 37 protected:
39 virtual ~VideoCaptureInput() {} 38 virtual ~VideoCaptureInput() {}
40 }; 39 };
41 40
42 class VideoSendStream : public SendStream { 41 class VideoSendStream {
43 public: 42 public:
44 struct StreamStats { 43 struct StreamStats {
45 FrameCounts frame_counts; 44 FrameCounts frame_counts;
46 int width = 0; 45 int width = 0;
47 int height = 0; 46 int height = 0;
48 // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer. 47 // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer.
49 int total_bitrate_bps = 0; 48 int total_bitrate_bps = 0;
50 int retransmit_bitrate_bps = 0; 49 int retransmit_bitrate_bps = 0;
51 int avg_delay_ms = 0; 50 int avg_delay_ms = 0;
52 int max_delay_ms = 0; 51 int max_delay_ms = 0;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Target delay in milliseconds. A positive value indicates this stream is 159 // Target delay in milliseconds. A positive value indicates this stream is
161 // used for streaming instead of a real-time call. 160 // used for streaming instead of a real-time call.
162 int target_delay_ms = 0; 161 int target_delay_ms = 0;
163 162
164 // True if the stream should be suspended when the available bitrate fall 163 // True if the stream should be suspended when the available bitrate fall
165 // below the minimum configured bitrate. If this variable is false, the 164 // below the minimum configured bitrate. If this variable is false, the
166 // stream may send at a rate higher than the estimated available bitrate. 165 // stream may send at a rate higher than the estimated available bitrate.
167 bool suspend_below_min_bitrate = false; 166 bool suspend_below_min_bitrate = false;
168 }; 167 };
169 168
169 // Starts stream activity.
170 // When a stream is active, it can receive, process and deliver packets.
171 virtual void Start() = 0;
172 // Stops stream activity.
173 // When a stream is stopped, it can't receive, process or deliver packets.
174 virtual void Stop() = 0;
175 // Deliver an incoming RTCP packet.
176 virtual bool DeliverRtcp(const uint8_t* packet, size_t length) = 0;
The Sun (google.com) 2016/04/27 19:39:46 No need to have this in client interface, like fo
177
170 // Gets interface used to insert captured frames. Valid as long as the 178 // Gets interface used to insert captured frames. Valid as long as the
171 // VideoSendStream is valid. 179 // VideoSendStream is valid.
172 virtual VideoCaptureInput* Input() = 0; 180 virtual VideoCaptureInput* Input() = 0;
173 181
174 // Set which streams to send. Must have at least as many SSRCs as configured 182 // Set which streams to send. Must have at least as many SSRCs as configured
175 // in the config. Encoder settings are passed on to the encoder instance along 183 // in the config. Encoder settings are passed on to the encoder instance along
176 // with the VideoStream settings. 184 // with the VideoStream settings.
177 virtual void ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; 185 virtual void ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0;
178 186
179 virtual Stats GetStats() = 0; 187 virtual Stats GetStats() = 0;
188
189 protected:
190 virtual ~VideoSendStream() {}
180 }; 191 };
181 192
182 } // namespace webrtc 193 } // namespace webrtc
183 194
184 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 195 #endif // WEBRTC_VIDEO_SEND_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698