/cts/tests/tests/media/src/android/media/cts/ |
D | MediaMetadataRetrieverTest.java | 92 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 …]
|
D | MediaPlayerSurfaceStubActivity.java | 44 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in onCreate() local 46 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in onCreate() 47 afd.close(); in onCreate()
|
D | TestMediaDataSource.java | 45 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()
|
D | TestMedia2DataSource.java | 45 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()
|
D | MediaPlayer2TestBase.java | 151 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 …]
|
D | MediaPlayerTestBase.java | 109 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()
|
D | MediaRandomTest.java | 167 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()
|
D | MediaPlayerTest.java | 151 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 …]
|
D | SoundPoolTest.java | 101 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()
|
D | AudioEffectTest.java | 158 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()
|
D | MediaExtractorTest.java | 51 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor() local 52 return TestMediaDataSource.fromAssetFd(afd); in getDataSourceFor()
|
D | MediaPlayer2Test.java | 163 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()
|
D | MediaScannerTest.java | 621 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(entry.res); in testEncodingDetection() local 622 woodly.setDataSource(afd.getFileDescriptor(), in testEncodingDetection() 623 afd.getStartOffset(), afd.getDeclaredLength()); in testEncodingDetection()
|
D | DecodeAccuracyTestBase.java | 368 final AssetFileDescriptor afd = videoFormat.getAssetFileDescriptor(context); in setExtractorDataSource() local 370 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setExtractorDataSource() 371 afd.close(); in setExtractorDataSource()
|
D | MediaCodecTest.java | 1712 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/ |
D | MediaMetadataRetrieverTest.java | 49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local 50 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd() 51 afd.close(); in setDataSourceFd()
|
D | MediaServerCrashTest.java | 102 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/ |
D | MediaStore_Audio_AlbumsTest.java | 179 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/ |
D | MediaUtils.java | 391 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/ |
D | ContentResolverTest.java | 639 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/ |
D | DRMTest.java | 241 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/ |
D | CodecTest.java | 545 public static boolean resourcesPlayback(AssetFileDescriptor afd, int expectedDuration) { in resourcesPlayback() argument 549 mp.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(), afd.getLength()); in resourcesPlayback()
|