Home
last modified time | relevance | path

Searched refs:mMediaPlayer (Results 1 – 12 of 12) sorted by relevance

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DMediaPlayerStateUnitTestTemplate.java47 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/
DSimplePlayer.java57 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()
119mMediaPlayer.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/base/core/java/android/widget/
DVideoView.java98 private MediaPlayer mMediaPlayer = null; field in VideoView
293 if (mMediaPlayer == null) { in addSubtitleSource()
297 mMediaPlayer.addSubtitleSource(is, format); in addSubtitleSource()
300 mMediaPlayer, MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE, 0); in addSubtitleSource()
308 if (mMediaPlayer != null) { in stopPlayback()
309 mMediaPlayer.stop(); in stopPlayback()
310 mMediaPlayer.release(); in stopPlayback()
311 mMediaPlayer = null; in stopPlayback()
329 mMediaPlayer = new MediaPlayer(); in openVideo()
334 context, mMediaPlayer.getMediaTimeProvider(), mMediaPlayer); in openVideo()
[all …]
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videosrc/
DMediaSource.java97 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/base/media/tests/MediaDump/src/com/android/mediadump/
DVideoDumpView.java71 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/
DCodecTest.java49 private static MediaPlayer mMediaPlayer; field in CodecTest
272 mMediaPlayer.setDataSource(filePath); in videoHeight()
273 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoHeight()
274 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoHeight()
277 mMediaPlayer.prepare(); in videoHeight()
278 mMediaPlayer.start(); in videoHeight()
284 videoHeight = mMediaPlayer.getVideoHeight(); in videoHeight()
308 mMediaPlayer.setDataSource(filePath); in videoWidth()
309 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoWidth()
310 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoWidth()
[all …]
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
DScoAudioTest.java332 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()
370mMediaPlayer.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/
DNativeMedia.java48 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/
Dmediaplayer.jd291 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/media/java/android/media/
DMediaPlayer.java2506 private MediaPlayer mMediaPlayer; field in MediaPlayer.EventHandler
2510 mMediaPlayer = mp; in EventHandler()
2515 if (mMediaPlayer.mNativeContext == 0) { in handleMessage()
2523 mOnPreparedListener.onPrepared(mMediaPlayer); in handleMessage()
2528 mOnCompletionListener.onCompletion(mMediaPlayer); in handleMessage()
2547 mOnBufferingUpdateListener.onBufferingUpdate(mMediaPlayer, msg.arg1); in handleMessage()
2552 mOnSeekCompleteListener.onSeekComplete(mMediaPlayer); in handleMessage()
2558 mTimeProvider.onSeekComplete(mMediaPlayer); in handleMessage()
2564 mOnVideoSizeChangedListener.onVideoSizeChanged(mMediaPlayer, msg.arg1, msg.arg2); in handleMessage()
2571 error_was_handled = mOnErrorListener.onError(mMediaPlayer, msg.arg1, msg.arg2); in handleMessage()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioEffectTest.java54 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()
/frameworks/base/docs/html/training/tv/playback/
Dnow-playing.jd92 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) {
93 position = mMediaPlayer.getCurrentPosition();