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 | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 17 | #include "webrtc/video_engine/new_include/video_receive_stream.h" |
pbos@webrtc.org | 281cff8 | 2013-05-17 13:44:48 +0000 | [diff] [blame] | 18 | #include "webrtc/video_engine/new_include/video_send_stream.h" |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | |
| 22 | class VideoEngine; |
| 23 | class ViEBase; |
| 24 | class ViECapture; |
| 25 | class ViECodec; |
| 26 | class ViEExternalCapture; |
| 27 | class ViENetwork; |
| 28 | class ViERTP_RTCP; |
| 29 | |
| 30 | namespace internal { |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame^] | 31 | |
| 32 | class ResolutionAdaptor; |
| 33 | |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 34 | class VideoSendStream : public newapi::VideoSendStream, |
| 35 | public newapi::VideoSendStreamInput, |
| 36 | public webrtc::Transport { |
| 37 | public: |
| 38 | VideoSendStream(newapi::Transport* transport, |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame^] | 39 | bool overuse_detection, |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 40 | webrtc::VideoEngine* video_engine, |
pbos@webrtc.org | 6f1c3ef | 2013-06-05 11:33:21 +0000 | [diff] [blame] | 41 | const newapi::VideoSendStream::Config& config); |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 42 | |
| 43 | virtual ~VideoSendStream(); |
| 44 | |
pbos@webrtc.org | 08f3ca9 | 2013-05-23 12:37:11 +0000 | [diff] [blame] | 45 | virtual void PutFrame(const I420VideoFrame& frame, |
| 46 | uint32_t time_since_capture_ms) OVERRIDE; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 47 | |
| 48 | virtual newapi::VideoSendStreamInput* Input() OVERRIDE; |
| 49 | |
| 50 | virtual void StartSend() OVERRIDE; |
| 51 | |
| 52 | virtual void StopSend() OVERRIDE; |
| 53 | |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 54 | virtual bool SetTargetBitrate(int min_bitrate, int max_bitrate, |
| 55 | const std::vector<SimulcastStream>& streams) |
| 56 | OVERRIDE; |
| 57 | |
| 58 | virtual void GetSendCodec(VideoCodec* send_codec) OVERRIDE; |
| 59 | |
| 60 | virtual int SendPacket(int /*channel*/, const void* packet, int length) |
| 61 | OVERRIDE; |
| 62 | |
| 63 | virtual int SendRTCPPacket(int /*channel*/, const void* packet, int length) |
| 64 | OVERRIDE; |
| 65 | |
| 66 | private: |
| 67 | newapi::Transport* transport_; |
pbos@webrtc.org | 6f1c3ef | 2013-06-05 11:33:21 +0000 | [diff] [blame] | 68 | newapi::VideoSendStream::Config config_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 69 | |
| 70 | ViEBase* video_engine_base_; |
| 71 | ViECapture* capture_; |
| 72 | ViECodec* codec_; |
| 73 | ViEExternalCapture* external_capture_; |
| 74 | ViENetwork* network_; |
| 75 | ViERTP_RTCP* rtp_rtcp_; |
| 76 | |
| 77 | int channel_; |
| 78 | int capture_id_; |
mflodman@webrtc.org | bf76ae2 | 2013-07-23 11:35:00 +0000 | [diff] [blame^] | 79 | scoped_ptr<ResolutionAdaptor> overuse_observer_; |
pbos@webrtc.org | 2a9108f | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 80 | }; |
| 81 | } // namespace internal |
| 82 | } // namespace webrtc |
| 83 | |
| 84 | #endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_SEND_STREAM_H_ |