本文整理汇总了Java中net.majorkernelpanic.streaming.SessionBuilder.AUDIO_AMRNB属性的典型用法代码示例。如果您正苦于以下问题:Java SessionBuilder.AUDIO_AMRNB属性的具体用法?Java SessionBuilder.AUDIO_AMRNB怎么用?Java SessionBuilder.AUDIO_AMRNB使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.majorkernelpanic.streaming.SessionBuilder
的用法示例。
在下文中一共展示了SessionBuilder.AUDIO_AMRNB属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
@Override
public void onCreate() {
// The following line triggers the initialization of ACRA
// Please do not uncomment this line unless you change the form id or I will receive your crash reports !
//ACRA.init(this);
sApplication = this;
super.onCreate();
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
notificationEnabled = settings.getBoolean("notification_enabled", true);
// On android 3.* AAC ADTS is not supported so we set the default encoder to AMR-NB, on android 4.* AAC is the default encoder
audioEncoder = (Integer.parseInt(android.os.Build.VERSION.SDK)<14) ? SessionBuilder.AUDIO_AMRNB : SessionBuilder.AUDIO_AAC;
audioEncoder = Integer.parseInt(settings.getString("audio_encoder", String.valueOf(audioEncoder)));
videoEncoder = Integer.parseInt(settings.getString("video_encoder", String.valueOf(videoEncoder)));
// Read video quality settings from the preferences
videoQuality = new VideoQuality(
settings.getInt("video_resX", videoQuality.resX),
settings.getInt("video_resY", videoQuality.resY),
Integer.parseInt(settings.getString("video_framerate", String.valueOf(videoQuality.framerate))),
Integer.parseInt(settings.getString("video_bitrate", String.valueOf(videoQuality.bitrate/1000)))*1000);
SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(!settings.getBoolean("stream_audio", true)?0:audioEncoder)
.setVideoEncoder(!settings.getBoolean("stream_video", false)?0:videoEncoder)
.setVideoQuality(videoQuality);
// Listens to changes of preferences
settings.registerOnSharedPreferenceChangeListener(mOnSharedPreferenceChangeListener);
registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
}
示例2: onCreate
@Override
public void onCreate() {
// The following line triggers the initialization of ACRA
// Please do not uncomment this line unless you change the form id or I will receive your crash reports !
//ACRA.init(this);
sApplication = this;
super.onCreate();
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
notificationEnabled = settings.getBoolean("notification_enabled", true);
// On android 3.* AAC ADTS is not supported so we set the default encoder to AMR-NB, on android 4.* AAC is the default encoder
audioEncoder = (Integer.parseInt(android.os.Build.VERSION.SDK)<14) ? SessionBuilder.AUDIO_AMRNB : SessionBuilder.AUDIO_AAC;
audioEncoder = Integer.parseInt(settings.getString("audio_encoder", String.valueOf(audioEncoder)));
videoEncoder = Integer.parseInt(settings.getString("video_encoder", String.valueOf(videoEncoder)));
// Read video quality settings from the preferences
videoQuality = VideoQuality.merge(
new VideoQuality(
settings.getInt("video_resX", 0),
settings.getInt("video_resY", 0),
Integer.parseInt(settings.getString("video_framerate", "0")),
Integer.parseInt(settings.getString("video_bitrate", "0"))*1000),
videoQuality);
SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(!settings.getBoolean("stream_audio", true)?0:audioEncoder)
.setVideoEncoder(!settings.getBoolean("stream_video", false)?0:videoEncoder)
.setHeartEncoder(!settings.getBoolean("stream_heartrate", false)?0:heartRateEncoder)
.setVideoQuality(videoQuality);
// Listens to changes of preferences
settings.registerOnSharedPreferenceChangeListener(mOnSharedPreferenceChangeListener);
registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
}