Home
last modified time | relevance | path

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

/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java34 private MediaPlayer mMediaPlayer; field in SoundPlayerObject
91 if (mMediaPlayer != null) { in setBalance()
94 mMediaPlayer.setVolume(left, right); in setBalance()
106 if (mMediaPlayer != null) { in rewind()
107 mMediaPlayer.seekTo(0); in rewind()
118 mMediaPlayer = new MediaPlayer(); in setSoundWithResId()
121 mMediaPlayer.setAudioStreamType(mStreamType); in setSoundWithResId()
122 mMediaPlayer.setDataSource(context.getApplicationContext(), in setSoundWithResId()
124 mMediaPlayer.prepare(); in setSoundWithResId()
128 mMediaPlayer.setLooping(true); in setSoundWithResId()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerTest.java100 MediaPlayer mp = mMediaPlayer; in testVorbisCrash()
128 mMediaPlayer.setDataSource((String) null); in testPlayNullSourcePath()
403 initMediaPlayer(mMediaPlayer);
408 mMediaPlayer.setNextMediaPlayer(mMediaPlayer2);
413 mMediaPlayer.reset();
419 initMediaPlayer(mMediaPlayer);
424 mMediaPlayer.setNextMediaPlayer(mMediaPlayer2);
429 mMediaPlayer.reset();
434 initMediaPlayer(mMediaPlayer);
471 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
[all …]
DStreamingMediaPlayerTest.java207 mMediaPlayer.setDataSource(stream_url); in localHttpAudioStreamTest()
209 mMediaPlayer.setDisplay(getActivity().getSurfaceHolder()); in localHttpAudioStreamTest()
210 mMediaPlayer.setScreenOnWhilePlaying(true); in localHttpAudioStreamTest()
213 mMediaPlayer.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() { in localHttpAudioStreamTest()
219 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in localHttpAudioStreamTest()
228 mMediaPlayer.prepare(); in localHttpAudioStreamTest()
231 mMediaPlayer.start(); in localHttpAudioStreamTest()
233 assertFalse(mMediaPlayer.isPlaying()); in localHttpAudioStreamTest()
236 mMediaPlayer.start(); in localHttpAudioStreamTest()
239 mMediaPlayer.stop(); in localHttpAudioStreamTest()
[all …]
DMediaPlayerTestBase.java105 protected MediaPlayer mMediaPlayer = null; field in MediaPlayerTestBase
121 mMediaPlayer = new MediaPlayer(); in setUp()
135 if (mMediaPlayer != null) { in tearDown()
136 mMediaPlayer.release(); in tearDown()
137 mMediaPlayer = null; in tearDown()
155 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadResource()
164 mMediaPlayer.setVideoScalingMode(videoScalingMode); in loadResource()
179 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
199 mMediaPlayer.setDataSource(path); in playVideoWithRetries()
235 mMediaPlayer.setDisplay(mActivity.getSurfaceHolder()); in playLoadedVideo()
[all …]
DVideoSurfaceView.java39 private MediaPlayer mMediaPlayer = null; field in VideoSurfaceView
45 mMediaPlayer = mp; in VideoSurfaceView()
54 mRenderer.setMediaPlayer(mMediaPlayer); in onResume()
62 mMediaPlayer.start(); in startTest()
65 mMediaPlayer.setSurface(null); in startTest()
67 while (mMediaPlayer.isPlaying()) { in startTest()
84 private MediaPlayer mMediaPlayer; field in VideoSurfaceView.VideoRender
91 mMediaPlayer = player; in setMediaPlayer()
119 mMediaPlayer.setSurface(surface); in onSurfaceCreated()
123 mMediaPlayer.prepare(); in onSurfaceCreated()
DAudioManagerStub.java32 private MediaPlayer mMediaPlayer; field in AudioManagerStub
44 mMediaPlayer = MediaPlayer.create(this, MP3_TO_PLAY); in onCreate()
45 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in onCreate()
46 mMediaPlayer.setLooping(false); in onCreate()
47 mMediaPlayer.start(); in onCreate()
87 mMediaPlayer.stop(); in onActivityResult()
88 mMediaPlayer.release(); in onActivityResult()
DMediaPlayerFlakyNetworkTest.java147 mMediaPlayer.start(); in doPlayMp4Stream()
172 mMediaPlayer.start(); in doRandomOperations()
177 mMediaPlayer.start(); in doRandomOperations()
178 assertTrue(mMediaPlayer.isPlaying()); in doRandomOperations()
181 mMediaPlayer.pause(); in doRandomOperations()
182 assertFalse(mMediaPlayer.isPlaying()); in doRandomOperations()
185 mMediaPlayer.seekTo(random.nextInt(10000)); in doRandomOperations()
211 if (mMediaPlayer == null) { in createMediaPlayer()
212 mMediaPlayer = createMediaPlayerOnMainThread(); in createMediaPlayer()
217 MediaPlayer old = mMediaPlayer; in releaseMediaPlayer()
[all …]
DMediaPlayerSurfaceStubActivity.java34 private MediaPlayer mMediaPlayer = null; field in MediaPlayerSurfaceStubActivity
41 mMediaPlayer = new MediaPlayer(); in onCreate()
45 mMediaPlayer.setDataSource( in onCreate()
52 mVideoView = new VideoSurfaceView(this, mMediaPlayer); in onCreate()
DAudioEffectTest.java53 private MediaPlayer mMediaPlayer = null; field in AudioEffectTest
176 mMediaPlayer.setDataSource(afd.getFileDescriptor(), in test1_5AuxiliaryOnMediaPlayer()
183 mMediaPlayer.attachAuxEffect(mEffect.getId()); in test1_5AuxiliaryOnMediaPlayer()
184 mMediaPlayer.setAuxEffectSendLevel(1.0f); in test1_5AuxiliaryOnMediaPlayer()
216 mMediaPlayer.attachAuxEffect(mEffect.getId()); in test1_6AuxiliaryOnMediaPlayerFailure()
1004 mMediaPlayer = new MediaPlayer(); in createMediaPlayerLooper()
1007 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in createMediaPlayerLooper()
1016 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in createMediaPlayerLooper()
1038 if (mMediaPlayer != null) { in terminateMediaPlayerLooper()
1039 mMediaPlayer.release(); in terminateMediaPlayerLooper()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DCodecTest.java37 private static MediaPlayer mMediaPlayer; field in CodecTest
259 mMediaPlayer.setDataSource(filePath); in videoHeight()
260 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder()); in videoHeight()
261 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoHeight()
264 mMediaPlayer.prepare(); in videoHeight()
265 mMediaPlayer.start(); in videoHeight()
271 videoHeight = mMediaPlayer.getVideoHeight(); in videoHeight()
295 mMediaPlayer.setDataSource(filePath); in videoWidth()
296 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder()); in videoWidth()
297 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoWidth()
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DAudioPermissionTest.java37 MediaPlayer mMediaPlayer = null; field in AudioPermissionTest