Home
last modified time | relevance | path

Searched refs:mMediaPlayer (Results 1 – 14 of 14) 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/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
DIllustrationVideoView.java56 protected MediaPlayer mMediaPlayer; field in IllustrationVideoView
123 if (mMediaPlayer != null) { in createMediaPlayer()
124 mMediaPlayer.release(); in createMediaPlayer()
130 mMediaPlayer = MediaPlayer.create(getContext(), mVideoResId); in createMediaPlayer()
132 mMediaPlayer.setSurface(mSurface); in createMediaPlayer()
133 mMediaPlayer.setOnPreparedListener(this); in createMediaPlayer()
134 mMediaPlayer.setOnSeekCompleteListener(this); in createMediaPlayer()
135 mMediaPlayer.setOnInfoListener(this); in createMediaPlayer()
137 float aspectRatio = (float) mMediaPlayer.getVideoHeight() / mMediaPlayer.getVideoWidth(); in createMediaPlayer()
160 if (mMediaPlayer != null) { in release()
[all …]
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/
DPlayback.java77 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/
DVideoView.java110 private MediaPlayer mMediaPlayer = null; field in VideoView
337 if (mMediaPlayer == null) { in addSubtitleSource()
341 mMediaPlayer.addSubtitleSource(is, format); in addSubtitleSource()
344 mMediaPlayer, MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE, 0); in addSubtitleSource()
350 if (mMediaPlayer != null) { in stopPlayback()
351 mMediaPlayer.stop(); in stopPlayback()
352 mMediaPlayer.release(); in stopPlayback()
353 mMediaPlayer = null; in stopPlayback()
375 mMediaPlayer = new MediaPlayer(); in openVideo()
380 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/support/samples/Support7Demos/src/com/example/android/supportv7/media/
DLocalPlayer.java61 private MediaPlayer mMediaPlayer; field in LocalPlayer
99 if (mMediaPlayer != null) { in release()
100 mMediaPlayer.stop(); in release()
101 mMediaPlayer.release(); in release()
102 mMediaPlayer = null; in release()
115 mMediaPlayer.setDataSource(mContext, item.getUri()); in play()
116 mMediaPlayer.prepareAsync(); in play()
140 mMediaPlayer.seekTo(pos); in seek()
155 item.setDuration(mMediaPlayer.getDuration()); in getStatus()
157 mSeekToPos : mMediaPlayer.getCurrentPosition()); in getStatus()
[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.java55 private static MediaPlayer mMediaPlayer; field in CodecTest
280 mMediaPlayer.setDataSource(filePath); in videoHeight()
281 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoHeight()
282 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoHeight()
285 mMediaPlayer.prepare(); in videoHeight()
286 mMediaPlayer.start(); in videoHeight()
292 videoHeight = mMediaPlayer.getVideoHeight(); in videoHeight()
316 mMediaPlayer.setDataSource(filePath); in videoWidth()
317 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder()); in videoWidth()
318 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/media/java/android/media/
DMediaPlayer.java3177 private MediaPlayer mMediaPlayer; field in MediaPlayer.EventHandler
3181 mMediaPlayer = mp; in EventHandler()
3186 if (mMediaPlayer.mNativeContext == 0) { in handleMessage()
3205 onPreparedListener.onPrepared(mMediaPlayer); in handleMessage()
3237 mOnCompletionInternalListener.onCompletion(mMediaPlayer); in handleMessage()
3240 onCompletionListener.onCompletion(mMediaPlayer); in handleMessage()
3267 onBufferingUpdateListener.onBufferingUpdate(mMediaPlayer, msg.arg1); in handleMessage()
3273 onSeekCompleteListener.onSeekComplete(mMediaPlayer); in handleMessage()
3281 timeProvider.onSeekComplete(mMediaPlayer); in handleMessage()
3290 mMediaPlayer, msg.arg1, msg.arg2); in handleMessage()
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/
DIllustrationVideoViewTest.java85 assertNotNull(mView.mMediaPlayer); in testPausedWhenWindowFocusLost()
108 assertNotNull(mView.mMediaPlayer); in testSurfaceReleasedWhenTextureDestroyed()
/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()