blob: f5f05169e95a142e71c3922af5c8a0f8c44f68ae [file] [log] [blame]
pbos@webrtc.org29d58392013-05-16 12:08:03 +00001/*
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.org29d58392013-05-16 12:08:03 +000017#include "webrtc/video_engine/new_include/video_receive_stream.h"
pbos@webrtc.orgf5d4cb12013-05-17 13:44:48 +000018#include "webrtc/video_engine/new_include/video_send_stream.h"
pbos@webrtc.org29d58392013-05-16 12:08:03 +000019
20namespace webrtc {
21
22class VideoEngine;
23class ViEBase;
24class ViECapture;
25class ViECodec;
26class ViEExternalCapture;
27class ViENetwork;
28class ViERTP_RTCP;
29
30namespace internal {
31class VideoSendStream : public newapi::VideoSendStream,
32 public newapi::VideoSendStreamInput,
33 public webrtc::Transport {
34 public:
35 VideoSendStream(newapi::Transport* transport,
36 webrtc::VideoEngine* video_engine,
pbos@webrtc.org025f4f12013-06-05 11:33:21 +000037 const newapi::VideoSendStream::Config& config);
pbos@webrtc.org29d58392013-05-16 12:08:03 +000038
39 virtual ~VideoSendStream();
40
pbos@webrtc.org9b303482013-05-23 12:37:11 +000041 virtual void PutFrame(const I420VideoFrame& frame,
42 uint32_t time_since_capture_ms) OVERRIDE;
pbos@webrtc.org29d58392013-05-16 12:08:03 +000043
44 virtual newapi::VideoSendStreamInput* Input() OVERRIDE;
45
46 virtual void StartSend() OVERRIDE;
47
48 virtual void StopSend() OVERRIDE;
49
pbos@webrtc.org29d58392013-05-16 12:08:03 +000050 virtual bool SetTargetBitrate(int min_bitrate, int max_bitrate,
51 const std::vector<SimulcastStream>& streams)
52 OVERRIDE;
53
54 virtual void GetSendCodec(VideoCodec* send_codec) OVERRIDE;
55
56 virtual int SendPacket(int /*channel*/, const void* packet, int length)
57 OVERRIDE;
58
59 virtual int SendRTCPPacket(int /*channel*/, const void* packet, int length)
60 OVERRIDE;
61
62 private:
63 newapi::Transport* transport_;
pbos@webrtc.org025f4f12013-06-05 11:33:21 +000064 newapi::VideoSendStream::Config config_;
pbos@webrtc.org29d58392013-05-16 12:08:03 +000065
66 ViEBase* video_engine_base_;
67 ViECapture* capture_;
68 ViECodec* codec_;
69 ViEExternalCapture* external_capture_;
70 ViENetwork* network_;
71 ViERTP_RTCP* rtp_rtcp_;
72
73 int channel_;
74 int capture_id_;
75};
76} // namespace internal
77} // namespace webrtc
78
79#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_SEND_STREAM_H_