OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 public AudioTrack createAudioTrack(String id, AudioSource source) { | 129 public AudioTrack createAudioTrack(String id, AudioSource source) { |
130 return new AudioTrack(nativeCreateAudioTrack( | 130 return new AudioTrack(nativeCreateAudioTrack( |
131 nativeFactory, id, source.nativeSource)); | 131 nativeFactory, id, source.nativeSource)); |
132 } | 132 } |
133 | 133 |
134 public void setOptions(Options options) { | 134 public void setOptions(Options options) { |
135 nativeSetOptions(nativeFactory, options); | 135 nativeSetOptions(nativeFactory, options); |
136 } | 136 } |
137 | 137 |
| 138 @Deprecated |
138 public void setVideoHwAccelerationOptions(Object renderEGLContext) { | 139 public void setVideoHwAccelerationOptions(Object renderEGLContext) { |
139 nativeSetVideoHwAccelerationOptions(nativeFactory, renderEGLContext); | 140 nativeSetVideoHwAccelerationOptions(nativeFactory, renderEGLContext, renderE
GLContext); |
| 141 } |
| 142 |
| 143 /** Set the EGL context used by HW Video encoding and decoding. |
| 144 * |
| 145 * |
| 146 * @param localEGLContext An instance of javax.microedition.khronos.egl.EGLC
ontext. |
| 147 * Must be the same as used by VideoCapturerAndroid a
nd any local |
| 148 * video renderer. |
| 149 * @param remoteEGLContext An instance of javax.microedition.khronos.egl.EGLC
ontext. |
| 150 * Must be the same as used by any remote video rende
rer. |
| 151 */ |
| 152 public void setVideoHwAccelerationOptions(Object localEGLContext, Object remot
eEGLContext) { |
| 153 nativeSetVideoHwAccelerationOptions(nativeFactory, localEGLContext, remoteEG
LContext); |
140 } | 154 } |
141 | 155 |
142 public void dispose() { | 156 public void dispose() { |
143 nativeFreeFactory(nativeFactory); | 157 nativeFreeFactory(nativeFactory); |
144 signalingThread = null; | 158 signalingThread = null; |
145 workerThread = null; | 159 workerThread = null; |
146 } | 160 } |
147 | 161 |
148 public void threadsCallbacks() { | 162 public void threadsCallbacks() { |
149 nativeThreadsCallbacks(nativeFactory); | 163 nativeThreadsCallbacks(nativeFactory); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 211 |
198 private static native long nativeCreateAudioSource( | 212 private static native long nativeCreateAudioSource( |
199 long nativeFactory, MediaConstraints constraints); | 213 long nativeFactory, MediaConstraints constraints); |
200 | 214 |
201 private static native long nativeCreateAudioTrack( | 215 private static native long nativeCreateAudioTrack( |
202 long nativeFactory, String id, long nativeSource); | 216 long nativeFactory, String id, long nativeSource); |
203 | 217 |
204 public native void nativeSetOptions(long nativeFactory, Options options); | 218 public native void nativeSetOptions(long nativeFactory, Options options); |
205 | 219 |
206 private static native void nativeSetVideoHwAccelerationOptions( | 220 private static native void nativeSetVideoHwAccelerationOptions( |
207 long nativeFactory, Object renderEGLContext); | 221 long nativeFactory, Object localEGLContext, Object remoteEGLContext); |
208 | 222 |
209 private static native void nativeThreadsCallbacks(long nativeFactory); | 223 private static native void nativeThreadsCallbacks(long nativeFactory); |
210 | 224 |
211 private static native void nativeFreeFactory(long nativeFactory); | 225 private static native void nativeFreeFactory(long nativeFactory); |
212 } | 226 } |
OLD | NEW |