Deliver I420VideoFrames from VideoRender module.

Performance issue and simplicity, this implementation skips conversion
to VideoEngine's frame format and then back again to I420VideoFrame.

BUG=2526
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3989004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5140 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-11-20 13:19:54 +00:00
parent 1ae1d0c471
commit d29d4e9c08
7 changed files with 65 additions and 55 deletions

View File

@ -14,6 +14,7 @@
#include <vector>
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/video_render/include/video_render_defines.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/video/transport_adapter.h"
#include "webrtc/video_engine/include/vie_render.h"
@ -34,7 +35,7 @@ class VoiceEngine;
namespace internal {
class VideoReceiveStream : public webrtc::VideoReceiveStream,
public webrtc::ExternalRenderer {
public VideoRenderCallback {
public:
VideoReceiveStream(webrtc::VideoEngine* video_engine,
const VideoReceiveStream::Config& config,
@ -47,12 +48,8 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) OVERRIDE;
virtual int FrameSizeChange(unsigned int width, unsigned int height,
unsigned int /*number_of_streams*/) OVERRIDE;
virtual int DeliverFrame(uint8_t* frame, int buffer_size, uint32_t timestamp,
int64_t render_time, void* /*handle*/) OVERRIDE;
virtual bool IsTextureSupported() OVERRIDE;
virtual int32_t RenderFrame(const uint32_t stream_id,
I420VideoFrame& video_frame) OVERRIDE;
public:
virtual bool DeliverRtcp(const uint8_t* packet, size_t length);
@ -72,10 +69,6 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
ViEImageProcess* image_process_;
int channel_;
// TODO(pbos): Remove VideoReceiveStream can operate on I420 frames directly.
unsigned int height_;
unsigned int width_;
};
} // internal
} // webrtc