本文整理汇总了Java中net.majorkernelpanic.streaming.audio.AudioQuality类的典型用法代码示例。如果您正苦于以下问题:Java AudioQuality类的具体用法?Java AudioQuality怎么用?Java AudioQuality使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AudioQuality类属于net.majorkernelpanic.streaming.audio包,在下文中一共展示了AudioQuality类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildSession
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
@Override
public void buildSession() {
boolean isAudioStream = settingsPreferencesUtil.loadAudioPreference();
int videoEncoder = settingsPreferencesUtil.loadVideoEncoderPreference();
int resolution = settingsPreferencesUtil.loadResolutionPreference();
int width[] = getResources().getIntArray(R.array.resolution_width);
int height[] = getResources().getIntArray(R.array.resolution_height);
session = SessionBuilder.getInstance()
.setCallback(this)
.setSurfaceView(surfaceView)
.setPreviewOrientation(90)
.setContext(this)
.setAudioEncoder(isAudioStream ? SessionBuilder.AUDIO_AAC : SessionBuilder.AUDIO_NONE)
.setAudioQuality(new AudioQuality(16000, 32000))
.setVideoEncoder((videoEncoder == 0) ? SessionBuilder.VIDEO_H264 : SessionBuilder.VIDEO_H263)
.setVideoQuality(new VideoQuality(width[resolution], height[resolution], 20, 500000))
.build();
}
开发者ID:hypeapps,项目名称:Endoscope,代码行数:19,代码来源:StartStreamActivity.java
示例2: init
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
public void init() {
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this.getContext()).edit();
editor.putString(RtspServer.KEY_PORT, String.valueOf(54321));
editor.apply();
mSession = SessionBuilder.getInstance()
.setCallback(this)
.setSurfaceView(mView)
.setPreviewOrientation(90)
.setContext(this.getContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setAudioQuality(new AudioQuality(16000, 32000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setVideoQuality(new VideoQuality(800,480,10,500000))
.build();
mView.getHolder().addCallback(this);
this.getContext().startService(new Intent(this.getContext(),RtspServer.class));
}
开发者ID:flyver,项目名称:Flyver-Apps,代码行数:23,代码来源:VideoStreamProvider.java
示例3: initRtspClient
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
private void initRtspClient() {
// Configures the SessionBuilder
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_AAC)
.setAudioQuality(new AudioQuality(8000, 16000))
.setVideoQuality(new VideoQuality(UVCCamera.DEFAULT_PREVIEW_WIDTH * 2, UVCCamera.DEFAULT_PREVIEW_HEIGHT, SELECTED_FPS, 400000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setPreviewOrientation(90)
.setSurfaceView(mSurfaceView)
.setCallback(this).build();
// Get Surface
canvasSurface = mSession.getVideoTrack().getSurface();
// Configures the RTSP client
mClient = new RtspClient();
mClient.setSession(mSession);
mClient.setCallback(this);
mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);
String ip, port, path;
// We parse the URI written in the Editext
Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
Matcher m = uri.matcher(AppConfig.STREAM_URL);
m.find();
ip = m.group(1);
port = m.group(2);
path = m.group(3);
mClient.setCredentials(AppConfig.PUBLISHER_USERNAME,
AppConfig.PUBLISHER_PASSWORD);
mClient.setServerAddress(ip, Integer.parseInt(port));
mClient.setStreamPath("/" + path);
Log.e(TAG, "done initRtsp");
}
开发者ID:quanhua92,项目名称:libstreaming_android_studio,代码行数:40,代码来源:StreamDualUsbCamera.java
示例4: initRtspClient
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
private void initRtspClient() {
// Configures the SessionBuilder
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setAudioQuality(new AudioQuality(8000, 16000))
.setVideoQuality(new VideoQuality(640, 480, 15, 200000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(90)
.setCallback(this).build();
// Configures the RTSP client
mClient = new RtspClient();
mClient.setSession(mSession);
mClient.setCallback(this);
mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);
String ip, port, path;
// We parse the URI written in the Editext
Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
Matcher m = uri.matcher(AppConfig.STREAM_URL);
m.find();
ip = m.group(1);
port = m.group(2);
path = m.group(3);
mClient.setCredentials(AppConfig.PUBLISHER_USERNAME,
AppConfig.PUBLISHER_PASSWORD);
mClient.setServerAddress(ip, Integer.parseInt(port));
mClient.setStreamPath("/" + path);
}
开发者ID:quanhua92,项目名称:libstreaming_android_studio,代码行数:33,代码来源:StreamAndroidPhone.java
示例5: initRtspClient
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
private void initRtspClient() {
// Configures the SessionBuilder
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setAudioQuality(new AudioQuality(8000, 16000))
.setVideoQuality(new VideoQuality(640, 480, 15, 200000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setPreviewOrientation(90)
.setSurfaceView(mSurfaceView)
.setCallback(this).build();
// Get Surface
canvasSurface = mSession.getVideoTrack().getSurface();
// Configures the RTSP client
mClient = new RtspClient();
mClient.setSession(mSession);
mClient.setCallback(this);
mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);
String ip, port, path;
// We parse the URI written in the Editext
Pattern uri = Pattern.compile("rtsp://(.+):(\\d+)/(.+)");
Matcher m = uri.matcher(AppConfig.STREAM_URL);
m.find();
ip = m.group(1);
port = m.group(2);
path = m.group(3);
mClient.setCredentials(AppConfig.PUBLISHER_USERNAME,
AppConfig.PUBLISHER_PASSWORD);
mClient.setServerAddress(ip, Integer.parseInt(port));
mClient.setStreamPath("/" + path);
Log.e(TAG, "done initRtsp");
}
开发者ID:quanhua92,项目名称:libstreaming_android_studio,代码行数:40,代码来源:StreamUsbCamera.java
示例6: setAudioQuality
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
/** Sets the audio quality. */
public SessionBuilder setAudioQuality(AudioQuality quality) {
mAudioQuality = quality.clone();
return this;
}
开发者ID:ghazi94,项目名称:Android_CCTV,代码行数:6,代码来源:SessionBuilder.java
示例7: getAudioQuality
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
/** Returns the AudioQuality set with {@link #setAudioQuality(AudioQuality)}. */
public AudioQuality getAudioQuality() {
return mAudioQuality;
}
开发者ID:ghazi94,项目名称:Android_CCTV,代码行数:5,代码来源:SessionBuilder.java
示例8: setAudioQuality
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
/**
* Sets the configuration of the stream. You can call this method at any time
* and changes will take effect next time you call {@link #configure()}.
* @param quality Quality of the stream
*/
public void setAudioQuality(AudioQuality quality) {
if (mAudioStream != null) {
mAudioStream.setAudioQuality(quality);
}
}
开发者ID:ghazi94,项目名称:Android_CCTV,代码行数:11,代码来源:Session.java
示例9: getAudioQuality
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
/** Returns the AudioQuality set with {@link #setAudioQuality(net.majorkernelpanic.streaming.audio.AudioQuality)}. */
public AudioQuality getAudioQuality() {
return mAudioQuality;
}
开发者ID:Oo-Dev,项目名称:OoDroid2,代码行数:5,代码来源:SessionBuilder.java
示例10: setAudioQuality
import net.majorkernelpanic.streaming.audio.AudioQuality; //导入依赖的package包/类
/**
* Sets the configuration of the stream. <br />
* You can call this method at any time and changes will take
* effect next time you call {@link #configure()}.
* @param quality Quality of the stream
*/
public void setAudioQuality(AudioQuality quality) {
if (mAudioStream != null) {
mAudioStream.setAudioQuality(quality);
}
}
开发者ID:hypeapps,项目名称:Endoscope,代码行数:12,代码来源:Session.java
注:本文中的net.majorkernelpanic.streaming.audio.AudioQuality类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论