Lines Matching refs:MediaPlayer
19 #define LOG_TAG "MediaPlayer-JNI"
22 #include <media/mediaplayer.h>
78 jclass mClass; // Reference to MediaPlayer class
79 jobject mObject; // Weak ref to MediaPlayer Java object to call on
85 // Hold onto the MediaPlayer class for use in calling the static method
89 ALOGE("Can't find android/media/MediaPlayer");
95 // We use a weak reference so the MediaPlayer object can be garbage collected.
133 static sp<MediaPlayer> getMediaPlayer(JNIEnv* env, jobject thiz)
136 MediaPlayer* const p = (MediaPlayer*)env->GetIntField(thiz, fields.context);
137 return sp<MediaPlayer>(p);
140 static sp<MediaPlayer> setMediaPlayer(JNIEnv* env, jobject thiz, const sp<MediaPlayer>& player)
143 sp<MediaPlayer> old = (MediaPlayer*)env->GetIntField(thiz, fields.context);
162 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
189 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
230 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
254 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
268 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
299 // can be the case if setDisplay() on MediaPlayer.java has been called
314 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
331 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
349 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
361 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
373 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
384 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
398 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
410 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
427 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
445 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
459 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
474 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
486 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
498 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
510 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
522 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
536 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
554 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
574 sp<MediaPlayer> media_player = getMediaPlayer(env, thiz);
596 // It is called from a static block in MediaPlayer, which won't run until the
603 clazz = env->FindClass("android/media/MediaPlayer");
643 sp<MediaPlayer> mp = new MediaPlayer();
649 // create new listener and give it to MediaPlayer
653 // Stow our new C++ MediaPlayer in an opaque field in the Java object.
662 sp<MediaPlayer> mp = setMediaPlayer(env, thiz, 0);
674 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
676 ALOGW("MediaPlayer finalized without being released");
683 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
693 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
706 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
716 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
742 sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
782 sp<MediaPlayer> thisplayer = getMediaPlayer(env, thiz);
787 sp<MediaPlayer> nextplayer = (java_player == NULL) ? NULL : getMediaPlayer(env, java_player);
810 sp<MediaPlayer> thisplayer = getMediaPlayer(env, thiz);
888 {"setNextMediaPlayer", "(Landroid/media/MediaPlayer;)V", (void *)android_media_MediaPlayer_setNextMediaPlayer},
892 static const char* const kClassPathName = "android/media/MediaPlayer";
898 "android/media/MediaPlayer", gMethods, NELEM(gMethods));
935 ALOGE("ERROR: MediaPlayer native registration failed\n");