OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 private: | 57 private: |
58 NativeHandleImpl native_handle_; | 58 NativeHandleImpl native_handle_; |
59 const rtc::scoped_refptr<SurfaceTextureHelper> pool_; | 59 const rtc::scoped_refptr<SurfaceTextureHelper> pool_; |
60 }; | 60 }; |
61 | 61 |
62 SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni, | 62 SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni, |
63 jobject egl_shared_context) | 63 jobject egl_shared_context) |
64 : j_surface_texture_helper_class_( | 64 : j_surface_texture_helper_class_( |
65 jni, | 65 jni, |
66 jni->FindClass("org/webrtc/SurfaceTextureHelper")), | 66 FindClass(jni, "org/webrtc/SurfaceTextureHelper")), |
67 j_surface_texture_helper_( | 67 j_surface_texture_helper_( |
68 jni, | 68 jni, |
69 jni->NewObject(*j_surface_texture_helper_class_, | 69 jni->NewObject(*j_surface_texture_helper_class_, |
70 GetMethodID(jni, | 70 GetMethodID(jni, |
71 *j_surface_texture_helper_class_, | 71 *j_surface_texture_helper_class_, |
72 "<init>", | 72 "<init>", |
73 "(Landroid/opengl/EGLContext;)V"), | 73 "(Landroid/opengl/EGLContext;)V"), |
74 egl_shared_context)), | 74 egl_shared_context)), |
75 j_return_texture_method_( | 75 j_return_texture_method_( |
76 GetMethodID(jni, | 76 GetMethodID(jni, |
(...skipping 15 matching lines...) Expand all Loading... |
92 } | 92 } |
93 | 93 |
94 rtc::scoped_refptr<webrtc::VideoFrameBuffer> | 94 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
95 SurfaceTextureHelper::CreateTextureFrame(int width, int height, | 95 SurfaceTextureHelper::CreateTextureFrame(int width, int height, |
96 const NativeHandleImpl& native_handle) { | 96 const NativeHandleImpl& native_handle) { |
97 return new rtc::RefCountedObject<TextureBuffer>( | 97 return new rtc::RefCountedObject<TextureBuffer>( |
98 width, height, this, native_handle); | 98 width, height, this, native_handle); |
99 } | 99 } |
100 | 100 |
101 } // namespace webrtc_jni | 101 } // namespace webrtc_jni |
OLD | NEW |