OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 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/modules/video_render/external/video_render_external_impl.h" | |
12 | |
13 namespace webrtc { | |
14 | |
15 VideoRenderExternalImpl::VideoRenderExternalImpl( | |
16 const int32_t id, | |
17 const VideoRenderType videoRend
erType, | |
18 void* window, | |
19 const bool fullscreen) : | |
20 _critSect(*CriticalSectionWrapper::CreateCriticalSection()), | |
21 _fullscreen(fullscreen) | |
22 { | |
23 } | |
24 | |
25 VideoRenderExternalImpl::~VideoRenderExternalImpl() | |
26 { | |
27 delete &_critSect; | |
28 } | |
29 | |
30 int32_t VideoRenderExternalImpl::Init() | |
31 { | |
32 return 0; | |
33 } | |
34 | |
35 int32_t VideoRenderExternalImpl::ChangeWindow(void* window) | |
36 { | |
37 CriticalSectionScoped cs(&_critSect); | |
38 return 0; | |
39 } | |
40 | |
41 VideoRenderCallback* | |
42 VideoRenderExternalImpl::AddIncomingRenderStream(const uint32_t streamId, | |
43 const uint32_t zOrder, | |
44 const float left, | |
45 const float top, | |
46 const float right, | |
47 const float bottom) | |
48 { | |
49 CriticalSectionScoped cs(&_critSect); | |
50 return this; | |
51 } | |
52 | |
53 int32_t VideoRenderExternalImpl::DeleteIncomingRenderStream( | |
54 const uint32_t
streamId) | |
55 { | |
56 CriticalSectionScoped cs(&_critSect); | |
57 return 0; | |
58 } | |
59 | |
60 int32_t VideoRenderExternalImpl::GetIncomingRenderStreamProperties( | |
61 const u
int32_t streamId, | |
62 uint32_
t& zOrder, | |
63 float&
left, | |
64 float&
top, | |
65 float&
right, | |
66 float&
bottom) const | |
67 { | |
68 CriticalSectionScoped cs(&_critSect); | |
69 | |
70 zOrder = 0; | |
71 left = 0; | |
72 top = 0; | |
73 right = 0; | |
74 bottom = 0; | |
75 | |
76 return 0; | |
77 } | |
78 | |
79 int32_t VideoRenderExternalImpl::StartRender() | |
80 { | |
81 CriticalSectionScoped cs(&_critSect); | |
82 return 0; | |
83 } | |
84 | |
85 int32_t VideoRenderExternalImpl::StopRender() | |
86 { | |
87 CriticalSectionScoped cs(&_critSect); | |
88 return 0; | |
89 } | |
90 | |
91 VideoRenderType VideoRenderExternalImpl::RenderType() | |
92 { | |
93 return kRenderExternal; | |
94 } | |
95 | |
96 RawVideoType VideoRenderExternalImpl::PerferedVideoType() | |
97 { | |
98 return kVideoI420; | |
99 } | |
100 | |
101 bool VideoRenderExternalImpl::FullScreen() | |
102 { | |
103 CriticalSectionScoped cs(&_critSect); | |
104 return _fullscreen; | |
105 } | |
106 | |
107 int32_t VideoRenderExternalImpl::GetGraphicsMemory( | |
108 uint64_t& totalGraphics
Memory, | |
109 uint64_t& availableGrap
hicsMemory) const | |
110 { | |
111 totalGraphicsMemory = 0; | |
112 availableGraphicsMemory = 0; | |
113 return -1; | |
114 } | |
115 | |
116 int32_t VideoRenderExternalImpl::GetScreenResolution( | |
117 uint32_t& screenWidth
, | |
118 uint32_t& screenHeigh
t) const | |
119 { | |
120 CriticalSectionScoped cs(&_critSect); | |
121 screenWidth = 0; | |
122 screenHeight = 0; | |
123 return 0; | |
124 } | |
125 | |
126 uint32_t VideoRenderExternalImpl::RenderFrameRate( | |
127 const uint32_t streamId) | |
128 { | |
129 CriticalSectionScoped cs(&_critSect); | |
130 return 0; | |
131 } | |
132 | |
133 int32_t VideoRenderExternalImpl::SetStreamCropping( | |
134 const uint32_t streamId
, | |
135 const float left, | |
136 const float top, | |
137 const float right, | |
138 const float bottom) | |
139 { | |
140 CriticalSectionScoped cs(&_critSect); | |
141 return 0; | |
142 } | |
143 | |
144 int32_t VideoRenderExternalImpl::ConfigureRenderer( | |
145 const uint32_t streamId
, | |
146 const unsigned int zOrd
er, | |
147 const float left, | |
148 const float top, | |
149 const float right, | |
150 const float bottom) | |
151 { | |
152 CriticalSectionScoped cs(&_critSect); | |
153 return 0; | |
154 } | |
155 | |
156 int32_t VideoRenderExternalImpl::SetTransparentBackground( | |
157 const bool enabl
e) | |
158 { | |
159 CriticalSectionScoped cs(&_critSect); | |
160 return 0; | |
161 } | |
162 | |
163 int32_t VideoRenderExternalImpl::SetText( | |
164 const uint8_t textId, | |
165 const uint8_t* text, | |
166 const int32_t textLength, | |
167 const uint32_t textColorRef, | |
168 const uint32_t backgroundColorRef
, | |
169 const float left, | |
170 const float top, | |
171 const float right, | |
172 const float bottom) | |
173 { | |
174 CriticalSectionScoped cs(&_critSect); | |
175 return 0; | |
176 } | |
177 | |
178 int32_t VideoRenderExternalImpl::SetBitmap(const void* bitMap, | |
179 const uint8_t pictureId, | |
180 const void* colorKey, | |
181 const float left, | |
182 const float top, | |
183 const float right, | |
184 const float bottom) | |
185 { | |
186 CriticalSectionScoped cs(&_critSect); | |
187 return 0; | |
188 } | |
189 | |
190 // VideoRenderCallback | |
191 int32_t VideoRenderExternalImpl::RenderFrame(const uint32_t streamId, | |
192 const VideoFrame& videoFrame) { | |
193 return 0; | |
194 } | |
195 } // namespace webrtc | |
OLD | NEW |