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 26 matching lines...) Expand all Loading... |
37 : oes_texture_id(j_oes_texture_id) { | 37 : oes_texture_id(j_oes_texture_id) { |
38 RTC_CHECK_EQ(16, jni->GetArrayLength(j_transform_matrix)); | 38 RTC_CHECK_EQ(16, jni->GetArrayLength(j_transform_matrix)); |
39 jfloat* transform_matrix_ptr = | 39 jfloat* transform_matrix_ptr = |
40 jni->GetFloatArrayElements(j_transform_matrix, nullptr); | 40 jni->GetFloatArrayElements(j_transform_matrix, nullptr); |
41 for (int i = 0; i < 16; ++i) { | 41 for (int i = 0; i < 16; ++i) { |
42 sampling_matrix[i] = transform_matrix_ptr[i]; | 42 sampling_matrix[i] = transform_matrix_ptr[i]; |
43 } | 43 } |
44 jni->ReleaseFloatArrayElements(j_transform_matrix, transform_matrix_ptr, 0); | 44 jni->ReleaseFloatArrayElements(j_transform_matrix, transform_matrix_ptr, 0); |
45 } | 45 } |
46 | 46 |
| 47 AndroidTextureBuffer::AndroidTextureBuffer( |
| 48 int width, |
| 49 int height, |
| 50 const NativeHandleImpl& native_handle, |
| 51 const rtc::Callback0<void>& no_longer_used) |
| 52 : webrtc::NativeHandleBuffer(&native_handle_, width, height), |
| 53 native_handle_(native_handle), |
| 54 no_longer_used_cb_(no_longer_used) {} |
| 55 |
| 56 AndroidTextureBuffer::~AndroidTextureBuffer() { |
| 57 no_longer_used_cb_(); |
| 58 } |
| 59 |
| 60 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
| 61 AndroidTextureBuffer::NativeToI420Buffer() { |
| 62 RTC_NOTREACHED() |
| 63 << "AndroidTextureBuffer::NativeToI420Buffer not implemented."; |
| 64 return nullptr; |
| 65 } |
| 66 |
47 } // namespace webrtc_jni | 67 } // namespace webrtc_jni |
OLD | NEW |