Methods Summary |
---|
public static java.lang.String | getAudioCodecName(int audioEncoder)
if (audioEncoder != MediaRecorder.AudioEncoder.AMR_NB &&
audioEncoder != MediaRecorder.AudioEncoder.AMR_WB &&
audioEncoder != MediaRecorder.AudioEncoder.AAC &&
audioEncoder != MediaRecorder.AudioEncoder.HE_AAC &&
audioEncoder != MediaRecorder.AudioEncoder.AAC_ELD) {
throw new IllegalArgumentException("Unsupported audio encodeer " + audioEncoder);
}
return audioEncoderMap.get(audioEncoder);
|
public static java.util.List | getAudioEncoders()
return audioEncoders;
|
public static java.lang.String | getDeviceType()
// push all the property into one big table
String s;
s = SystemProperties.get("ro.product.name");
return s;
|
public static int | getMaxFrameRateForCodec(int codec)
return getMinOrMaxFrameRateForCodec(codec, true);
|
public static int | getMinFrameRateForCodec(int codec)
return getMinOrMaxFrameRateForCodec(codec, false);
|
private static int | getMinOrMaxFrameRateForCodec(int codec, boolean max)
for (VideoEncoderCap cap: videoEncoders) {
if (cap.mCodec == codec) {
if (max) return cap.mMaxFrameRate;
else return cap.mMinFrameRate;
}
}
// Should never reach here
throw new IllegalArgumentException("Unsupported video codec " + codec);
|
public static java.lang.String | getVideoCodecName(int videoEncoder)
if (videoEncoder != MediaRecorder.VideoEncoder.H263 &&
videoEncoder != MediaRecorder.VideoEncoder.H264 &&
videoEncoder != MediaRecorder.VideoEncoder.MPEG_4_SP) {
throw new IllegalArgumentException("Unsupported video encoder " + videoEncoder);
}
return videoEncoderMap.get(videoEncoder);
|
public static java.util.List | getVideoEncoders()
initAudioEncoderMap();
initVideoEncoderMap();
return videoEncoders;
|
public static boolean | getWMAEnable()
for (AudioDecoder decoder: audioDecoders) {
if (decoder == AudioDecoder.AUDIO_DECODER_WMA) {
return true;
}
}
return false;
|
public static boolean | getWMVEnable()
for (VideoDecoder decoder: videoDecoders) {
if (decoder == VideoDecoder.VIDEO_DECODER_WMV) {
return true;
}
}
return false;
|
private static void | initAudioEncoderMap()
// audio encoders
audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_NB, "amrnb");
audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb");
audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac");
audioEncoderMap.put(MediaRecorder.AudioEncoder.HE_AAC, "heaac");
audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC_ELD, "aaceld");
|
private static void | initVideoEncoderMap()
// video encoders
videoEncoderMap.put(MediaRecorder.VideoEncoder.H263, "h263");
videoEncoderMap.put(MediaRecorder.VideoEncoder.H264, "h264");
videoEncoderMap.put(MediaRecorder.VideoEncoder.MPEG_4_SP, "m4v");
|