Home | History | Annotate | Download | only in jni

Lines Matching full:thiz

63     JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz);
72 JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz)
77 jclass clazz = env->GetObjectClass(thiz);
111 static sp<MediaPlayer> getMediaPlayer(JNIEnv* env, jobject thiz)
114 MediaPlayer* const p = (MediaPlayer*)env->GetIntField(thiz, fields.context);
118 static sp<MediaPlayer> setMediaPlayer(JNIEnv* env, jobject thiz, const sp<MediaPlayer>& player)
121 sp<MediaPlayer> old = (MediaPlayer*)env->GetIntField(thiz, fields.context);
123 player->incStrong(thiz);
126 old->decStrong(thiz);
128 env->SetIntField(thiz, fields.context, (int)player.get());
136 static void process_media_player_call(JNIEnv *env, jobject thiz, status_t opStatus, const char* exception, const char *message)
140 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
162 JNIEnv *env, jobject thiz, jstring path, jobject headers) {
163 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
261 env, thiz, opStatus, "java/io/IOException",
266 android_media_MediaPlayer_setDataSource(JNIEnv *env, jobject thiz, jstring path)
268 android_media_MediaPlayer_setDataSourceAndHeaders(env, thiz, path, 0);
272 android_media_MediaPlayer_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
274 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
286 process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException", "setDataSourceFD failed." );
289 static void setVideoSurface(const sp<MediaPlayer>& mp, JNIEnv *env, jobject thiz)
291 jobject surface = env->GetObjectField(thiz, fields.surface);
301 android_media_MediaPlayer_setVideoSurface(JNIEnv *env, jobject thiz)
303 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
308 setVideoSurface(mp, env, thiz);
312 android_media_MediaPlayer_prepare(JNIEnv *env, jobject thiz)
314 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
319 setVideoSurface(mp, env, thiz);
320 process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." );
324 android_media_MediaPlayer_prepareAsync(JNIEnv *env, jobject thiz)
326 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
331 jobject surface = env->GetObjectField(thiz, fields.surface);
338 process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." );
342 android_media_MediaPlayer_start(JNIEnv *env, jobject thiz)
345 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
350 process_media_player_call( env, thiz, mp->start(), NULL, NULL );
354 android_media_MediaPlayer_stop(JNIEnv *env, jobject thiz)
357 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
362 process_media_player_call( env, thiz, mp->stop(), NULL, NULL );
366 android_media_MediaPlayer_pause(JNIEnv *env, jobject thiz)
369 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
374 process_media_player_call( env, thiz, mp->pause(), NULL, NULL );
378 android_media_MediaPlayer_isPlaying(JNIEnv *env, jobject thiz)
380 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
392 android_media_MediaPlayer_seekTo(JNIEnv *env, jobject thiz, int msec)
394 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
400 process_media_player_call( env, thiz, mp->seekTo(msec), NULL, NULL );
404 android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz)
406 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
421 android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz)
423 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
439 android_media_MediaPlayer_getCurrentPosition(JNIEnv *env, jobject thiz)
441 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
447 process_media_player_call( env, thiz, mp->getCurrentPosition(&msec), NULL, NULL );
453 android_media_MediaPlayer_getDuration(JNIEnv *env, jobject thiz)
455 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
461 process_media_player_call( env, thiz, mp->getDuration(&msec), NULL, NULL );
467 android_media_MediaPlayer_reset(JNIEnv *env, jobject thiz)
470 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
475 process_media_player_call( env, thiz, mp->reset(), NULL, NULL );
479 android_media_MediaPlayer_setAudioStreamType(JNIEnv *env, jobject thiz, int streamtype)
482 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
487 process_media_player_call( env, thiz, mp->setAudioStreamType(streamtype) , NULL, NULL );
491 android_media_MediaPlayer_setLooping(JNIEnv *env, jobject thiz, jboolean looping)
494 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
499 process_media_player_call( env, thiz, mp->setLooping(looping), NULL, NULL );
503 android_media_MediaPlayer_isLooping(JNIEnv *env, jobject thiz)
506 thiz);
515 android_media_MediaPlayer_setVolume(JNIEnv *env, jobject thiz, float leftVolume, float rightVolume)
518 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
523 process_media_player_call( env, thiz, mp->setVolume(leftVolume, rightVolume), NULL, NULL );
528 android_media_MediaPlayer_getFrameAt(JNIEnv *env, jobject thiz, jint msec)
537 android_media_MediaPlayer_invoke(JNIEnv *env, jobject thiz,
540 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
557 android_media_MediaPlayer_setMetadataFilter(JNIEnv *env, jobject thiz, jobject request)
559 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
576 android_media_MediaPlayer_getMetadata(JNIEnv *env, jobject thiz, jboolean update_only,
579 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
647 android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
657 sp<JNIMediaPlayerListener> listener = new JNIMediaPlayerListener(env, thiz, weak_this);
661 setMediaPlayer(env, thiz, mp);
665 android_media_MediaPlayer_release(JNIEnv *env, jobject thiz)
668 sp<MediaPlayer> mp = setMediaPlayer(env, thiz, 0);
677 android_media_MediaPlayer_native_finalize(JNIEnv *env, jobject thiz)
680 android_media_MediaPlayer_release(env, thiz);
684 android_media_MediaPlayer_snoop(JNIEnv* env, jobject thiz, jobject data, jint kind) {
697 JNIEnv *env, jobject thiz, jboolean isSuspend) {
699 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);