pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_VIDEO_ENGINE_VIDEO_SEND_STREAM_IMPL_H_ |
| 12 | #define WEBRTC_VIDEO_ENGINE_VIDEO_SEND_STREAM_IMPL_H_ |
| 13 | |
| 14 | #include <vector> |
| 15 | |
| 16 | #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
pbos@webrtc.org | 24e2089 | 2013-10-28 16:32:01 +0000 | [diff] [blame^] | 17 | #include "webrtc/video/transport_adapter.h" |
| 18 | #include "webrtc/video_receive_stream.h" |
| 19 | #include "webrtc/video_send_stream.h" |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 20 | |
| 21 | namespace webrtc { |
| 22 | |
| 23 | class VideoEngine; |
| 24 | class ViEBase; |
| 25 | class ViECapture; |
| 26 | class ViECodec; |
| 27 | class ViEExternalCapture; |
stefan@webrtc.org | 55afdbe | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 28 | class ViEExternalCodec; |
pbos@webrtc.org | 63301bd | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 29 | class ViEImageProcess; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 30 | class ViENetwork; |
| 31 | class ViERTP_RTCP; |
| 32 | |
| 33 | namespace internal { |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 34 | |
| 35 | class ResolutionAdaptor; |
| 36 | |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame] | 37 | class VideoSendStream : public webrtc::VideoSendStream, |
pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 38 | public VideoSendStreamInput { |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 39 | public: |
| 40 | VideoSendStream(newapi::Transport* transport, |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 41 | bool overuse_detection, |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 42 | webrtc::VideoEngine* video_engine, |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame] | 43 | const VideoSendStream::Config& config); |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 44 | |
| 45 | virtual ~VideoSendStream(); |
| 46 | |
pbos@webrtc.org | 08f3ca9 | 2013-05-23 12:37:11 +0000 | [diff] [blame] | 47 | virtual void PutFrame(const I420VideoFrame& frame, |
| 48 | uint32_t time_since_capture_ms) OVERRIDE; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 49 | |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame] | 50 | virtual VideoSendStreamInput* Input() OVERRIDE; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 51 | |
| 52 | virtual void StartSend() OVERRIDE; |
| 53 | |
| 54 | virtual void StopSend() OVERRIDE; |
| 55 | |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 56 | virtual bool SetTargetBitrate(int min_bitrate, int max_bitrate, |
| 57 | const std::vector<SimulcastStream>& streams) |
| 58 | OVERRIDE; |
| 59 | |
| 60 | virtual void GetSendCodec(VideoCodec* send_codec) OVERRIDE; |
| 61 | |
pbos@webrtc.org | ce85109 | 2013-08-05 12:01:36 +0000 | [diff] [blame] | 62 | public: |
| 63 | bool DeliverRtcp(const uint8_t* packet, size_t length); |
| 64 | |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 65 | private: |
pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 66 | TransportAdapter transport_adapter_; |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame] | 67 | VideoSendStream::Config config_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 68 | |
| 69 | ViEBase* video_engine_base_; |
| 70 | ViECapture* capture_; |
| 71 | ViECodec* codec_; |
| 72 | ViEExternalCapture* external_capture_; |
stefan@webrtc.org | 55afdbe | 2013-08-22 09:29:56 +0000 | [diff] [blame] | 73 | ViEExternalCodec* external_codec_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 74 | ViENetwork* network_; |
| 75 | ViERTP_RTCP* rtp_rtcp_; |
pbos@webrtc.org | 63301bd | 2013-10-21 10:34:43 +0000 | [diff] [blame] | 76 | ViEImageProcess* image_process_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 77 | |
| 78 | int channel_; |
| 79 | int capture_id_; |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame] | 80 | scoped_ptr<ResolutionAdaptor> overuse_observer_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 81 | }; |
| 82 | } // namespace internal |
| 83 | } // namespace webrtc |
| 84 | |
| 85 | #endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_SEND_STREAM_H_ |