Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java +26 −23 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class MediaProfileReader { public static void createVideoProfileTable() { // push all the property into one big table String encoderType = getVideoCodecProperty(); if (encoderType.length() != 0) { String encoder[] = encoderType.split(","); for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < VIDEO_ENCODER_PROPERTY.length; j++) { Loading @@ -73,11 +74,13 @@ public class MediaProfileReader { } } } public static void createAudioProfileTable() { // push all the property into one big table String audioType = getAudioCodecProperty(); String encoder[] = audioType.split(","); if (audioType.length() != 0) { for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < AUDIO_ENCODER_PROPERTY.length; j++) { String propertyName = MEDIA_AUD_VID + encoder[i] + AUDIO_ENCODER_PROPERTY[j]; Loading @@ -89,7 +92,7 @@ public class MediaProfileReader { OUTPUT_FORMAT_TABLE.put((encoder[i] + AUDIO_ENCODER_PROPERTY[j] + "_high"), Integer.parseInt(propRange[1])); } } } } Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java +13 −13 Original line number Diff line number Diff line Loading @@ -434,15 +434,15 @@ public class MediaRecorderTest extends ActivityInstrumentationTestCase<MediaFram boolean recordSuccess = false; String deviceType = MediaProfileReader.getDeviceType(); Log.v(TAG, "deviceType = " + deviceType); if (deviceType.compareTo("voles") == 0) { // Test cases are device specified MediaProfileReader.createVideoProfileTable(); MediaProfileReader.createAudioProfileTable(); MediaProfileReader.createEncoderTable(); String encoderType = MediaProfileReader.getVideoCodecProperty(); String encoder[] = encoderType.split(","); String audioType = MediaProfileReader.getAudioCodecProperty(); if ((encoderType.length() != 0) || (audioType.length() != 0)) { String audio[] = audioType.split(","); String encoder[] = encoderType.split(","); for (int k = 0; k < 2; k++) { for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < audio.length; j++) { Loading @@ -460,9 +460,9 @@ public class MediaRecorderTest extends ActivityInstrumentationTestCase<MediaFram } } } } if (noOfFailure != 0) { assertTrue("testDeviceSpecificCodec", false); } } } } Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java +26 −23 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class MediaProfileReader { public static void createVideoProfileTable() { // push all the property into one big table String encoderType = getVideoCodecProperty(); if (encoderType.length() != 0) { String encoder[] = encoderType.split(","); for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < VIDEO_ENCODER_PROPERTY.length; j++) { Loading @@ -73,11 +74,13 @@ public class MediaProfileReader { } } } public static void createAudioProfileTable() { // push all the property into one big table String audioType = getAudioCodecProperty(); String encoder[] = audioType.split(","); if (audioType.length() != 0) { for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < AUDIO_ENCODER_PROPERTY.length; j++) { String propertyName = MEDIA_AUD_VID + encoder[i] + AUDIO_ENCODER_PROPERTY[j]; Loading @@ -89,7 +92,7 @@ public class MediaProfileReader { OUTPUT_FORMAT_TABLE.put((encoder[i] + AUDIO_ENCODER_PROPERTY[j] + "_high"), Integer.parseInt(propRange[1])); } } } } Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java +13 −13 Original line number Diff line number Diff line Loading @@ -434,15 +434,15 @@ public class MediaRecorderTest extends ActivityInstrumentationTestCase<MediaFram boolean recordSuccess = false; String deviceType = MediaProfileReader.getDeviceType(); Log.v(TAG, "deviceType = " + deviceType); if (deviceType.compareTo("voles") == 0) { // Test cases are device specified MediaProfileReader.createVideoProfileTable(); MediaProfileReader.createAudioProfileTable(); MediaProfileReader.createEncoderTable(); String encoderType = MediaProfileReader.getVideoCodecProperty(); String encoder[] = encoderType.split(","); String audioType = MediaProfileReader.getAudioCodecProperty(); if ((encoderType.length() != 0) || (audioType.length() != 0)) { String audio[] = audioType.split(","); String encoder[] = encoderType.split(","); for (int k = 0; k < 2; k++) { for (int i = 0; i < encoder.length; i++) { for (int j = 0; j < audio.length; j++) { Loading @@ -460,9 +460,9 @@ public class MediaRecorderTest extends ActivityInstrumentationTestCase<MediaFram } } } } if (noOfFailure != 0) { assertTrue("testDeviceSpecificCodec", false); } } } }