Home
last modified time | relevance | path

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

/cts/tests/tests/media/src/android/media/cts/
DMediaMetadataRetrieverTest.java90 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local
91 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd()
92 afd.close(); in setDataSourceFd()
101 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback() local
102 ds = TestMediaDataSource.fromAssetFd(afd); in setDataSourceCallback()
113 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getFaultyDataSource() local
114 ds = TestMediaDataSource.fromAssetFd(afd); in getFaultyDataSource()
256 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testThumbnail() local
258 retriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testThumbnail()
261 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()
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()
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()
DTestProxyFileDescriptorCallback.java45 public static TestProxyFileDescriptorCallback fromAssetFd(AssetFileDescriptor afd) in fromAssetFd() argument
48 InputStream in = afd.createInputStream(); in fromAssetFd()
49 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
59 afd.close(); in fromAssetFd()
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()
DMediaPlayerTest.java148 AssetFileDescriptor afd = mResources.openRawResourceFd(res); in testIfMediaServerDied() local
149 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
150 afd.close(); in testIfMediaServerDied()
177 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.bug13652927); in testVorbisCrash() local
178 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testVorbisCrash()
179 afd.close(); in testVorbisCrash()
313 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
314 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
315 afd.close();
431 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in testPlayMidi()
[all …]
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.java72 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor() local
73 return TestMediaDataSource.fromAssetFd(afd); in getDataSourceFor()
127 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in testExtractFromAssetFileDescriptor() local
128 mExtractor.setDataSource(afd); in testExtractFromAssetFileDescriptor()
130 afd.close(); in testExtractFromAssetFileDescriptor()
287 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in testExtractorHasCacheReachedEndOfStream() local
288 mExtractor.setDataSource(afd); in testExtractorHasCacheReachedEndOfStream()
290 afd.close(); in testExtractorHasCacheReachedEndOfStream()
DSoundPoolTest.java106 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(getSoundCs()); in testLoad() local
108 sampleId2 = mSoundPool.load(afd, PRIORITY); in testLoad()
112 FileDescriptor fd = afd.getFileDescriptor(); in testLoad()
113 long offset = afd.getStartOffset(); in testLoad()
114 long length = afd.getLength(); in testLoad()
DRingtoneManagerTest.java140 try (AssetFileDescriptor afd = RingtoneManager.openDefaultRingtoneUri( in testAccessMethods() argument
142 assertNotNull(afd); in testAccessMethods()
DMediaScannerTest.java593 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(entry.res); in testEncodingDetection() local
594 woodly.setDataSource(afd.getFileDescriptor(), in testEncodingDetection()
595 afd.getStartOffset(), afd.getDeclaredLength()); in testEncodingDetection()
DDecodeAccuracyTestBase.java365 final AssetFileDescriptor afd = videoFormat.getAssetFileDescriptor(context); in setExtractorDataSource() local
367 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setExtractorDataSource()
368 afd.close(); in setExtractorDataSource()
DMediaCodecTest.java1728 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(resourceId); in getMediaExtractorForMimeType() local
1731 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getMediaExtractorForMimeType()
1733 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.java98 AssetFileDescriptor afd = getContext().getResources().openRawResourceFd(res); in testIfMediaServerDied() local
99 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
100 afd.close(); in testIfMediaServerDied()
123 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(res); in checkIfMediaServerDiedForDrm() local
124 FileInputStream dmStream = afd.createInputStream(); in checkIfMediaServerDiedForDrm()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DMediaUtils.java394 AssetFileDescriptor afd = null; in hasCodecsForResourceCombo() local
397 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
399 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResourceCombo()
411 if (afd != null) { in hasCodecsForResourceCombo()
412 afd.close(); in hasCodecsForResourceCombo()
620 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in getTrackFormatForResource() local
622 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource()
624 afd.close(); in getTrackFormatForResource()
660 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in createMediaExtractorForMimeType() local
663 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in createMediaExtractorForMimeType()
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DMediaUtils.java392 AssetFileDescriptor afd = null; in hasCodecsForResourceCombo() local
395 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
397 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResourceCombo()
409 if (afd != null) { in hasCodecsForResourceCombo()
410 afd.close(); in hasCodecsForResourceCombo()
618 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in getTrackFormatForResource() local
620 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource()
622 afd.close(); in getTrackFormatForResource()
658 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in createMediaExtractorForMimeType() local
661 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in createMediaExtractorForMimeType()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DContentResolverTest.java648 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor(uri, "r"); in testOpenAssetFileDescriptor() local
649 assertNotNull(afd); in testOpenAssetFileDescriptor()
650 afd.close(); in testOpenAssetFileDescriptor()
668 private String consumeAssetFileDescriptor(AssetFileDescriptor afd) in consumeAssetFileDescriptor() argument
672 stream = afd.createInputStream(); in consumeAssetFileDescriptor()
696 AssetFileDescriptor afd = null; in testCrashingOpenAssetFileDescriptor() local
699 afd = mContentResolver.openAssetFileDescriptor(REMOTE_CRASH_URI, "rw"); in testCrashingOpenAssetFileDescriptor()
701 assertNotNull(afd); in testCrashingOpenAssetFileDescriptor()
702 String str = consumeAssetFileDescriptor(afd); in testCrashingOpenAssetFileDescriptor()
703 afd = null; in testCrashingOpenAssetFileDescriptor()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java201 try (AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId)) { in stageFile() argument
202 final File source = ParcelFileDescriptor.getFile(afd.getFileDescriptor()); in stageFile()
203 final long skip = afd.getStartOffset(); in stageFile()
204 final long count = afd.getLength(); in stageFile()
/cts/tests/providerui/src/android/providerui/cts/
DMediaStoreUiTest.java490 try (AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId)) { in stageFile() argument
491 final File source = ParcelFileDescriptor.getFile(afd.getFileDescriptor()); in stageFile()
492 final long skip = afd.getStartOffset(); in stageFile()
493 final long count = afd.getLength(); in stageFile()
/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()
/cts/tests/tests/drm/src/android/drm/cts/
DDRMTest.java249 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3_2); in testForwardLockAccess() local
250 FileInputStream body = afd.createInputStream(); in testForwardLockAccess()
/cts/tests/tests/media/assets/hls_variant/765178/
D12.ts2489 n��=�6�Zi��G���Cs��{G�|ܧ����*��x����afd��ă�1.��@��ߴ���yx�|���};��HY����"�Dǰ�R��+����…
/cts/tests/tests/media/res/raw/
Dfootball_qvga.yuv128 …#"&&%&&$##$" "!" *;FMV^cfihcba]ZXXZ[^eihv|jly[g��vrwz}xeQZc\afd`]t��@qÓ)}�r.�������…
279 …defgehfbdccghfiljillkjjhfhjljikljkkieffhjiilmllmmljffeceeddfgfhgghe````ba`^afd^^^aeefhhhjiikllonii…
292 …ca`efdc^`dfehgdaelhfcchjnrvz��������������������yxvmmmhac`aedeeefhhcbddeb`afd`dhjd^agdaehgglopjgk…
299 …cSKPZagnsz~��{vqke^XRPOOOPRSW^ju{~~zuwvk`RE7//28<>EIKPSSVYXXZZ[[Z[][]_`cc`afd`^^[VVRPPLHHHEDGCBA<…
303 …acaYJ7,*+++*))()'!(IfaIKLLIGIHB<:3++14;GFDKQ\_PJQWYVUTRMMNLHLV\XFI[]_a`\ZY^afd^ZTOPVSKRYVYba[Y\`_\…