Home
last modified time | relevance | path

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

/cts/tests/tests/media/src/android/media/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()
60 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback() local
61 ds = TestMediaDataSource.fromAssetFd(afd); in setDataSourceCallback()
164 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testThumbnail() local
166 retriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testThumbnail()
169 afd.close(); in testThumbnail()
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()
DMediaPlayerTestBase.java153 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource() local
155 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadResource()
156 afd.getLength()); in loadResource()
166 afd.close(); in loadResource()
177 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource() local
179 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
180 afd.getLength(), MediaPlayer.MEDIA_MIMETYPE_TEXT_SUBRIP); in loadSubtitleSource()
182 afd.close(); in loadSubtitleSource()
DTestMediaDataSource.java43 public static TestMediaDataSource fromAssetFd(AssetFileDescriptor afd) throws IOException { in fromAssetFd() argument
45 InputStream in = afd.createInputStream(); in fromAssetFd()
46 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
56 afd.close(); in fromAssetFd()
DMediaPlayerTest.java111 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.bug13652927); in testVorbisCrash() local
112 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testVorbisCrash()
113 afd.close(); in testVorbisCrash()
235 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
236 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
237 afd.close();
280 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
281 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
282 afd.close();
390 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.test1m1s);
[all …]
DMediaRandomTest.java165 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSource() local
167 mPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSource()
168 afd.getLength()); in loadSource()
170 afd.close(); in loadSource()
DMediaExtractorTest.java48 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor() local
49 return TestMediaDataSource.fromAssetFd(afd); in getDataSourceFor()
DSoundPoolTest.java99 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(getSoundCs()); in testLoad() local
101 sampleId2 = mSoundPool.load(afd, PRIORITY); in testLoad()
105 FileDescriptor fd = afd.getFileDescriptor(); in testLoad()
106 long offset = afd.getStartOffset(); in testLoad()
107 long length = afd.getLength(); in testLoad()
DAudioEffectTest.java149 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_4InsertOnMediaPlayer() local
150 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in test1_4InsertOnMediaPlayer()
151 afd.close(); in test1_4InsertOnMediaPlayer()
175 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_5AuxiliaryOnMediaPlayer() local
176 mMediaPlayer.setDataSource(afd.getFileDescriptor(), in test1_5AuxiliaryOnMediaPlayer()
177 afd.getStartOffset(), in test1_5AuxiliaryOnMediaPlayer()
178 afd.getLength()); in test1_5AuxiliaryOnMediaPlayer()
179 afd.close(); in test1_5AuxiliaryOnMediaPlayer()
DMediaScannerTest.java521 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(entry.res); in testEncodingDetection() local
522 woodly.setDataSource(afd.getFileDescriptor(), in testEncodingDetection()
523 afd.getStartOffset(), afd.getDeclaredLength()); in testEncodingDetection()
DMediaCodecTest.java1411 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(resourceId); in getMediaExtractorForMimeType() local
1414 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getMediaExtractorForMimeType()
1416 afd.close(); in getMediaExtractorForMimeType()
/cts/libs/deviceutil/src/android/cts/util/
DMediaUtils.java252 AssetFileDescriptor afd = null; in hasCodecsForResourceCombo() local
255 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
257 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResourceCombo()
269 if (afd != null) { in hasCodecsForResourceCombo()
270 afd.close(); in hasCodecsForResourceCombo()
397 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in createMediaExtractorForMimeType() local
400 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in createMediaExtractorForMimeType()
402 afd.close(); in createMediaExtractorForMimeType()
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_Audio_AlbumsTest.java178 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor( in testAlbumArt() local
180 assertNotNull(afd); in testAlbumArt()
181 afd.close(); in testAlbumArt()
191 afd = mContentResolver.openAssetFileDescriptor(albumart, "r"); in testAlbumArt()
202 afd = mContentResolver.openAssetFileDescriptor(albumart, "r"); in testAlbumArt()
/cts/tests/tests/content/src/android/content/cts/
DContentResolverTest.java526 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor(uri, "r"); in testOpenAssetFileDescriptor() local
527 assertNotNull(afd); in testOpenAssetFileDescriptor()
528 afd.close(); in testOpenAssetFileDescriptor()
546 private String consumeAssetFileDescriptor(AssetFileDescriptor afd) in consumeAssetFileDescriptor() argument
550 stream = afd.createInputStream(); in consumeAssetFileDescriptor()
574 AssetFileDescriptor afd = null; in testCrashingOpenAssetFileDescriptor() local
577 afd = mContentResolver.openAssetFileDescriptor(REMOTE_CRASH_URI, "rw"); in testCrashingOpenAssetFileDescriptor()
579 assertNotNull(afd); in testCrashingOpenAssetFileDescriptor()
580 String str = consumeAssetFileDescriptor(afd); in testCrashingOpenAssetFileDescriptor()
581 afd = null; in testCrashingOpenAssetFileDescriptor()
[all …]
/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()