mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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));
|
return Util.toByteArray(getInputStream(context, fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the bytes of a cache file using its file path. */
|
/** Returns the bytes of a file using its file path. */
|
||||||
public static byte[] getByteArrayFromCache(String cacheFilePath) throws IOException {
|
public static byte[] getByteArrayFromFilePath(String filePath) throws IOException {
|
||||||
InputStream inputStream = new FileInputStream(cacheFilePath);
|
InputStream inputStream = new FileInputStream(filePath);
|
||||||
return Util.toByteArray(inputStream);
|
return Util.toByteArray(inputStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -402,7 +402,7 @@ public class TestUtil {
|
||||||
/**
|
/**
|
||||||
* Extracts all samples from the given 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 extractor The {@link Extractor} to be used.
|
||||||
* @param context A {@link Context}.
|
* @param context A {@link Context}.
|
||||||
* @param fileName The name of the input file.
|
* @param fileName The name of the input file.
|
||||||
* @return The {@link FakeTrackOutput} containing the extracted samples.
|
* @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 extractor The {@link Extractor} to be used.
|
||||||
* @param cacheFilePath The cache file path.
|
* @param filePath The file path.
|
||||||
* @return The {@link FakeTrackOutput} containing the extracted samples.
|
* @return The {@link FakeTrackOutput} containing the extracted samples.
|
||||||
* @throws IOException If an error occurred reading from the input, or if the extractor finishes
|
* @throws IOException If an error occurred reading from the input, or if the extractor finishes
|
||||||
* reading from input without extracting any {@link SeekMap}.
|
* reading from input without extracting any {@link SeekMap}.
|
||||||
*/
|
*/
|
||||||
public static FakeExtractorOutput extractAllSamplesFromCacheFile(
|
public static FakeExtractorOutput extractAllSamplesFromFilePath(
|
||||||
Extractor extractor, String cacheFilePath) throws IOException {
|
Extractor extractor, String filePath) throws IOException {
|
||||||
byte[] data = TestUtil.getByteArrayFromCache(cacheFilePath);
|
byte[] data = getByteArrayFromFilePath(filePath);
|
||||||
return extractAllSamplesFromByteArray(extractor, data);
|
return extractAllSamplesFromByteArray(extractor, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue