Fix nit issues in muxer tests
PiperOrigin-RevId: 553145104
This commit is contained in:
parent
af546b8eda
commit
876b767356
@ -15,8 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package androidx.media3.transformer;
|
package androidx.media3.transformer;
|
||||||
|
|
||||||
|
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_FORMAT;
|
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_FORMAT;
|
||||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||||
|
import static org.junit.Assume.assumeTrue;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@ -52,7 +54,7 @@ public class TransformerWithInAppMuxerEndToEndTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void videoEditing_completesSuccessfully() throws Exception {
|
public void videoEditing_completesSuccessfully() throws Exception {
|
||||||
String testId = "videoEditing_completesSuccessfully";
|
String testId = "videoEditing_completesSuccessfully_" + inputFile;
|
||||||
// Use MP4_ASSET_FORMAT for H265_MP4_ASSET_URI_STRING test skipping as well, because emulators
|
// Use MP4_ASSET_FORMAT for H265_MP4_ASSET_URI_STRING test skipping as well, because emulators
|
||||||
// signal a lack of support for H265_MP4's actual format, but pass this test when using
|
// signal a lack of support for H265_MP4's actual format, but pass this test when using
|
||||||
// MP4_ASSET_FORMAT for skipping.
|
// MP4_ASSET_FORMAT for skipping.
|
||||||
@ -79,14 +81,10 @@ public class TransformerWithInAppMuxerEndToEndTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void audioEditing_completesSuccessfully() throws Exception {
|
public void audioEditing_completesSuccessfully() throws Exception {
|
||||||
|
// The test does not need not to be parameterised because it only needs to run for a single
|
||||||
|
// audio format (AAC).
|
||||||
|
assumeTrue(checkNotNull(inputFile).equals(H264_MP4));
|
||||||
String testId = "audioEditing_completesSuccessfully";
|
String testId = "audioEditing_completesSuccessfully";
|
||||||
if (AndroidTestUtil.skipAndLogIfFormatsUnsupported(
|
|
||||||
context,
|
|
||||||
testId,
|
|
||||||
/* inputFormat= */ MP4_ASSET_FORMAT,
|
|
||||||
/* outputFormat= */ MP4_ASSET_FORMAT)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Transformer transformer =
|
Transformer transformer =
|
||||||
new Transformer.Builder(context).setMuxerFactory(new InAppMuxer.Factory()).build();
|
new Transformer.Builder(context).setMuxerFactory(new InAppMuxer.Factory()).build();
|
||||||
ChannelMixingAudioProcessor channelMixingAudioProcessor = new ChannelMixingAudioProcessor();
|
ChannelMixingAudioProcessor channelMixingAudioProcessor = new ChannelMixingAudioProcessor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user