Home
last modified time | relevance | path

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

/cts/tests/tests/media/player/src/android/media/player/cts/
DMediaPlayerTest.java176 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
189 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadResource()
198 mMediaPlayer.setVideoScalingMode(videoScalingMode); in loadResource()
217 mMediaPlayer.setOnErrorListener((mp, what, extra) -> { in testIfMediaServerDied()
218 assertSame(mp, mMediaPlayer); in testIfMediaServerDied()
224 mMediaPlayer.setOnCompletionListener(mp -> { in testIfMediaServerDied()
225 assertSame(mp, mMediaPlayer); in testIfMediaServerDied()
230 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
233 mMediaPlayer.prepare(); in testIfMediaServerDied()
234 mMediaPlayer.start(); in testIfMediaServerDied()
[all …]
DStreamingMediaPlayerTest.java281 mMediaPlayer.setDataSource(stream_url); in localHttpAudioStreamTest()
283 mMediaPlayer.setDisplay(getActivity().getSurfaceHolder()); in localHttpAudioStreamTest()
284 mMediaPlayer.setScreenOnWhilePlaying(true); in localHttpAudioStreamTest()
287 mMediaPlayer.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() { in localHttpAudioStreamTest()
293 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in localHttpAudioStreamTest()
302 mMediaPlayer.prepare(); in localHttpAudioStreamTest()
305 mMediaPlayer.start(); in localHttpAudioStreamTest()
307 assertFalse(mMediaPlayer.isPlaying()); in localHttpAudioStreamTest()
310 mMediaPlayer.start(); in localHttpAudioStreamTest()
313 mMediaPlayer.stop(); in localHttpAudioStreamTest()
[all …]
DVideoSurfaceView.java42 private MediaPlayer mMediaPlayer = null; field in VideoSurfaceView
48 mMediaPlayer = mp; in VideoSurfaceView()
57 mRenderer.setMediaPlayer(mMediaPlayer); in onResume()
65 mMediaPlayer.start(); in startTest()
68 mMediaPlayer.setSurface(null); in startTest()
70 while (mMediaPlayer.isPlaying()) { in startTest()
87 private MediaPlayer mMediaPlayer; field in VideoSurfaceView.VideoRender
94 mMediaPlayer = player; in setMediaPlayer()
122 mMediaPlayer.setSurface(surface); in onSurfaceCreated()
126 mMediaPlayer.prepare(); in onSurfaceCreated()
DMediaPlayerFlakyNetworkTest.java168 mMediaPlayer.start(); in doPlayMp4Stream()
193 mMediaPlayer.start(); in doRandomOperations()
198 mMediaPlayer.start(); in doRandomOperations()
199 assertTrue(mMediaPlayer.isPlaying()); in doRandomOperations()
202 mMediaPlayer.pause(); in doRandomOperations()
203 assertFalse(mMediaPlayer.isPlaying()); in doRandomOperations()
206 mMediaPlayer.seekTo(random.nextInt(10000)); in doRandomOperations()
232 if (mMediaPlayer == null) { in createMediaPlayer()
233 mMediaPlayer = createMediaPlayerOnMainThread(); in createMediaPlayer()
238 MediaPlayer old = mMediaPlayer; in releaseMediaPlayer()
[all …]
DMediaPlayerSurfaceStubActivity.java44 private MediaPlayer mMediaPlayer = null; field in MediaPlayerSurfaceStubActivity
51 mMediaPlayer = new MediaPlayer(); in onCreate()
60 mMediaPlayer.setDataSource( in onCreate()
75 mVideoView = new VideoSurfaceView(this, mMediaPlayer); in onCreate()
/cts/tests/tests/security/src/android/security/cts/
DMediaServerCrashTest.java48 private final MediaPlayer mMediaPlayer = new MediaPlayer(); field in MediaServerCrashTest
59 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in setUp()
62 assertTrue(mp == mMediaPlayer); in setUp()
69 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { in setUp()
72 assertTrue(mp == mMediaPlayer); in setUp()
77 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in setUp()
80 assertTrue(mp == mMediaPlayer); in setUp()
99 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
102 mMediaPlayer.prepareAsync(); in testIfMediaServerDied()
107 mMediaPlayer.start(); in testIfMediaServerDied()
[all …]
/cts/tests/tests/media/common/src/android/media/cts/
DMediaPlayerTestBase.java53 protected MediaPlayer mMediaPlayer = null; field in MediaPlayerTestBase
61 mMediaPlayer = new MediaPlayer(); in setUp()
68 if (mMediaPlayer != null) { in tearDown()
69 mMediaPlayer.release(); in tearDown()
70 mMediaPlayer = null; in tearDown()
110 mMediaPlayer.reset(); in playVideoWithRetries()
111 mMediaPlayer.setDataSource(path); in playVideoWithRetries()
141 mMediaPlayer.reset(); in playVideoWithRetries()
142 mMediaPlayer.setDataSource( in playVideoWithRetries()
178 mMediaPlayer.setDisplay(mActivity.getSurfaceHolder()); in playLoadedVideo()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DCtsConnection.java63 private final MediaPlayer mMediaPlayer; field in CtsConnection
73 mMediaPlayer = createMediaPlayer(); in CtsConnection()
75 mMediaPlayer = null; in CtsConnection()
105 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { in onHold()
107 mMediaPlayer.pause(); in onHold()
119 if (mMediaPlayer != null) { in onUnhold()
121 mMediaPlayer.start(); in onUnhold()
130 if (mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in onAnswer()
132 mMediaPlayer.start(); in onAnswer()
179 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { in setDisconnectedAndDestroy()
[all …]
/cts/tests/tests/media/drmframework/src/android/media/drmframework/cts/
DMediaPlayerDrmTestBase.java85 protected MediaPlayer mMediaPlayer = null; field in MediaPlayerDrmTestBase
100 mMediaPlayer = new MediaPlayer(); in setUp()
113 if (mMediaPlayer != null) { in tearDown()
114 mMediaPlayer.release(); in tearDown()
115 mMediaPlayer = null; in tearDown()
122 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in setOnErrorListener()
231 mMediaPlayer.stop(); in playModularDrmVideoWithRetries()
232 mMediaPlayer.reset(); in playModularDrmVideoWithRetries()
277 mMediaPlayer.setDataSource(mContext, file); in playLoadedModularDrmVideo_Generic()
283 mMediaPlayer.setDisplay(mActivity.getSurfaceHolder()); in playLoadedModularDrmVideo_Generic()
[all …]
/cts/tests/surfacecontrol/src/android/view/cts/util/
DCapturedActivityWithResource.java25 private MediaPlayer mMediaPlayer; field in CapturedActivityWithResource
30 mMediaPlayer = MediaPlayer.create(this, R.raw.colors_video); in onCreate()
31 mMediaPlayer.setLooping(true); in onCreate()
38 return mMediaPlayer; in getMediaPlayer()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java43 private MediaPlayer mMediaPlayer; field in SoundPlayerObject
254 if (mMediaPlayer != null) { in setBalance()
257 mMediaPlayer.setVolume(left, right); in setBalance()
269 if (mMediaPlayer != null) { in rewind()
270 mMediaPlayer.seekTo(0); in rewind()
304 mMediaPlayer = new MediaPlayer(); in setSoundWithResId()
307 mMediaPlayer.setAudioStreamType(mStreamType); in setSoundWithResId()
308 mMediaPlayer.setDataSource(mContext.getApplicationContext(), in setSoundWithResId()
310 mMediaPlayer.prepare(); in setSoundWithResId()
315 mMediaPlayer.setLooping(mLooping); in setSoundWithResId()
[all …]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DCodecTest.java39 private static MediaPlayer mMediaPlayer; field in CodecTest
265 mMediaPlayer.setDataSource(filePath); in videoHeight()
266 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder()); in videoHeight()
267 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoHeight()
270 mMediaPlayer.prepare(); in videoHeight()
271 mMediaPlayer.start(); in videoHeight()
277 videoHeight = mMediaPlayer.getVideoHeight(); in videoHeight()
301 mMediaPlayer.setDataSource(filePath); in videoWidth()
302 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder()); in videoWidth()
303 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener); in videoWidth()
[all …]
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DAudioFocusWithVdmTest.java170 private MediaPlayer mMediaPlayer; field in AudioFocusWithVdmTest.PlaybackHelperForTest
196 mMediaPlayer = MediaPlayer.create(mContext, R.raw.sine1khzs40dblong); in startPlayback()
197 mMediaPlayer.start(); in startPlayback()
202 if (mMediaPlayer != null) { in close()
203 mMediaPlayer.stop(); in close()
204 mMediaPlayer.release(); in close()
DAudioEffectTest.java67 private MediaPlayer mMediaPlayer = null; field in AudioEffectTest
205 mMediaPlayer.setDataSource(afd.getFileDescriptor(), in test1_5AuxiliaryOnMediaPlayer()
214 mMediaPlayer.attachAuxEffect(mEffect.getId()); in test1_5AuxiliaryOnMediaPlayer()
215 mMediaPlayer.setAuxEffectSendLevel(1.0f); in test1_5AuxiliaryOnMediaPlayer()
248 mMediaPlayer.attachAuxEffect(mEffect.getId()); in test1_6AuxiliaryOnMediaPlayerFailure()
1055 mMediaPlayer = new MediaPlayer(); in createMediaPlayerLooper()
1058 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { in createMediaPlayerLooper()
1067 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in createMediaPlayerLooper()
1089 if (mMediaPlayer != null) { in terminateMediaPlayerLooper()
1090 mMediaPlayer.release(); in terminateMediaPlayerLooper()
/cts/tests/surfacecontrol/src/android/view/surfacecontrol/cts/
DSurfaceViewSyncTest.java70 private MediaPlayer mMediaPlayer; field in SurfaceViewSyncTest
75 mMediaPlayer = mActivity.getMediaPlayer(); in setup()
163 mMediaPlayer.setSurface(holder.getSurface());
164 mMediaPlayer.start();
174 mMediaPlayer.pause();
175 mMediaPlayer.setSurface(null);
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Renderer/
DComplexMovementRenderer.java63 private MediaPlayer mMediaPlayer; field in ComplexMovementRenderer
70 mMediaPlayer = MediaPlayer.create(context, R.raw.ring_sound); in ComplexMovementRenderer()
202 mMediaPlayer.start(); in onRingEntered()