| 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 | 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 |  | 
| 36 // Class to deliver captured frame to the video send stream. | 29 // Class to deliver captured frame to the video send stream. | 
| 37 class VideoCaptureInput { | 30 class VideoCaptureInput { | 
| 38  public: | 31  public: | 
| 39   // These methods do not lock internally and must be called sequentially. | 32   // These methods do not lock internally and must be called sequentially. | 
| 40   // If your application switches input sources synchronization must be done | 33   // If your application switches input sources synchronization must be done | 
| 41   // 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. | 
| 42   virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; | 35   virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; | 
| 43 | 36 | 
| 44  protected: | 37  protected: | 
| 45   virtual ~VideoCaptureInput() {} | 38   virtual ~VideoCaptureInput() {} | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 152     int render_delay_ms = 0; | 145     int render_delay_ms = 0; | 
| 153 | 146 | 
| 154     // Target delay in milliseconds. A positive value indicates this stream is | 147     // Target delay in milliseconds. A positive value indicates this stream is | 
| 155     // used for streaming instead of a real-time call. | 148     // used for streaming instead of a real-time call. | 
| 156     int target_delay_ms = 0; | 149     int target_delay_ms = 0; | 
| 157 | 150 | 
| 158     // True if the stream should be suspended when the available bitrate fall | 151     // True if the stream should be suspended when the available bitrate fall | 
| 159     // below the minimum configured bitrate. If this variable is false, the | 152     // below the minimum configured bitrate. If this variable is false, the | 
| 160     // stream may send at a rate higher than the estimated available bitrate. | 153     // stream may send at a rate higher than the estimated available bitrate. | 
| 161     bool suspend_below_min_bitrate = false; | 154     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; |  | 
| 167   }; | 155   }; | 
| 168 | 156 | 
| 169   // Gets interface used to insert captured frames. Valid as long as the | 157   // Gets interface used to insert captured frames. Valid as long as the | 
| 170   // VideoSendStream is valid. | 158   // VideoSendStream is valid. | 
| 171   virtual VideoCaptureInput* Input() = 0; | 159   virtual VideoCaptureInput* Input() = 0; | 
| 172 | 160 | 
| 173   // Set which streams to send. Must have at least as many SSRCs as configured | 161   // Set which streams to send. Must have at least as many SSRCs as configured | 
| 174   // 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 | 
| 175   // with the VideoStream settings. | 163   // with the VideoStream settings. | 
| 176   virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; | 164   virtual bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) = 0; | 
| 177 | 165 | 
| 178   virtual Stats GetStats() = 0; | 166   virtual Stats GetStats() = 0; | 
| 179 }; | 167 }; | 
| 180 | 168 | 
| 181 }  // namespace webrtc | 169 }  // namespace webrtc | 
| 182 | 170 | 
| 183 #endif  // WEBRTC_VIDEO_SEND_STREAM_H_ | 171 #endif  // WEBRTC_VIDEO_SEND_STREAM_H_ | 
| OLD | NEW | 
|---|