【发布时间】:2023-03-29 11:03:01
【问题描述】:
代码一次只为一位用户流式传输。谁能帮助我同时在多个系统中播放流(将其转换为多播或广播)。 提前致谢。
库源在这里: https://github.com/fyhertz/libstreaming
我当前的代码是:
mSurfaceView = (net.majorkernelpanic.streaming.gl.SurfaceView) findViewById(R.id.surface);
// Sets the port of the RTSP server to 1234
Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();
editor.putString(RtspServer.KEY_PORT, String.valueOf(5060)); // audio port num
editor.commit();
// Configures the SessionBuilde
SessionBuilder.getInstance()
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(90)
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_AAC)
.setVideoEncoder(SessionBuilder.VIDEO_NONE);
MainActivity.this.startService(new Intent(MainActivity.this,RtspServer.class));
【问题讨论】:
标签: android audio-streaming rtsp