Home
last modified time | relevance | path

Searched refs:mp (Results 1 – 25 of 32) sorted by relevance

12

/cts/tests/tests/mediastress/src/android/mediastress/cts/
DCodecTest.java82 MediaPlayer mp = new MediaPlayer(); in getDuration() local
84 mp.setDataSource(filePath); in getDuration()
85 mp.prepare(); in getDuration()
89 int duration = mp.getDuration(); in getDuration()
91 mp.release(); in getDuration()
101 MediaPlayer mp = new MediaPlayer(); in getCurrentPosition() local
103 mp.setDataSource(filePath); in getCurrentPosition()
105 mp.prepare(); in getCurrentPosition()
106 mp.start(); in getCurrentPosition()
109 mp.pause(); in getCurrentPosition()
[all …]
DMediaRecorderStressTest.java380 MediaPlayer mp = new MediaPlayer(); in validateRecordedVideo() local
381 mp.setDataSource(recordedFile); in validateRecordedVideo()
382 mp.prepare(); in validateRecordedVideo()
383 int duration = mp.getDuration(); in validateRecordedVideo()
387 mp.release(); in validateRecordedVideo()
451 MediaPlayer mp = new MediaPlayer(); in testStressRecordVideoAndPlayback() local
452 mp.setDataSource(filename); in testStressRecordVideoAndPlayback()
453 mp.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder()); in testStressRecordVideoAndPlayback()
454 mp.prepare(); in testStressRecordVideoAndPlayback()
455 mp.start(); in testStressRecordVideoAndPlayback()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayer2Test.java131 MediaPlayer2 mp = mPlayer; in testVorbisCrash() local
141 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in testVorbisCrash()
148 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in testVorbisCrash()
164 mp.setDataSource(new DataSourceDesc.Builder() in testVorbisCrash()
168 mp.setMediaPlayer2EventCallback(mExecutor, ecb); in testVorbisCrash()
170 mp.prepare(); in testVorbisCrash()
179 mp.reset(); in testVorbisCrash()
190 public void onCallCompleted(MediaPlayer2 mp, DataSourceDesc dsd, int what, int status) { in testPlayNullSourcePath()
225 MediaPlayer2 mp = createMediaPlayer2(mContext, uri); in testPlayAudioFromDataURI() local
233 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in testPlayAudioFromDataURI()
[all …]
DMediaPlayerTest.java135 public boolean onError(MediaPlayer mp, int what, int extra) { in testIfMediaServerDied()
136 assertTrue(mp == mMediaPlayer); in testIfMediaServerDied()
145 public void onCompletion(MediaPlayer mp) { in testIfMediaServerDied()
146 assertTrue(mp == mMediaPlayer); in testIfMediaServerDied()
169 MediaPlayer mp = mMediaPlayer; in testVorbisCrash() local
181 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testVorbisCrash()
183 mp.prepare(); in testVorbisCrash()
191 mp.reset(); in testVorbisCrash()
220 MediaPlayer mp = MediaPlayer.create(mContext, uri); in testPlayAudioFromDataURI() local
223 mp.setAudioStreamType(AudioManager.STREAM_MUSIC); in testPlayAudioFromDataURI()
[all …]
DMediaPlayer2TestBase.java101 MediaPlayer2 mp = MediaPlayer2.create(); in createMediaPlayer2() local
104 mp.setAudioAttributes(aa); in createMediaPlayer2()
105 mp.setAudioSessionId(audioSessionId); in createMediaPlayer2()
106 mp.setDataSource(new DataSourceDesc.Builder() in createMediaPlayer2()
110 mp.setDisplay(holder); in createMediaPlayer2()
117 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in createMediaPlayer2()
123 mp.setMediaPlayer2EventCallback(executor, ecb); in createMediaPlayer2()
124 mp.prepare(); in createMediaPlayer2()
126 mp.clearMediaPlayer2EventCallback(); in createMediaPlayer2()
128 return mp; in createMediaPlayer2()
[all …]
DLoudnessEnhancerTest.java142 MediaPlayer mp = null; in test3_0MeasureGainChange() local
146 mp = MediaPlayer.create(getContext(), R.raw.sine1khzm40db); in test3_0MeasureGainChange()
149 assertNotNull("null MediaPlayer", mp); in test3_0MeasureGainChange()
157 mp.getAudioSessionId()); in test3_0MeasureGainChange()
165 int sessionId = mp.getAudioSessionId(); in test3_0MeasureGainChange()
170 mp.setLooping(true); in test3_0MeasureGainChange()
171 mp.start(); in test3_0MeasureGainChange()
181 int currentPosition = mp.getCurrentPosition(); in test3_0MeasureGainChange()
186 currentPosition = mp.getCurrentPosition(); in test3_0MeasureGainChange()
224 if (mp != null) { in test3_0MeasureGainChange()
[all …]
DVisualizerTest.java294 MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.sine1khzm40db); in test4_1MeasurePeakRms() local
298 assertNotNull("null MediaPlayer", mp); in test4_1MeasurePeakRms()
306 mp.getAudioSessionId()); in test4_1MeasurePeakRms()
314 getVisualizer(mp.getAudioSessionId()); in test4_1MeasurePeakRms()
315 mp.setLooping(true); in test4_1MeasurePeakRms()
316 mp.start(); in test4_1MeasurePeakRms()
325 int currentPosition = mp.getCurrentPosition(); in test4_1MeasurePeakRms()
330 currentPosition = mp.getCurrentPosition(); in test4_1MeasurePeakRms()
337 mp.stop(); in test4_1MeasurePeakRms()
338 mp.release(); in test4_1MeasurePeakRms()
[all …]
DStreamingMediaPlayer2Test.java370 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in localHttpAudioStreamTest()
375 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in localHttpAudioStreamTest()
434 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in localHttpsAudioStreamTest()
439 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in localHttpsAudioStreamTest()
477 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in doTestBuffering()
481 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in doTestBuffering()
487 public void onCallCompleted(MediaPlayer2 mp, DataSourceDesc dsd, in doTestBuffering()
609 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in testPlayHlsStreamWithTimedId3()
626 public void onTimedMetaDataAvailable(MediaPlayer2 mp, DataSourceDesc dsd, in testPlayHlsStreamWithTimedId3()
629 long pos = mp.getCurrentPosition(); in testPlayHlsStreamWithTimedId3()
[all …]
DStreamingMediaPlayerTest.java306 public void onBufferingUpdate(MediaPlayer mp, int percent) { in localHttpAudioStreamTest()
312 public boolean onError(MediaPlayer mp, int what, int extra) { in localHttpAudioStreamTest()
360 public void onBufferingUpdate(MediaPlayer mp, int percent) { in localHttpsAudioStreamTest()
366 public boolean onError(MediaPlayer mp, int what, int extra) { in localHttpsAudioStreamTest()
424 public void onBufferingUpdate(MediaPlayer mp, int percent) { in doTestBuffering()
430 public boolean onError(MediaPlayer mp, int what, int extra) { in doTestBuffering()
498 public void onTimedMetaDataAvailable(MediaPlayer mp, TimedMetaData md) { in testPlayHlsStreamWithTimedId3()
500 int pos = mp.getCurrentPosition(); in testPlayHlsStreamWithTimedId3()
533 public void onCompletion(MediaPlayer mp) { in testPlayHlsStreamWithTimedId3()
623 final MediaPlayer mp = worker.getPlayer(); in testBlockingReadRelease() local
[all …]
DMediaPlayerDrmTestBase.java125 public boolean onError(MediaPlayer mp, int what, int extra) { in setOnErrorListener()
274 public void onVideoSizeChanged(MediaPlayer mp, int w, int h) { in playLoadedModularDrmVideo_Generic()
281 public boolean onError(MediaPlayer mp, int what, int extra) { in playLoadedModularDrmVideo_Generic()
319 public void onCompletion(MediaPlayer mp) { in playLoadedModularDrmVideo_Generic()
372 public void onDrmInfo(MediaPlayer mp, DrmInfo drmInfo) { in preparePlayerAndDrm_V1_asyncDrmSetup()
390 public void onPrepared(MediaPlayer mp) { in preparePlayerAndDrm_V1_asyncDrmSetup()
412 public void onDrmConfig(MediaPlayer mp) { in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
417 String level = mp.getDrmPropertyString(SECURITY_LEVEL_PROPERTY); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
420 mp.setDrmPropertyString(SECURITY_LEVEL_PROPERTY, WIDEVINE_SECURITY_LEVEL_3); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
421 level = mp.getDrmPropertyString(SECURITY_LEVEL_PROPERTY); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
[all …]
D.goutputstream-9KZYJZ370 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
375 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
434 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
439 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
477 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
481 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
487 public void onCallCompleted(MediaPlayer2 mp, DataSourceDesc dsd,
609 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) {
626 public void onTimedMetaDataAvailable(MediaPlayer2 mp, DataSourceDesc dsd,
629 long pos = mp.getCurrentPosition();
[all …]
DVideoSurfaceView.java43 public VideoSurfaceView(Context context, MediaPlayer mp) { in VideoSurfaceView() argument
47 mMediaPlayer = mp; in VideoSurfaceView()
DMediaPlayer2DrmTestBase.java277 public void onVideoSizeChanged(MediaPlayer2 mp, DataSourceDesc dsd, int w, int h) { in playLoadedModularDrmVideo_Generic()
283 public void onError(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in playLoadedModularDrmVideo_Generic()
288 public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, int what, int extra) { in playLoadedModularDrmVideo_Generic()
298 public void onCallCompleted(MediaPlayer2 mp, DataSourceDesc dsd, in playLoadedModularDrmVideo_Generic()
389 public void onDrmInfo(MediaPlayer2 mp, DataSourceDesc dsd, DrmInfo drmInfo) { in preparePlayerAndDrm_V1_asyncDrmSetup()
423 public void onDrmConfig(MediaPlayer2 mp, DataSourceDesc dsd) { in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
428 String level = mp.getDrmPropertyString(securityLevelProperty); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
431 mp.setDrmPropertyString(securityLevelProperty, widevineSecurityLevel3); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
432 level = mp.getDrmPropertyString(securityLevelProperty); in preparePlayerAndDrm_V2_syncDrmSetupPlusConfig()
465 public void onDrmInfo(MediaPlayer2 mp, DataSourceDesc dsd, DrmInfo drmInfo) { in preparePlayerAndDrm_V3_asyncDrmSetupPlusDrmPreparedListener()
[all …]
DMediaPlayerTestBase.java228 public void onVideoSizeChanged(MediaPlayer mp, int w, int h) { in playLoadedVideo()
245 public boolean onError(MediaPlayer mp, int what, int extra) { in playLoadedVideo()
252 public boolean onInfo(MediaPlayer mp, int what, int extra) { in playLoadedVideo()
339 public boolean onError(MediaPlayer mp, int what, int extra) { in setOnErrorListener()
DExtractDecodeEditEncodeMuxTest.java545 final MediaPlayer mp = new MediaPlayer(); in extractDecodeEditEncodeMux() local
548 mp.setOnErrorListener(new MediaPlayer.OnErrorListener() { in extractDecodeEditEncodeMux()
558 mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { in extractDecodeEditEncodeMux()
565 mp.setDataSource(mOutputFile); in extractDecodeEditEncodeMux()
566 mp.setDisplay(activity.getSurfaceHolder()); in extractDecodeEditEncodeMux()
567 mp.prepare(); in extractDecodeEditEncodeMux()
568 mp.start(); in extractDecodeEditEncodeMux()
573 mp.release(); in extractDecodeEditEncodeMux()
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DReadDefaultUris.java59 MediaPlayer mp = new MediaPlayer(); in playUri() local
60 assertNotNull(mp); in playUri()
61 mp.setDataSource(mContext, uri); in playUri()
62 mp.setAudioAttributes( in playUri()
64 mp.prepare(); in playUri()
65 mp.start(); in playUri()
67 mp.stop(); in playUri()
68 mp.release(); in playUri()
/cts/tests/tests/security/src/android/security/cts/
DEffectBundleTest.java262 MediaPlayer mp = null; in eqSetParamProperties() local
266 mp = MediaPlayer.create(getInstrumentation().getContext(), getMediaId(media)); in eqSetParamProperties()
267 eq = new Equalizer(0 /*priority*/, mp.getAudioSessionId()); in eqSetParamProperties()
296 if (mp != null) { in eqSetParamProperties()
297 mp.release(); in eqSetParamProperties()
304 MediaPlayer mp = null; in eqGetParamFreqRangeCommand() local
308 mp = MediaPlayer.create(getInstrumentation().getContext(), getMediaId(media)); in eqGetParamFreqRangeCommand()
309 eq = new Equalizer(0 /*priority*/, mp.getAudioSessionId()); in eqGetParamFreqRangeCommand()
347 if (mp != null) { in eqGetParamFreqRangeCommand()
348 mp.release(); in eqGetParamFreqRangeCommand()
[all …]
DVisualizerEffectTest.java55 MediaPlayer mp = null; in testVisualizer_MalformedConstructor() local
57 mp = MediaPlayer.create(getContext(), R.raw.good); in testVisualizer_MalformedConstructor()
61 descriptors[visualizerIndex].uuid, 0, mp.getAudioSessionId()); in testVisualizer_MalformedConstructor()
73 if (mp != null) { in testVisualizer_MalformedConstructor()
74 mp.release(); in testVisualizer_MalformedConstructor()
DMediaServerCrashTest.java63 public boolean onError(MediaPlayer mp, int what, int extra) { in setUp()
64 assertTrue(mp == mMediaPlayer); in setUp()
73 public void onPrepared(MediaPlayer mp) { in setUp()
74 assertTrue(mp == mMediaPlayer); in setUp()
81 public void onCompletion(MediaPlayer mp) { in setUp()
82 assertTrue(mp == mMediaPlayer); in setUp()
DStagefrightTest.java970 public boolean onError(MediaPlayer mp, int newWhat, int extra) { in onError() argument
984 public void onPrepared(MediaPlayer mp) { in onPrepared() argument
985 mp.start(); in onPrepared()
989 public void onCompletion(MediaPlayer mp) { in onCompletion() argument
1077 MediaPlayer mp = new MediaPlayer(); in doStagefrightTestMediaPlayer()
1078 mp.setOnErrorListener(mpcl); in doStagefrightTestMediaPlayer()
1079 mp.setOnPreparedListener(mpcl); in doStagefrightTestMediaPlayer()
1080 mp.setOnCompletionListener(mpcl); in doStagefrightTestMediaPlayer()
1082 mp.setSurface(surface); in doStagefrightTestMediaPlayer()
1089 mp.setDataSource(fd.getFileDescriptor(), in doStagefrightTestMediaPlayer()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DPixelCopyVideoSourceActivity.java39 mVideoView.setOnPreparedListener(mp -> { in onCreate()
40 mp.setLooping(true); in onCreate()
44 mVideoView.setOnErrorListener((mp, what, extra) -> { in onCreate() argument
/cts/tests/tests/speech/src/android/speech/tts/cts/
DTextToSpeechWrapper.java371 MediaPlayer mp = null; in isSoundFile() local
373 mp = new MediaPlayer(); in isSoundFile()
374 mp.setDataSource(filePath); in isSoundFile()
375 mp.prepare(); in isSoundFile()
376 mp.start(); in isSoundFile()
377 mp.stop(); in isSoundFile()
383 if (mp != null) { in isSoundFile()
384 mp.release(); in isSoundFile()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/video/
DVideoPresentation.java51 public void onPrepared(MediaPlayer mp) { in onCreate()
52 mp.setLooping(true); in onCreate()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/streamquality/
DPlayVideoActivity.java162 public boolean onError(MediaPlayer mp, int what, int extra) {
169 public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
185 public void onPrepared(MediaPlayer mp) {
/cts/tests/tests/os/src/android/os/cts/
DLooperTest.java200 MockPrinter mp = new MockPrinter(); in testSetMessageLogging()
201 Looper.myLooper().setMessageLogging(mp); in testSetMessageLogging()
209 assertNotNull(mp.str); in testSetMessageLogging()

12