Files
platform-external-webrtc/webrtc/common_video/texture_video_frame.cc
wu@webrtc.org 9dba525627 * Update libjingle to 50389769.
* Together with "Add texture support for i420 video frame." from
wuchengli@chromium.org.
https://webrtc-codereview.appspot.com/1413004

RISK=P1
TESTED=try bots
R=fischman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4489 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 20:36:57 +00:00

109 lines
2.9 KiB
C++

/*
* 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.
*/
#include "webrtc/common_video/interface/texture_video_frame.h"
#include <assert.h>
#include "webrtc/system_wrappers/interface/trace.h"
#define NOTREACHED() \
do { \
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, -1, "Not reached"); \
assert(false); \
} while (0)
namespace webrtc {
TextureVideoFrame::TextureVideoFrame(NativeHandle* handle,
int width,
int height,
uint32_t timestamp,
int64_t render_time_ms)
: handle_(handle) {
set_width(width);
set_height(height);
set_timestamp(timestamp);
set_render_time_ms(render_time_ms);
}
TextureVideoFrame::~TextureVideoFrame() {}
int TextureVideoFrame::CreateEmptyFrame(int width,
int height,
int stride_y,
int stride_u,
int stride_v) {
NOTREACHED();
return -1;
}
int TextureVideoFrame::CreateFrame(int size_y,
const uint8_t* buffer_y,
int size_u,
const uint8_t* buffer_u,
int size_v,
const uint8_t* buffer_v,
int width,
int height,
int stride_y,
int stride_u,
int stride_v) {
NOTREACHED();
return -1;
}
int TextureVideoFrame::CopyFrame(const I420VideoFrame& videoFrame) {
NOTREACHED();
return -1;
}
void TextureVideoFrame::SwapFrame(I420VideoFrame* videoFrame) {
NOTREACHED();
}
uint8_t* TextureVideoFrame::buffer(PlaneType type) {
NOTREACHED();
return NULL;
}
const uint8_t* TextureVideoFrame::buffer(PlaneType type) const {
NOTREACHED();
return NULL;
}
int TextureVideoFrame::allocated_size(PlaneType type) const {
NOTREACHED();
return -1;
}
int TextureVideoFrame::stride(PlaneType type) const {
NOTREACHED();
return -1;
}
bool TextureVideoFrame::IsZeroSize() const {
NOTREACHED();
return true;
}
void TextureVideoFrame::ResetSize() {
NOTREACHED();
}
void* TextureVideoFrame::native_handle() const { return handle_.get(); }
int TextureVideoFrame::CheckDimensions(
int width, int height, int stride_y, int stride_u, int stride_v) {
return 0;
}
} // namespace webrtc