OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 AndroidSurfaceViewChannel(uint32_t streamId, | 25 AndroidSurfaceViewChannel(uint32_t streamId, |
26 JavaVM* jvm, | 26 JavaVM* jvm, |
27 VideoRenderAndroid& renderer, | 27 VideoRenderAndroid& renderer, |
28 jobject javaRenderObj); | 28 jobject javaRenderObj); |
29 ~AndroidSurfaceViewChannel(); | 29 ~AndroidSurfaceViewChannel(); |
30 | 30 |
31 int32_t Init(int32_t zOrder, const float left, const float top, | 31 int32_t Init(int32_t zOrder, const float left, const float top, |
32 const float right, const float bottom); | 32 const float right, const float bottom); |
33 | 33 |
34 //Implement VideoRenderCallback | 34 // Implement rtc::VideoSinkInterface<VideoFrame> |
35 virtual int32_t RenderFrame(const uint32_t streamId, | 35 void OnFrame(const VideoFrame& videoFrame) override; |
36 const VideoFrame& videoFrame); | |
37 | 36 |
38 //Implements AndroidStream | 37 //Implements AndroidStream |
39 virtual void DeliverFrame(JNIEnv* jniEnv); | 38 virtual void DeliverFrame(JNIEnv* jniEnv); |
40 | 39 |
41 private: | 40 private: |
42 uint32_t _id; | 41 uint32_t _id; |
43 CriticalSectionWrapper& _renderCritSect; | 42 CriticalSectionWrapper& _renderCritSect; |
44 | 43 |
45 VideoFrame _bufferToRender; | 44 VideoFrame _bufferToRender; |
46 VideoRenderAndroid& _renderer; | 45 VideoRenderAndroid& _renderer; |
(...skipping 27 matching lines...) Expand all Loading... |
74 const float bottom, | 73 const float bottom, |
75 VideoRenderAndroid& renderer); | 74 VideoRenderAndroid& renderer); |
76 private: | 75 private: |
77 jobject _javaRenderObj; | 76 jobject _javaRenderObj; |
78 jclass _javaRenderClass; | 77 jclass _javaRenderClass; |
79 }; | 78 }; |
80 | 79 |
81 } // namespace webrtc | 80 } // namespace webrtc |
82 | 81 |
83 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_ANDROID_VIDEO_RENDER_ANDROID_
SURFACE_VIEW_H_ | 82 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_ANDROID_VIDEO_RENDER_ANDROID_
SURFACE_VIEW_H_ |
OLD | NEW |