Home
last modified time | relevance | path

Searched refs:afd (Results 1 – 22 of 22) sorted by relevance

/cts/tests/tests/media/src/android/media/cts/
DMediaMetadataRetrieverTest.java92 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local
93 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd()
94 afd.close(); in setDataSourceFd()
103 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback() local
104 ds = TestMediaDataSource.fromAssetFd(afd); in setDataSourceCallback()
115 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getFaultyDataSource() local
116 ds = TestMediaDataSource.fromAssetFd(afd); in getFaultyDataSource()
245 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testThumbnail() local
247 retriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testThumbnail()
250 afd.close(); in testThumbnail()
[all …]
DMediaPlayerSurfaceStubActivity.java44 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in onCreate() local
46 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in onCreate()
47 afd.close(); in onCreate()
DTestMediaDataSource.java45 public static TestMediaDataSource fromAssetFd(AssetFileDescriptor afd) throws IOException { in fromAssetFd() argument
47 InputStream in = afd.createInputStream(); in fromAssetFd()
48 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
58 afd.close(); in fromAssetFd()
DTestMedia2DataSource.java45 public static TestMedia2DataSource fromAssetFd(AssetFileDescriptor afd) throws IOException { in fromAssetFd() argument
47 InputStream in = afd.createInputStream(); in fromAssetFd()
48 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
58 afd.close(); in fromAssetFd()
DMediaPlayer2TestBase.java151 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); in createMediaPlayer2() local
152 if (afd == null) { in createMediaPlayer2()
164 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in createMediaPlayer2()
182 afd.close(); in createMediaPlayer2()
329 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource() local
332 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in loadResource()
355 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in createDataSourceDesc() local
357 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in createDataSourceDesc()
366 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource() local
368 mPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
[all …]
DMediaPlayerTestBase.java109 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource() local
111 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadResource()
112 afd.getLength()); in loadResource()
122 afd.close(); in loadResource()
133 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource() local
135 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
136 afd.getLength(), MediaPlayer.MEDIA_MIMETYPE_TEXT_SUBRIP); in loadSubtitleSource()
138 afd.close(); in loadSubtitleSource()
DMediaRandomTest.java167 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSource() local
169 mPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSource()
170 afd.getLength()); in loadSource()
172 afd.close(); in loadSource()
DMediaPlayerTest.java151 AssetFileDescriptor afd = mResources.openRawResourceFd(res); in testIfMediaServerDied() local
152 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
153 afd.close(); in testIfMediaServerDied()
180 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.bug13652927); in testVorbisCrash() local
181 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testVorbisCrash()
182 afd.close(); in testVorbisCrash()
304 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
305 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
306 afd.close();
422 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in testPlayMidi()
[all …]
DSoundPoolTest.java101 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(getSoundCs()); in testLoad() local
103 sampleId2 = mSoundPool.load(afd, PRIORITY); in testLoad()
107 FileDescriptor fd = afd.getFileDescriptor(); in testLoad()
108 long offset = afd.getStartOffset(); in testLoad()
109 long length = afd.getLength(); in testLoad()
DAudioEffectTest.java158 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_4InsertOnMediaPlayer() local
159 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in test1_4InsertOnMediaPlayer()
160 afd.close(); in test1_4InsertOnMediaPlayer()
184 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_5AuxiliaryOnMediaPlayer() local
185 mMediaPlayer.setDataSource(afd.getFileDescriptor(), in test1_5AuxiliaryOnMediaPlayer()
186 afd.getStartOffset(), in test1_5AuxiliaryOnMediaPlayer()
187 afd.getLength()); in test1_5AuxiliaryOnMediaPlayer()
188 afd.close(); in test1_5AuxiliaryOnMediaPlayer()
DMediaExtractorTest.java51 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor() local
52 return TestMediaDataSource.fromAssetFd(afd); in getDataSourceFor()
DMediaPlayer2Test.java163 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.bug13652927); in testVorbisCrash() local
165 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in testVorbisCrash()
166 afd.getLength()) in testVorbisCrash()
172 afd.close(); in testVorbisCrash()
391 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
393 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength())
400 afd.close();
600 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in testPlayMidi()
602 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in testPlayMidi()
609 afd.close(); in testPlayMidi()
DMediaScannerTest.java621 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(entry.res); in testEncodingDetection() local
622 woodly.setDataSource(afd.getFileDescriptor(), in testEncodingDetection()
623 afd.getStartOffset(), afd.getDeclaredLength()); in testEncodingDetection()
DDecodeAccuracyTestBase.java368 final AssetFileDescriptor afd = videoFormat.getAssetFileDescriptor(context); in setExtractorDataSource() local
370 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setExtractorDataSource()
371 afd.close(); in setExtractorDataSource()
DMediaCodecTest.java1712 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(resourceId); in getMediaExtractorForMimeType() local
1715 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getMediaExtractorForMimeType()
1717 afd.close(); in getMediaExtractorForMimeType()
/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local
50 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd()
51 afd.close(); in setDataSourceFd()
DMediaServerCrashTest.java102 AssetFileDescriptor afd = getContext().getResources().openRawResourceFd(res); in testIfMediaServerDied() local
103 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
104 afd.close(); in testIfMediaServerDied()
127 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(res); in checkIfMediaServerDiedForDrm() local
128 FileInputStream dmStream = afd.createInputStream(); in checkIfMediaServerDiedForDrm()
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_Audio_AlbumsTest.java179 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor( in testAlbumArt() local
181 assertNotNull(afd); in testAlbumArt()
182 afd.close(); in testAlbumArt()
192 afd = mContentResolver.openAssetFileDescriptor(albumart, "r"); in testAlbumArt()
203 afd = mContentResolver.openAssetFileDescriptor(albumart, "r"); in testAlbumArt()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DMediaUtils.java391 AssetFileDescriptor afd = null; in hasCodecsForResourceCombo() local
394 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
396 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResourceCombo()
408 if (afd != null) { in hasCodecsForResourceCombo()
409 afd.close(); in hasCodecsForResourceCombo()
617 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in getTrackFormatForResource() local
619 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource()
621 afd.close(); in getTrackFormatForResource()
657 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in createMediaExtractorForMimeType() local
660 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in createMediaExtractorForMimeType()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DContentResolverTest.java639 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor(uri, "r"); in testOpenAssetFileDescriptor() local
640 assertNotNull(afd); in testOpenAssetFileDescriptor()
641 afd.close(); in testOpenAssetFileDescriptor()
659 private String consumeAssetFileDescriptor(AssetFileDescriptor afd) in consumeAssetFileDescriptor() argument
663 stream = afd.createInputStream(); in consumeAssetFileDescriptor()
687 AssetFileDescriptor afd = null; in testCrashingOpenAssetFileDescriptor() local
690 afd = mContentResolver.openAssetFileDescriptor(REMOTE_CRASH_URI, "rw"); in testCrashingOpenAssetFileDescriptor()
692 assertNotNull(afd); in testCrashingOpenAssetFileDescriptor()
693 String str = consumeAssetFileDescriptor(afd); in testCrashingOpenAssetFileDescriptor()
694 afd = null; in testCrashingOpenAssetFileDescriptor()
[all …]
/cts/tests/tests/drm/src/android/drm/cts/
DDRMTest.java241 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3_2); in testForwardLockAccess() local
242 FileInputStream body = afd.createInputStream(); in testForwardLockAccess()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DCodecTest.java545 public static boolean resourcesPlayback(AssetFileDescriptor afd, int expectedDuration) { in resourcesPlayback() argument
549 mp.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(), afd.getLength()); in resourcesPlayback()