2013-05-16 12:08:03 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_VIDEO_ENGINE_VIDEO_RECEIVE_STREAM_IMPL_H_
|
|
|
|
|
#define WEBRTC_VIDEO_ENGINE_VIDEO_RECEIVE_STREAM_IMPL_H_
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
|
|
|
|
#include "webrtc/system_wrappers/interface/clock.h"
|
2013-10-28 16:32:01 +00:00
|
|
|
#include "webrtc/video/transport_adapter.h"
|
2013-05-16 12:08:03 +00:00
|
|
|
#include "webrtc/video_engine/include/vie_render.h"
|
2013-10-28 16:32:01 +00:00
|
|
|
#include "webrtc/video_receive_stream.h"
|
2013-05-16 12:08:03 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class VideoEngine;
|
|
|
|
|
class ViEBase;
|
|
|
|
|
class ViECodec;
|
2013-09-09 08:26:30 +00:00
|
|
|
class ViEExternalCodec;
|
2013-10-21 10:34:43 +00:00
|
|
|
class ViEImageProcess;
|
2013-05-16 12:08:03 +00:00
|
|
|
class ViENetwork;
|
|
|
|
|
class ViERender;
|
|
|
|
|
class ViERTP_RTCP;
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
2013-08-23 09:19:30 +00:00
|
|
|
class VideoReceiveStream : public webrtc::VideoReceiveStream,
|
2013-09-18 11:52:42 +00:00
|
|
|
public webrtc::ExternalRenderer {
|
2013-05-16 12:08:03 +00:00
|
|
|
public:
|
|
|
|
|
VideoReceiveStream(webrtc::VideoEngine* video_engine,
|
2013-08-23 09:19:30 +00:00
|
|
|
const VideoReceiveStream::Config& config,
|
2013-05-16 12:08:03 +00:00
|
|
|
newapi::Transport* transport);
|
|
|
|
|
virtual ~VideoReceiveStream();
|
|
|
|
|
|
|
|
|
|
virtual void StartReceive() OVERRIDE;
|
|
|
|
|
virtual void StopReceive() OVERRIDE;
|
|
|
|
|
|
|
|
|
|
virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) OVERRIDE;
|
|
|
|
|
|
|
|
|
|
virtual int FrameSizeChange(unsigned int width, unsigned int height,
|
|
|
|
|
unsigned int /*number_of_streams*/) OVERRIDE;
|
2013-07-09 08:02:33 +00:00
|
|
|
virtual int DeliverFrame(uint8_t* frame, int buffer_size, uint32_t timestamp,
|
2013-08-05 20:36:57 +00:00
|
|
|
int64_t render_time, void* /*handle*/) OVERRIDE;
|
|
|
|
|
|
|
|
|
|
virtual bool IsTextureSupported() OVERRIDE;
|
2013-05-16 12:08:03 +00:00
|
|
|
|
2013-08-05 12:01:36 +00:00
|
|
|
public:
|
|
|
|
|
virtual bool DeliverRtcp(const uint8_t* packet, size_t length);
|
|
|
|
|
virtual bool DeliverRtp(const uint8_t* packet, size_t length);
|
|
|
|
|
|
2013-05-16 12:08:03 +00:00
|
|
|
private:
|
2013-09-18 11:52:42 +00:00
|
|
|
TransportAdapter transport_adapter_;
|
2013-08-23 09:19:30 +00:00
|
|
|
VideoReceiveStream::Config config_;
|
2013-05-16 12:08:03 +00:00
|
|
|
Clock* clock_;
|
|
|
|
|
|
|
|
|
|
ViEBase* video_engine_base_;
|
|
|
|
|
ViECodec* codec_;
|
2013-09-09 08:26:30 +00:00
|
|
|
ViEExternalCodec* external_codec_;
|
2013-05-16 12:08:03 +00:00
|
|
|
ViENetwork* network_;
|
|
|
|
|
ViERender* render_;
|
|
|
|
|
ViERTP_RTCP* rtp_rtcp_;
|
2013-10-21 10:34:43 +00:00
|
|
|
ViEImageProcess* image_process_;
|
2013-05-16 12:08:03 +00:00
|
|
|
|
|
|
|
|
int channel_;
|
|
|
|
|
|
|
|
|
|
// TODO(pbos): Remove VideoReceiveStream can operate on I420 frames directly.
|
|
|
|
|
unsigned int height_;
|
|
|
|
|
unsigned int width_;
|
|
|
|
|
};
|
|
|
|
|
} // internal
|
|
|
|
|
} // webrtc
|
|
|
|
|
|
|
|
|
|
#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_RECEIVE_STREAM_H_
|