/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | MediaPlayerStateUnitTestTemplate.java | 47 private MediaPlayer mMediaPlayer = null; field in MediaPlayerStateUnitTestTemplate 114 mMediaPlayer = new MediaPlayer(); in initializeMessageLooper() 115 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in initializeMessageLooper() 129 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in initializeMessageLooper() 158 mMethodUnderTest.invokeMethodUnderTest(mMediaPlayer); in callMediaPlayerMethodUnderTestInState() 176 mMediaPlayer.reset(); in setMediaPlayerToIdleStateAfterReset() 177 mMediaPlayer.setDataSource(TEST_PATH); in setMediaPlayerToIdleStateAfterReset() 178 mMediaPlayer.prepare(); in setMediaPlayerToIdleStateAfterReset() 179 mMediaPlayer.reset(); in setMediaPlayerToIdleStateAfterReset() 188 mMediaPlayer.reset(); in setMediaPlayerToInitializedState() [all …]
|
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/ |
D | SimplePlayer.java | 57 MediaPlayer mMediaPlayer; field in SimplePlayer 107 if (mMediaPlayer == null || !mMediaPlayer.isPlaying()){ in playOrPause() 108 if (mMediaPlayer == null) { in playOrPause() 110 mMediaPlayer = new MediaPlayer(); in playOrPause() 112 mMediaPlayer.setAudioSessionId(mSession); in playOrPause() 119 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause() 123 mMediaPlayer.setDataSource(mFileName); in playOrPause() 125 mMediaPlayer.setAudioStreamType(mStreamType); in playOrPause() 126 mMediaPlayer.prepare(); in playOrPause() 127 mMediaPlayer.setLooping(true); in playOrPause() [all …]
|
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/ |
D | Playback.java | 77 private MediaPlayer mMediaPlayer; field in Playback 138 return mPlayOnFocusGain || (mMediaPlayer != null && mMediaPlayer.isPlaying()); in isPlaying() 142 return mMediaPlayer != null ? in getCurrentStreamPosition() 143 mMediaPlayer.getCurrentPosition() : mCurrentPosition; in getCurrentStreamPosition() 157 if (mState == PlaybackState.STATE_PAUSED && !mediaHasChanged && mMediaPlayer != null) { in play() 172 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in play() 173 mMediaPlayer.setDataSource(source); in play() 180 mMediaPlayer.prepareAsync(); in play() 203 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { in pause() 204 mMediaPlayer.pause(); in pause() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | VideoView.java | 100 private MediaPlayer mMediaPlayer = null; field in VideoView 285 if (mMediaPlayer == null) { in addSubtitleSource() 289 mMediaPlayer.addSubtitleSource(is, format); in addSubtitleSource() 292 mMediaPlayer, MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE, 0); in addSubtitleSource() 298 if (mMediaPlayer != null) { in stopPlayback() 299 mMediaPlayer.stop(); in stopPlayback() 300 mMediaPlayer.release(); in stopPlayback() 301 mMediaPlayer = null; in stopPlayback() 322 mMediaPlayer = new MediaPlayer(); in openVideo() 327 context, mMediaPlayer.getMediaTimeProvider(), mMediaPlayer); in openVideo() [all …]
|
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videosrc/ |
D | MediaSource.java | 97 private MediaPlayer mMediaPlayer; field in MediaSource 223 if (mMediaPlayer == null) { in process() 250 mMediaPlayer.release(); in process() 255 mMediaPlayer.start(); in process() 347 if (mMediaPlayer.isPlaying()) { in close() 348 mMediaPlayer.stop(); in close() 357 mMediaPlayer.release(); in close() 358 mMediaPlayer = null; in close() 396 mMediaPlayer.setLooping(mLooping); in fieldPortValueUpdated() 409 mMediaPlayer.setVolume(mVolume, mVolume); in fieldPortValueUpdated() [all …]
|
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/media/ |
D | LocalPlayer.java | 60 private MediaPlayer mMediaPlayer; field in LocalPlayer 98 if (mMediaPlayer != null) { in release() 99 mMediaPlayer.stop(); in release() 100 mMediaPlayer.release(); in release() 101 mMediaPlayer = null; in release() 114 mMediaPlayer.setDataSource(mContext, item.getUri()); in play() 115 mMediaPlayer.prepareAsync(); in play() 139 mMediaPlayer.seekTo(pos); in seek() 154 item.setDuration(mMediaPlayer.getDuration()); in getStatus() 156 mSeekToPos : mMediaPlayer.getCurrentPosition()); in getStatus() [all …]
|
/frameworks/base/media/tests/MediaDump/src/com/android/mediadump/ |
D | VideoDumpView.java | 71 private MediaPlayer mMediaPlayer = null; field in VideoDumpView 130 mMediaPlayer = new MediaPlayer(); in onResume() 132 mMediaPlayer.setDataSource(VideoDumpConfig.VIDEO_URI); in onResume() 155 mRenderer.setMediaPlayer(mMediaPlayer); in onResume() 163 mMediaPlayer.start(); in start() 167 mMediaPlayer.pause(); in pause() 178 if (mMediaPlayer != null) { in stopPlayback() 179 mMediaPlayer.stop(); in stopPlayback() 180 mMediaPlayer.release(); in stopPlayback() 181 mMediaPlayer = null; in stopPlayback() [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/ |
D | CodecTest.java | 49 private static MediaPlayer mMediaPlayer; field in CodecTest 273 mMediaPlayer.setDataSource(filePath); in videoHeight() 274 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoHeight() 275 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoHeight() 278 mMediaPlayer.prepare(); in videoHeight() 279 mMediaPlayer.start(); in videoHeight() 285 videoHeight = mMediaPlayer.getVideoHeight(); in videoHeight() 309 mMediaPlayer.setDataSource(filePath); in videoWidth() 310 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoWidth() 311 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoWidth() [all …]
|
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ |
D | ScoAudioTest.java | 332 private MediaPlayer mMediaPlayer; field in ScoAudioTest.SimplePlayerController 355 … Log.e(TAG, "playOrPause playing: "+((mMediaPlayer == null)?false:!mMediaPlayer.isPlaying())+ in playOrPause() 356 " mMediaPlayer: "+mMediaPlayer+ in playOrPause() 359 if (mMediaPlayer == null || !mMediaPlayer.isPlaying()){ in playOrPause() 360 if (mMediaPlayer == null) { in playOrPause() 366 mMediaPlayer = new MediaPlayer(); in playOrPause() 370 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause() 374 mMediaPlayer.setDataSource(mFileName); in playOrPause() 376 mMediaPlayer.setAudioStreamType(mStreamType); in playOrPause() 377 mMediaPlayer.prepare(); in playOrPause() [all …]
|
/frameworks/wilhelm/tests/native-media/src/com/example/nativemedia/ |
D | NativeMedia.java | 48 MediaPlayer mMediaPlayer; field in NativeMedia 125 mMediaPlayer = new MediaPlayer(); in onCreate() 128 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { in onCreate() 143 mMediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() { in onCreate() 227 mSelectedVideoSink.useAsSinkForJava(mMediaPlayer); in onCreate() 233 mMediaPlayer.setDataSource(mSourceString); in onCreate() 237 mMediaPlayer.prepareAsync(); in onCreate() 239 } else if (mMediaPlayer.isPlaying()) { in onCreate() 240 mMediaPlayer.pause(); in onCreate() 242 mMediaPlayer.start(); in onCreate() [all …]
|
/frameworks/base/docs/html/guide/topics/media/ |
D | mediaplayer.jd | 291 MediaPlayer mMediaPlayer = null; 296 mMediaPlayer = ... // initialize it here 297 mMediaPlayer.setOnPreparedListener(this); 298 mMediaPlayer.prepareAsync(); // prepare async to not block main thread 322 MediaPlayer mMediaPlayer; 327 mMediaPlayer.setOnErrorListener(this); 371 mMediaPlayer = new MediaPlayer(); 373 mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); 553 if (mMediaPlayer == null) initMediaPlayer(); 554 else if (!mMediaPlayer.isPlaying()) mMediaPlayer.start(); [all …]
|
/frameworks/base/docs/html-intl/intl/ja/training/tv/playback/ |
D | now-playing.jd | 69 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { 70 position = mMediaPlayer.getCurrentPosition();
|
/frameworks/base/media/java/android/media/ |
D | MediaPlayer.java | 2845 private MediaPlayer mMediaPlayer; field in MediaPlayer.EventHandler 2849 mMediaPlayer = mp; in EventHandler() 2854 if (mMediaPlayer.mNativeContext == 0) { in handleMessage() 2872 onPreparedListener.onPrepared(mMediaPlayer); in handleMessage() 2879 onCompletionListener.onCompletion(mMediaPlayer); in handleMessage() 2906 onBufferingUpdateListener.onBufferingUpdate(mMediaPlayer, msg.arg1); in handleMessage() 2912 onSeekCompleteListener.onSeekComplete(mMediaPlayer); in handleMessage() 2920 timeProvider.onSeekComplete(mMediaPlayer); in handleMessage() 2929 mMediaPlayer, msg.arg1, msg.arg2); in handleMessage() 2938 error_was_handled = onErrorListener.onError(mMediaPlayer, msg.arg1, msg.arg2); in handleMessage() [all …]
|
/frameworks/base/docs/html/training/tv/playback/ |
D | now-playing.jd | 90 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { 91 position = mMediaPlayer.getCurrentPosition();
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/ |
D | MediaAudioEffectTest.java | 54 private MediaPlayer mMediaPlayer = null; field in MediaAudioEffectTest 370 mMediaPlayer.attachAuxEffect(effect.getId()); in test1_6AuxiliaryOnMediaPlayerFailure() 1362 mMediaPlayer = new MediaPlayer(); in createMediaPlayerLooper() 1363 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in createMediaPlayerLooper() 1372 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in createMediaPlayerLooper() 1395 if (mMediaPlayer != null) { in terminateMediaPlayerLooper() 1396 mMediaPlayer.release(); in terminateMediaPlayerLooper()
|