blob: ea53dc25cf29adb75c0820fee40c04e360a74ccb [file] [log] [blame]
wu@webrtc.org9dba5252013-08-05 20:36:57 +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#include "webrtc/common_video/interface/texture_video_frame.h"
12
13#include <assert.h>
14
15#include "webrtc/system_wrappers/interface/trace.h"
16
17#define NOTREACHED() \
18 do { \
19 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, -1, "Not reached"); \
20 assert(false); \
21 } while (0)
22
23namespace webrtc {
24
25TextureVideoFrame::TextureVideoFrame(NativeHandle* handle,
26 int width,
27 int height,
28 uint32_t timestamp,
29 int64_t render_time_ms)
30 : handle_(handle) {
31 set_width(width);
32 set_height(height);
33 set_timestamp(timestamp);
34 set_render_time_ms(render_time_ms);
35}
36
37TextureVideoFrame::~TextureVideoFrame() {}
38
39int TextureVideoFrame::CreateEmptyFrame(int width,
40 int height,
41 int stride_y,
42 int stride_u,
43 int stride_v) {
44 NOTREACHED();
45 return -1;
46}
47
48int TextureVideoFrame::CreateFrame(int size_y,
49 const uint8_t* buffer_y,
50 int size_u,
51 const uint8_t* buffer_u,
52 int size_v,
53 const uint8_t* buffer_v,
54 int width,
55 int height,
56 int stride_y,
57 int stride_u,
58 int stride_v) {
59 NOTREACHED();
60 return -1;
61}
62
63int TextureVideoFrame::CopyFrame(const I420VideoFrame& videoFrame) {
64 NOTREACHED();
65 return -1;
66}
67
68void TextureVideoFrame::SwapFrame(I420VideoFrame* videoFrame) {
69 NOTREACHED();
70}
71
72uint8_t* TextureVideoFrame::buffer(PlaneType type) {
73 NOTREACHED();
74 return NULL;
75}
76
77const uint8_t* TextureVideoFrame::buffer(PlaneType type) const {
78 NOTREACHED();
79 return NULL;
80}
81
82int TextureVideoFrame::allocated_size(PlaneType type) const {
83 NOTREACHED();
84 return -1;
85}
86
87int TextureVideoFrame::stride(PlaneType type) const {
88 NOTREACHED();
89 return -1;
90}
91
92bool TextureVideoFrame::IsZeroSize() const {
93 NOTREACHED();
94 return true;
95}
96
97void TextureVideoFrame::ResetSize() {
98 NOTREACHED();
99}
100
101void* TextureVideoFrame::native_handle() const { return handle_.get(); }
102
103int TextureVideoFrame::CheckDimensions(
104 int width, int height, int stride_y, int stride_u, int stride_v) {
105 return 0;
106}
107
108} // namespace webrtc