mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Remove cache term from TestUtil methods
PiperOrigin-RevId: 523675327
This commit is contained in:
parent
c5baf2388c
commit
6182201265
1 changed files with 10 additions and 10 deletions
|
|
@ -192,9 +192,9 @@ public class TestUtil {
|
|||
return Util.toByteArray(getInputStream(context, fileName));
|
||||
}
|
||||
|
||||
/** Returns the bytes of a cache file using its file path. */
|
||||
public static byte[] getByteArrayFromCache(String cacheFilePath) throws IOException {
|
||||
InputStream inputStream = new FileInputStream(cacheFilePath);
|
||||
/** Returns the bytes of a file using its file path. */
|
||||
public static byte[] getByteArrayFromFilePath(String filePath) throws IOException {
|
||||
InputStream inputStream = new FileInputStream(filePath);
|
||||
return Util.toByteArray(inputStream);
|
||||
}
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ public class TestUtil {
|
|||
/**
|
||||
* Extracts all samples from the given file into a {@link FakeTrackOutput}.
|
||||
*
|
||||
* @param extractor The {@link Extractor} to extractor from input.
|
||||
* @param extractor The {@link Extractor} to be used.
|
||||
* @param context A {@link Context}.
|
||||
* @param fileName The name of the input file.
|
||||
* @return The {@link FakeTrackOutput} containing the extracted samples.
|
||||
|
|
@ -416,17 +416,17 @@ public class TestUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Extracts all samples from the given storage file into a {@link FakeTrackOutput}.
|
||||
* Extracts all samples from the given file into a {@link FakeTrackOutput}.
|
||||
*
|
||||
* @param extractor The {@link Extractor} to extractor from input.
|
||||
* @param cacheFilePath The cache file path.
|
||||
* @param extractor The {@link Extractor} to be used.
|
||||
* @param filePath The file path.
|
||||
* @return The {@link FakeTrackOutput} containing the extracted samples.
|
||||
* @throws IOException If an error occurred reading from the input, or if the extractor finishes
|
||||
* reading from input without extracting any {@link SeekMap}.
|
||||
*/
|
||||
public static FakeExtractorOutput extractAllSamplesFromCacheFile(
|
||||
Extractor extractor, String cacheFilePath) throws IOException {
|
||||
byte[] data = TestUtil.getByteArrayFromCache(cacheFilePath);
|
||||
public static FakeExtractorOutput extractAllSamplesFromFilePath(
|
||||
Extractor extractor, String filePath) throws IOException {
|
||||
byte[] data = getByteArrayFromFilePath(filePath);
|
||||
return extractAllSamplesFromByteArray(extractor, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue