2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_
12 #define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_
16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
17 #include "webrtc/modules/video_render/include/video_render_defines.h"
18 #include "webrtc/system_wrappers/interface/clock.h"
19 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
20 #include "webrtc/video/encoded_frame_callback_adapter.h"
21 #include "webrtc/video/receive_statistics_proxy.h"
22 #include "webrtc/video/transport_adapter.h"
23 #include "webrtc/video_engine/include/vie_render.h"
24 #include "webrtc/video_receive_stream.h"
31 class ViEExternalCodec;
32 class ViEImageProcess;
40 class VideoReceiveStream : public webrtc::VideoReceiveStream,
41 public I420FrameCallback,
42 public VideoRenderCallback {
45 VideoReceiveStream(webrtc::VideoEngine* video_engine,
46 const VideoReceiveStream::Config& config,
47 newapi::Transport* transport,
48 webrtc::VoiceEngine* voice_engine,
50 virtual ~VideoReceiveStream();
52 virtual void Start() OVERRIDE;
53 virtual void Stop() OVERRIDE;
54 virtual Stats GetStats() const OVERRIDE;
56 virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) OVERRIDE;
58 // Overrides I420FrameCallback.
59 virtual void FrameCallback(I420VideoFrame* video_frame) OVERRIDE;
61 // Overrides VideoRenderCallback.
62 virtual int32_t RenderFrame(const uint32_t stream_id,
63 I420VideoFrame& video_frame) OVERRIDE;
66 virtual bool DeliverRtcp(const uint8_t* packet, size_t length);
67 virtual bool DeliverRtp(const uint8_t* packet, size_t length);
70 TransportAdapter transport_adapter_;
71 EncodedFrameCallbackAdapter encoded_frame_proxy_;
72 VideoReceiveStream::Config config_;
75 ViEBase* video_engine_base_;
77 ViEExternalCodec* external_codec_;
80 ViERTP_RTCP* rtp_rtcp_;
81 ViEImageProcess* image_process_;
83 scoped_ptr<ReceiveStatisticsProxy> stats_proxy_;
87 } // namespace internal
90 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_