OLD | NEW |
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 #include <utility> |
16 #include <vector> | 17 #include <vector> |
17 | 18 |
| 19 #include "webrtc/base/platform_file.h" |
18 #include "webrtc/common_types.h" | 20 #include "webrtc/common_types.h" |
19 #include "webrtc/common_video/include/frame_callback.h" | 21 #include "webrtc/common_video/include/frame_callback.h" |
20 #include "webrtc/config.h" | 22 #include "webrtc/config.h" |
21 #include "webrtc/media/base/videosinkinterface.h" | 23 #include "webrtc/media/base/videosinkinterface.h" |
22 #include "webrtc/transport.h" | 24 #include "webrtc/transport.h" |
23 | 25 |
24 namespace webrtc { | 26 namespace webrtc { |
25 | 27 |
26 class LoadObserver; | 28 class LoadObserver; |
27 class VideoEncoder; | 29 class VideoEncoder; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // VideoSendStream is valid. | 199 // VideoSendStream is valid. |
198 virtual VideoCaptureInput* Input() = 0; | 200 virtual VideoCaptureInput* Input() = 0; |
199 | 201 |
200 // Set which streams to send. Must have at least as many SSRCs as configured | 202 // Set which streams to send. Must have at least as many SSRCs as configured |
201 // in the config. Encoder settings are passed on to the encoder instance along | 203 // in the config. Encoder settings are passed on to the encoder instance along |
202 // with the VideoStream settings. | 204 // with the VideoStream settings. |
203 virtual void ReconfigureVideoEncoder(VideoEncoderConfig config) = 0; | 205 virtual void ReconfigureVideoEncoder(VideoEncoderConfig config) = 0; |
204 | 206 |
205 virtual Stats GetStats() = 0; | 207 virtual Stats GetStats() = 0; |
206 | 208 |
| 209 // Takes ownership of each file, is responsible for closing them later. |
| 210 // Calling this method will close and finalize any current logs. |
| 211 // Some codecs produce multiple streams (VP8 only at present), each of these |
| 212 // streams will log to a separate file. kMaxSimulcastStreams in common_types.h |
| 213 // gives the max number of such streams. If there is no file for a stream, or |
| 214 // the file is rtc::kInvalidPlatformFileValue, frames from that stream will |
| 215 // not be logged. |
| 216 // If a frame to be written would make the log too large the write fails and |
| 217 // the log is closed and finalized. A |byte_limit| of 0 means no limit. |
| 218 virtual void EnableEncodedFrameRecording( |
| 219 const std::vector<rtc::PlatformFile>& files, |
| 220 size_t byte_limit) = 0; |
| 221 inline void DisableEncodedFrameRecording() { |
| 222 EnableEncodedFrameRecording(std::vector<rtc::PlatformFile>(), 0); |
| 223 } |
| 224 |
207 protected: | 225 protected: |
208 virtual ~VideoSendStream() {} | 226 virtual ~VideoSendStream() {} |
209 }; | 227 }; |
210 | 228 |
211 } // namespace webrtc | 229 } // namespace webrtc |
212 | 230 |
213 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ | 231 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ |
OLD | NEW |