Lines Matching defs:env

60 JMediaExtractor::JMediaExtractor(JNIEnv *env, jobject thiz)
63 jclass clazz = env->GetObjectClass(thiz);
66 mClass = (jclass)env->NewGlobalRef(clazz);
67 mObject = env->NewWeakGlobalRef(thiz);
73 JNIEnv *env = AndroidRuntime::getJNIEnv();
75 env->DeleteWeakGlobalRef(mObject);
77 env->DeleteGlobalRef(mClass);
96 status_t JMediaExtractor::setMediaCas(JNIEnv *env, jobject casBinderObj) {
102 JHwRemoteBinder::GetNativeContext(env, casBinderObj)->getBinder();
131 JNIEnv *env = AndroidRuntime::getJNIEnv();
133 return ConvertMessageToMap(env, msg, format);
143 JNIEnv *env = AndroidRuntime::getJNIEnv();
145 return ConvertMessageToMap(env, msg, format);
167 JNIEnv *env = AndroidRuntime::getJNIEnv();
169 void *dst = env->GetDirectBufferAddress(byteBuf);
174 ScopedLocalRef<jclass> byteBufClass(env, env->FindClass("java/nio/ByteBuffer"));
179 env->GetMethodID(byteBufClass.get(), "array", "()[B");
183 (jbyteArray)env->CallObjectMethod(byteBuf, arrayID);
190 dst = env->GetByteArrayElements(byteArray, &isCopy);
192 dstSize = (size_t) env->GetArrayLength(byteArray);
194 dstSize = (size_t) env->GetDirectBufferCapacity(byteBuf);
199 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0);
210 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0);
219 jmethodID positionID = env->GetMethodID(
224 jmethodID limitID = env->GetMethodID(
229 jobject me = env->CallObjectMethod(
231 env->DeleteLocalRef(me);
232 me = env->CallObjectMethod(
234 env->DeleteLocalRef(me);
299 JNIEnv *env, jobject thiz, const sp<JMediaExtractor> &extractor) {
301 (JMediaExtractor *)env->GetLongField(thiz, gFields.context);
309 env->SetLongField(thiz, gFields.context, (jlong)extractor.get());
314 static sp<JMediaExtractor> getMediaExtractor(JNIEnv *env, jobject thiz) {
315 return (JMediaExtractor *)env->GetLongField(thiz, gFields.context);
318 static void android_media_MediaExtractor_release(JNIEnv *env, jobject thiz) {
319 setMediaExtractor(env, thiz, NULL);
323 JNIEnv *env, jobject thiz) {
324 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
327 jniThrowException(env, "java/lang/IllegalStateException", NULL);
335 JNIEnv *env, jobject thiz, jint index) {
336 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
339 jniThrowException(env, "java/lang/IllegalStateException", NULL);
347 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
355 JNIEnv *env, jobject thiz) {
356 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
359 jniThrowException(env, "java/lang/IllegalStateException", NULL);
367 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
375 JNIEnv *env, jobject thiz, jint index) {
376 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
379 jniThrowException(env, "java/lang/IllegalStateException", NULL);
386 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
392 JNIEnv *env, jobject thiz, jint index) {
393 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
396 jniThrowException(env, "java/lang/IllegalStateException", NULL);
403 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
409 JNIEnv *env, jobject thiz, jlong timeUs, jint mode) {
410 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
413 jniThrowException(env, "java/lang/IllegalStateException", NULL);
419 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
427 JNIEnv *env, jobject thiz) {
428 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
431 jniThrowException(env, "java/lang/IllegalStateException", NULL);
440 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
448 JNIEnv *env, jobject thiz, jobject byteBuf, jint offset) {
449 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
452 jniThrowException(env, "java/lang/IllegalStateException", NULL);
462 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
470 JNIEnv *env, jobject thiz) {
471 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
474 jniThrowException(env, "java/lang/IllegalStateException", NULL);
484 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
492 JNIEnv *env, jobject thiz) {
493 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
496 jniThrowException(env, "java/lang/IllegalStateException", NULL);
506 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
514 JNIEnv *env, jobject thiz) {
515 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
518 jniThrowException(env, "java/lang/IllegalStateException", NULL);
528 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
536 JNIEnv *env, jobject thiz) {
537 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
540 jniThrowException(env, "java/lang/IllegalStateException", NULL);
550 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
558 JNIEnv *env, jobject thiz, jobject cryptoInfoObj) {
559 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
562 jniThrowException(env, "java/lang/IllegalStateException", NULL);
586 jintArray numBytesOfEncryptedDataObj = env->NewIntArray(numSubSamples);
588 jint *dst = env->GetIntArrayElements(numBytesOfEncryptedDataObj, &isCopy);
592 env->ReleaseIntArrayElements(numBytesOfEncryptedDataObj, dst, 0);
603 numBytesOfPlainDataObj = env->NewIntArray(numSubSamples);
605 jint *dst = env->GetIntArrayElements(numBytesOfPlainDataObj, &isCopy);
609 env->ReleaseIntArrayElements(numBytesOfPlainDataObj, dst, 0);
620 keyObj = env->NewByteArray(size);
622 jbyte *dst = env->GetByteArrayElements(keyObj, &isCopy);
624 env->ReleaseByteArrayElements(keyObj, dst, 0);
635 ivObj = env->NewByteArray(size);
637 jbyte *dst = env->GetByteArrayElements(ivObj, &isCopy);
639 env->ReleaseByteArrayElements(ivObj, dst, 0);
648 env->CallVoidMethod(
662 env->CallVoidMethod(
671 static void android_media_MediaExtractor_native_init(JNIEnv *env) {
672 jclass clazz = env->FindClass("android/media/MediaExtractor");
675 gFields.context = env->GetFieldID(clazz, "mNativeContext", "J");
678 clazz = env->FindClass("android/media/MediaCodec$CryptoInfo");
682 env->GetMethodID(clazz, "set", "(I[I[I[B[BI)V");
685 env->GetMethodID(clazz, "setPattern", "(II)V");
689 JNIEnv *env, jobject thiz) {
690 sp<JMediaExtractor> extractor = new JMediaExtractor(env, thiz);
691 setMediaExtractor(env,thiz, extractor);
695 JNIEnv *env, jobject thiz,
700 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
703 jniThrowException(env, "java/lang/IllegalStateException", NULL);
708 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
714 env, keysArray, valuesArray, &headers)) {
718 const char *path = env->GetStringUTFChars(pathObj, NULL);
726 sp<IBinder> binder = ibinderForJavaObject(env, httpServiceBinderObj);
732 env->ReleaseStringUTFChars(pathObj, path);
737 env,
745 JNIEnv *env, jobject thiz,
747 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
750 jniThrowException(env, "java/lang/IllegalStateException", NULL);
755 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
759 int fd = jniGetFDFromFileDescriptor(env, fileDescObj);
765 env,
773 JNIEnv *env, jobject thiz,
775 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
778 jniThrowException(env, "java/lang/IllegalStateException", NULL);
783 jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
788 CreateDataSourceFromIDataSource(new JMediaDataSource(env, callbackObj));
798 env,
806 JNIEnv *env, jobject thiz, jobject casBinderObj) {
807 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
810 jniThrowException(env, "java/lang/IllegalStateException", NULL);
814 status_t err = extractor->setMediaCas(env, casBinderObj);
819 env,
826 JNIEnv *env, jobject thiz) {
827 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
830 jniThrowException(env, "java/lang/IllegalStateException", NULL);
844 JNIEnv *env, jobject thiz) {
845 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
848 jniThrowException(env, "java/lang/IllegalStateException", NULL);
862 JNIEnv *env, jobject thiz) {
863 android_media_MediaExtractor_release(env, thiz);
867 android_media_MediaExtractor_native_getMetrics(JNIEnv * env, jobject thiz)
871 sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
873 jniThrowException(env, "java/lang/IllegalStateException", NULL);
888 jobject mybundle = MediaMetricsJNI::writeMetricsToBundle(env, item, NULL);
968 int register_android_media_MediaExtractor(JNIEnv *env) {
969 return AndroidRuntime::registerNativeMethods(env,