Lines Matching refs:thiz

68     JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz);
77 JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz)
82 jclass clazz = env->GetObjectClass(thiz);
127 static sp<MediaPlayer> getMediaPlayer(JNIEnv* env, jobject thiz)
130 MediaPlayer* const p = (MediaPlayer*)env->GetIntField(thiz, fields.context);
134 static sp<MediaPlayer> setMediaPlayer(JNIEnv* env, jobject thiz, const sp<MediaPlayer>& player)
137 sp<MediaPlayer> old = (MediaPlayer*)env->GetIntField(thiz, fields.context);
139 player->incStrong(thiz);
142 old->decStrong(thiz);
144 env->SetIntField(thiz, fields.context, (int)player.get());
152 static void process_media_player_call(JNIEnv *env, jobject thiz, status_t opStatus, const char* exception, const char *message)
156 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
180 JNIEnv *env, jobject thiz, jstring path,
183 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
217 env, thiz, opStatus, "java/io/IOException",
222 android_media_MediaPlayer_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
224 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
236 process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException", "setDataSourceFD failed." );
240 getVideoSurfaceTexture(JNIEnv* env, jobject thiz) {
241 ISurfaceTexture * const p = (ISurfaceTexture*)env->GetIntField(thiz, fields.surface_texture);
246 decVideoSurfaceRef(JNIEnv *env, jobject thiz)
248 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
253 sp<ISurfaceTexture> old_st = getVideoSurfaceTexture(env, thiz);
255 old_st->decStrong(thiz);
260 setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlayerMustBeAlive)
262 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
270 decVideoSurfaceRef(env, thiz);
282 new_st->incStrong(thiz);
290 env->SetIntField(thiz, fields.surface_texture, (int)new_st.get());
300 android_media_MediaPlayer_setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface)
302 setVideoSurface(env, thiz, jsurface, true /* mediaPlayerMustBeAlive */);
306 android_media_MediaPlayer_prepare(JNIEnv *env, jobject thiz)
308 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
316 sp<ISurfaceTexture> st = getVideoSurfaceTexture(env, thiz);
319 process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." );
323 android_media_MediaPlayer_prepareAsync(JNIEnv *env, jobject thiz)
325 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
333 sp<ISurfaceTexture> st = getVideoSurfaceTexture(env, thiz);
336 process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." );
340 android_media_MediaPlayer_start(JNIEnv *env, jobject thiz)
343 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
348 process_media_player_call( env, thiz, mp->start(), NULL, NULL );
352 android_media_MediaPlayer_stop(JNIEnv *env, jobject thiz)
355 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
360 process_media_player_call( env, thiz, mp->stop(), NULL, NULL );
364 android_media_MediaPlayer_pause(JNIEnv *env, jobject thiz)
367 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
372 process_media_player_call( env, thiz, mp->pause(), NULL, NULL );
376 android_media_MediaPlayer_isPlaying(JNIEnv *env, jobject thiz)
378 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
390 android_media_MediaPlayer_seekTo(JNIEnv *env, jobject thiz, int msec)
392 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
398 process_media_player_call( env, thiz, mp->seekTo(msec), NULL, NULL );
402 android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz)
404 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
419 android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz)
421 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
437 android_media_MediaPlayer_getCurrentPosition(JNIEnv *env, jobject thiz)
439 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
445 process_media_player_call( env, thiz, mp->getCurrentPosition(&msec), NULL, NULL );
451 android_media_MediaPlayer_getDuration(JNIEnv *env, jobject thiz)
453 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
459 process_media_player_call( env, thiz, mp->getDuration(&msec), NULL, NULL );
465 android_media_MediaPlayer_reset(JNIEnv *env, jobject thiz)
468 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
473 process_media_player_call( env, thiz, mp->reset(), NULL, NULL );
477 android_media_MediaPlayer_setAudioStreamType(JNIEnv *env, jobject thiz, int streamtype)
480 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
485 process_media_player_call( env, thiz, mp->setAudioStreamType((audio_stream_type_t) streamtype) , NULL, NULL );
489 android_media_MediaPlayer_setLooping(JNIEnv *env, jobject thiz, jboolean looping)
492 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
497 process_media_player_call( env, thiz, mp->setLooping(looping), NULL, NULL );
501 android_media_MediaPlayer_isLooping(JNIEnv *env, jobject thiz)
504 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
513 android_media_MediaPlayer_setVolume(JNIEnv *env, jobject thiz, float leftVolume, float rightVolume)
516 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
521 process_media_player_call( env, thiz, mp->setVolume(leftVolume, rightVolume), NULL, NULL );
526 android_media_MediaPlayer_getFrameAt(JNIEnv *env, jobject thiz, jint msec)
535 android_media_MediaPlayer_invoke(JNIEnv *env, jobject thiz,
538 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
554 android_media_MediaPlayer_setMetadataFilter(JNIEnv *env, jobject thiz, jobject request)
556 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
573 android_media_MediaPlayer_getMetadata(JNIEnv *env, jobject thiz, jboolean update_only,
576 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
628 android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
638 sp<JNIMediaPlayerListener> listener = new JNIMediaPlayerListener(env, thiz, weak_this);
642 setMediaPlayer(env, thiz, mp);
646 android_media_MediaPlayer_release(JNIEnv *env, jobject thiz)
649 decVideoSurfaceRef(env, thiz);
650 sp<MediaPlayer> mp = setMediaPlayer(env, thiz, 0);
659 android_media_MediaPlayer_native_finalize(JNIEnv *env, jobject thiz)
662 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
666 android_media_MediaPlayer_release(env, thiz);
669 static void android_media_MediaPlayer_set_audio_session_id(JNIEnv *env, jobject thiz, jint sessionId) {
671 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
676 process_media_player_call( env, thiz, mp->setAudioSessionId(sessionId), NULL, NULL );
679 static jint android_media_MediaPlayer_get_audio_session_id(JNIEnv *env, jobject thiz) {
681 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
691 android_media_MediaPlayer_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloat level)
694 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
699 process_media_player_call( env, thiz, mp->setAuxEffectSendLevel(level), NULL, NULL );
702 static void android_media_MediaPlayer_attachAuxEffect(JNIEnv *env, jobject thiz, jint effectId) {
704 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
709 process_media_player_call( env, thiz, mp->attachAuxEffect(effectId), NULL, NULL );
713 android_media_MediaPlayer_pullBatteryData(JNIEnv *env, jobject thiz, jobject java_reply)
728 android_media_MediaPlayer_setRetransmitEndpoint(JNIEnv *env, jobject thiz,
730 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
767 android_media_MediaPlayer_setParameter(JNIEnv *env, jobject thiz, jint key, jobject java_request)
770 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
786 android_media_MediaPlayer_getParameter(JNIEnv *env, jobject thiz, jint key, jobject java_reply)
789 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
796 process_media_player_call(env, thiz, mp->getParameter(key, reply), NULL, NULL );
800 android_media_MediaPlayer_setNextMediaPlayer(JNIEnv *env, jobject thiz, jobject java_player)
803 sp<MediaPlayer> thisplayer = getMediaPlayer(env, thiz);
820 env, thiz, thisplayer->setNextMediaPlayer(nextplayer),