Lines Matching refs:mp

196             sp<MediaPlayer> mp = getMediaPlayer(env, thiz);  in process_media_player_call()  local
197 if (mp != 0) mp->notify(MEDIA_ERROR, opStatus, 0); in process_media_player_call()
225 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setDataSourceAndHeaders() local
226 if (mp == NULL ) { in android_media_MediaPlayer_setDataSourceAndHeaders()
260 mp->setDataSource( in android_media_MediaPlayer_setDataSourceAndHeaders()
273 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setDataSourceFD() local
274 if (mp == NULL ) { in android_media_MediaPlayer_setDataSourceFD()
285 …process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException"… in android_media_MediaPlayer_setDataSourceFD()
291 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setDataSourceCallback() local
292 if (mp == NULL ) { in android_media_MediaPlayer_setDataSourceCallback()
302 …process_media_player_call(env, thiz, mp->setDataSource(callbackDataSource), "java/lang/RuntimeExce… in android_media_MediaPlayer_setDataSourceCallback()
314 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in decVideoSurfaceRef() local
315 if (mp == NULL) { in decVideoSurfaceRef()
328 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in setVideoSurface() local
329 if (mp == NULL) { in setVideoSurface()
362 mp->setVideoSurfaceTexture(new_st); in setVideoSurface()
374 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_prepare() local
375 if (mp == NULL ) { in android_media_MediaPlayer_prepare()
383 mp->setVideoSurfaceTexture(st); in android_media_MediaPlayer_prepare()
385 process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." ); in android_media_MediaPlayer_prepare()
391 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_prepareAsync() local
392 if (mp == NULL ) { in android_media_MediaPlayer_prepareAsync()
400 mp->setVideoSurfaceTexture(st); in android_media_MediaPlayer_prepareAsync()
402 …process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async fa… in android_media_MediaPlayer_prepareAsync()
409 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_start() local
410 if (mp == NULL ) { in android_media_MediaPlayer_start()
414 process_media_player_call( env, thiz, mp->start(), NULL, NULL ); in android_media_MediaPlayer_start()
421 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_stop() local
422 if (mp == NULL ) { in android_media_MediaPlayer_stop()
426 process_media_player_call( env, thiz, mp->stop(), NULL, NULL ); in android_media_MediaPlayer_stop()
433 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_pause() local
434 if (mp == NULL ) { in android_media_MediaPlayer_pause()
438 process_media_player_call( env, thiz, mp->pause(), NULL, NULL ); in android_media_MediaPlayer_pause()
444 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_isPlaying() local
445 if (mp == NULL ) { in android_media_MediaPlayer_isPlaying()
449 const jboolean is_playing = mp->isPlaying(); in android_media_MediaPlayer_isPlaying()
458 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setPlaybackParams() local
459 if (mp == NULL) { in android_media_MediaPlayer_setPlaybackParams()
473 status_t err = mp->getPlaybackSettings(&rate); in android_media_MediaPlayer_setPlaybackParams()
493 err = mp->setPlaybackSettings(rate); in android_media_MediaPlayer_setPlaybackParams()
504 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getPlaybackParams() local
505 if (mp == NULL) { in android_media_MediaPlayer_getPlaybackParams()
513 env, thiz, mp->getPlaybackSettings(&audioRate), in android_media_MediaPlayer_getPlaybackParams()
532 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setSyncParams() local
533 if (mp == NULL) { in android_media_MediaPlayer_setSyncParams()
548 status_t err = mp->getSyncSettings(&avsync, &videoFrameRate); in android_media_MediaPlayer_setSyncParams()
564 err = mp->setSyncSettings(avsync, scp.frameRateSet ? scp.frameRate : -1.f); in android_media_MediaPlayer_setSyncParams()
575 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getSyncParams() local
576 if (mp == NULL) { in android_media_MediaPlayer_getSyncParams()
584 env, thiz, mp->getSyncSettings(&scp.sync, &scp.frameRate), in android_media_MediaPlayer_getSyncParams()
613 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_seekTo() local
614 if (mp == NULL ) { in android_media_MediaPlayer_seekTo()
619 …process_media_player_call( env, thiz, mp->seekTo((int)msec, (MediaPlayerSeekMode)mode), NULL, NULL… in android_media_MediaPlayer_seekTo()
625 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_notifyAt() local
626 if (mp == NULL) { in android_media_MediaPlayer_notifyAt()
631 process_media_player_call( env, thiz, mp->notifyAt((int64_t)mediaTimeUs), NULL, NULL ); in android_media_MediaPlayer_notifyAt()
637 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getVideoWidth() local
638 if (mp == NULL ) { in android_media_MediaPlayer_getVideoWidth()
643 if (0 != mp->getVideoWidth(&w)) { in android_media_MediaPlayer_getVideoWidth()
654 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getVideoHeight() local
655 if (mp == NULL ) { in android_media_MediaPlayer_getVideoHeight()
660 if (0 != mp->getVideoHeight(&h)) { in android_media_MediaPlayer_getVideoHeight()
671 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_native_getMetrics() local
672 if (mp == NULL ) { in android_media_MediaPlayer_native_getMetrics()
679 status_t status = mp->getParameter(key, &p); in android_media_MediaPlayer_native_getMetrics()
695 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getCurrentPosition() local
696 if (mp == NULL ) { in android_media_MediaPlayer_getCurrentPosition()
701 process_media_player_call( env, thiz, mp->getCurrentPosition(&msec), NULL, NULL ); in android_media_MediaPlayer_getCurrentPosition()
709 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getDuration() local
710 if (mp == NULL ) { in android_media_MediaPlayer_getDuration()
715 process_media_player_call( env, thiz, mp->getDuration(&msec), NULL, NULL ); in android_media_MediaPlayer_getDuration()
724 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_reset() local
725 if (mp == NULL ) { in android_media_MediaPlayer_reset()
729 process_media_player_call( env, thiz, mp->reset(), NULL, NULL ); in android_media_MediaPlayer_reset()
736 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setAudioStreamType() local
737 if (mp == NULL ) { in android_media_MediaPlayer_setAudioStreamType()
741 …process_media_player_call( env, thiz, mp->setAudioStreamType((audio_stream_type_t) streamtype) , N… in android_media_MediaPlayer_setAudioStreamType()
747 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getAudioStreamType() local
748 if (mp == NULL ) { in android_media_MediaPlayer_getAudioStreamType()
753 process_media_player_call( env, thiz, mp->getAudioStreamType(&streamtype), NULL, NULL ); in android_media_MediaPlayer_getAudioStreamType()
762 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setParameter() local
763 if (mp == NULL ) { in android_media_MediaPlayer_setParameter()
769 status_t err = mp->setParameter(key, *request); in android_media_MediaPlayer_setParameter()
781 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setLooping() local
782 if (mp == NULL ) { in android_media_MediaPlayer_setLooping()
786 process_media_player_call( env, thiz, mp->setLooping(looping), NULL, NULL ); in android_media_MediaPlayer_setLooping()
793 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_isLooping() local
794 if (mp == NULL ) { in android_media_MediaPlayer_isLooping()
798 return mp->isLooping() ? JNI_TRUE : JNI_FALSE; in android_media_MediaPlayer_isLooping()
805 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setVolume() local
806 if (mp == NULL ) { in android_media_MediaPlayer_setVolume()
810 …process_media_player_call( env, thiz, mp->setVolume((float) leftVolume, (float) rightVolume), NULL… in android_media_MediaPlayer_setVolume()
950 sp<MediaPlayer> mp = new MediaPlayer(); in android_media_MediaPlayer_native_setup() local
951 if (mp == NULL) { in android_media_MediaPlayer_native_setup()
958 mp->setListener(listener); in android_media_MediaPlayer_native_setup()
961 setMediaPlayer(env, thiz, mp); in android_media_MediaPlayer_native_setup()
969 sp<MediaPlayer> mp = setMediaPlayer(env, thiz, 0); in android_media_MediaPlayer_release() local
970 if (mp != NULL) { in android_media_MediaPlayer_release()
972 mp->setListener(0); in android_media_MediaPlayer_release()
973 mp->disconnect(); in android_media_MediaPlayer_release()
981 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_native_finalize() local
982 if (mp != NULL) { in android_media_MediaPlayer_native_finalize()
991 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_set_audio_session_id() local
992 if (mp == NULL ) { in android_media_MediaPlayer_set_audio_session_id()
996 process_media_player_call( env, thiz, mp->setAudioSessionId((audio_session_t) sessionId), NULL, in android_media_MediaPlayer_set_audio_session_id()
1002 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_get_audio_session_id() local
1003 if (mp == NULL ) { in android_media_MediaPlayer_get_audio_session_id()
1008 return (jint) mp->getAudioSessionId(); in android_media_MediaPlayer_get_audio_session_id()
1015 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setAuxEffectSendLevel() local
1016 if (mp == NULL ) { in android_media_MediaPlayer_setAuxEffectSendLevel()
1020 process_media_player_call( env, thiz, mp->setAuxEffectSendLevel(level), NULL, NULL ); in android_media_MediaPlayer_setAuxEffectSendLevel()
1025 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_attachAuxEffect() local
1026 if (mp == NULL ) { in android_media_MediaPlayer_attachAuxEffect()
1030 process_media_player_call( env, thiz, mp->attachAuxEffect(effectId), NULL, NULL ); in android_media_MediaPlayer_attachAuxEffect()
1052 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setRetransmitEndpoint() local
1053 if (mp == NULL ) { in android_media_MediaPlayer_setRetransmitEndpoint()
1073 ret = mp->setRetransmitEndpoint(cAddrString, in android_media_MediaPlayer_setRetransmitEndpoint()
1121 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_applyVolumeShaper() local
1122 if (mp == nullptr) { in android_media_MediaPlayer_applyVolumeShaper()
1138 VolumeShaper::Status status = mp->applyVolumeShaper(configuration, operation); in android_media_MediaPlayer_applyVolumeShaper()
1148 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getVolumeShaperState() local
1149 if (mp == nullptr) { in android_media_MediaPlayer_getVolumeShaperState()
1153 sp<VolumeShaper::State> state = mp->getVolumeShaperState((int)id); in android_media_MediaPlayer_getVolumeShaperState()
1258 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_prepareDrm() local
1259 if (mp == NULL) { in android_media_MediaPlayer_prepareDrm()
1289 status_t err = mp->prepareDrm(uuid.array(), drmSessionId); in android_media_MediaPlayer_prepareDrm()
1309 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_releaseDrm() local
1310 if (mp == NULL ) { in android_media_MediaPlayer_releaseDrm()
1315 status_t err = mp->releaseDrm(); in android_media_MediaPlayer_releaseDrm()
1332 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_setOutputDevice() local
1333 if (mp == NULL) { in android_media_MediaPlayer_setOutputDevice()
1336 return mp->setOutputDevice(device_id) == NO_ERROR; in android_media_MediaPlayer_setOutputDevice()
1341 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_getRoutedDeviceId() local
1342 if (mp == NULL) { in android_media_MediaPlayer_getRoutedDeviceId()
1345 return mp->getRoutedDeviceId(); in android_media_MediaPlayer_getRoutedDeviceId()
1351 sp<MediaPlayer> mp = getMediaPlayer(env, thiz); in android_media_MediaPlayer_enableDeviceCallback() local
1352 if (mp == NULL) { in android_media_MediaPlayer_enableDeviceCallback()
1356 status_t status = mp->enableAudioDeviceCallback(enabled); in android_media_MediaPlayer_enableDeviceCallback()