blob: b1780332b1e522fe46b09218477fb632a24f93e4 [file] [log] [blame]
pbos@webrtc.org2a9108f2013-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"
17#include "webrtc/video_engine/new_include/video_send_stream.h"
18#include "webrtc/video_engine/new_include/video_receive_stream.h"
19
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,
37 const newapi::VideoSendStreamConfig& send_stream_config);
38
39 virtual ~VideoSendStream();
40
41 virtual void PutFrame(const I420VideoFrame& frame, int32_t delta_capture_time)
42 OVERRIDE;
43
44 virtual newapi::VideoSendStreamInput* Input() OVERRIDE;
45
46 virtual void StartSend() OVERRIDE;
47
48 virtual void StopSend() OVERRIDE;
49
50 virtual void GetSendStatistics(
51 std::vector<newapi::SendStatistics>* statistics) OVERRIDE;
52
53 virtual bool SetTargetBitrate(int min_bitrate, int max_bitrate,
54 const std::vector<SimulcastStream>& streams)
55 OVERRIDE;
56
57 virtual void GetSendCodec(VideoCodec* send_codec) OVERRIDE;
58
59 virtual int SendPacket(int /*channel*/, const void* packet, int length)
60 OVERRIDE;
61
62 virtual int SendRTCPPacket(int /*channel*/, const void* packet, int length)
63 OVERRIDE;
64
65 private:
66 newapi::Transport* transport_;
67 newapi::VideoSendStreamConfig config_;
68
69 ViEBase* video_engine_base_;
70 ViECapture* capture_;
71 ViECodec* codec_;
72 ViEExternalCapture* external_capture_;
73 ViENetwork* network_;
74 ViERTP_RTCP* rtp_rtcp_;
75
76 int channel_;
77 int capture_id_;
78};
79} // namespace internal
80} // namespace webrtc
81
82#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_SEND_STREAM_H_