use of android.media.EncoderCapabilities.AudioEncoderCap in project android_frameworks_base by ParanoidAndroid.
the class MediaRecorderTest method testDeviceSpecificCodec.
@LargeTest
public //test cases for the new codec
void testDeviceSpecificCodec() throws Exception {
int noOfFailure = 0;
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
for (int k = 0; k < 2; k++) {
for (VideoEncoderCap videoEncoder : videoEncoders) {
for (AudioEncoderCap audioEncoder : audioEncoders) {
if (k == 0) {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
} else {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
}
if (!recordSuccess) {
Log.v(TAG, "testDeviceSpecificCodec failed");
Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
noOfFailure++;
}
}
}
}
if (noOfFailure != 0) {
assertTrue("testDeviceSpecificCodec", false);
}
}
use of android.media.EncoderCapabilities.AudioEncoderCap in project android_frameworks_base by ResurrectionRemix.
the class MediaRecorderTest method testDeviceSpecificCodec.
@LargeTest
public //test cases for the new codec
void testDeviceSpecificCodec() throws Exception {
int noOfFailure = 0;
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
for (int k = 0; k < 2; k++) {
for (VideoEncoderCap videoEncoder : videoEncoders) {
for (AudioEncoderCap audioEncoder : audioEncoders) {
if (k == 0) {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
} else {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
}
if (!recordSuccess) {
Log.v(TAG, "testDeviceSpecificCodec failed");
Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
noOfFailure++;
}
}
}
}
if (noOfFailure != 0) {
assertTrue("testDeviceSpecificCodec", false);
}
}
use of android.media.EncoderCapabilities.AudioEncoderCap in project android_frameworks_base by AOSPA.
the class MediaRecorderTest method testDeviceSpecificCodec.
@LargeTest
public //test cases for the new codec
void testDeviceSpecificCodec() throws Exception {
int noOfFailure = 0;
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
for (int k = 0; k < 2; k++) {
for (VideoEncoderCap videoEncoder : videoEncoders) {
for (AudioEncoderCap audioEncoder : audioEncoders) {
if (k == 0) {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
} else {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
}
if (!recordSuccess) {
Log.v(TAG, "testDeviceSpecificCodec failed");
Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
noOfFailure++;
}
}
}
}
if (noOfFailure != 0) {
assertTrue("testDeviceSpecificCodec", false);
}
}
use of android.media.EncoderCapabilities.AudioEncoderCap in project android_frameworks_base by crdroidandroid.
the class MediaRecorderTest method testDeviceSpecificCodec.
@LargeTest
public //test cases for the new codec
void testDeviceSpecificCodec() throws Exception {
int noOfFailure = 0;
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
for (int k = 0; k < 2; k++) {
for (VideoEncoderCap videoEncoder : videoEncoders) {
for (AudioEncoderCap audioEncoder : audioEncoders) {
if (k == 0) {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
} else {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
}
if (!recordSuccess) {
Log.v(TAG, "testDeviceSpecificCodec failed");
Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
noOfFailure++;
}
}
}
}
if (noOfFailure != 0) {
assertTrue("testDeviceSpecificCodec", false);
}
}
use of android.media.EncoderCapabilities.AudioEncoderCap in project platform_frameworks_base by android.
the class MediaRecorderTest method testDeviceSpecificCodec.
@LargeTest
public //test cases for the new codec
void testDeviceSpecificCodec() throws Exception {
int noOfFailure = 0;
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
for (int k = 0; k < 2; k++) {
for (VideoEncoderCap videoEncoder : videoEncoders) {
for (AudioEncoderCap audioEncoder : audioEncoders) {
if (k == 0) {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
} else {
recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
}
if (!recordSuccess) {
Log.v(TAG, "testDeviceSpecificCodec failed");
Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
noOfFailure++;
}
}
}
}
if (noOfFailure != 0) {
assertTrue("testDeviceSpecificCodec", false);
}
}
Aggregations