openRtpServer接口新增only_audio参数,优化语音对讲场景

This commit is contained in:
xiongziliang
2023-02-17 22:43:45 +08:00
parent 5cdaf982f3
commit 8f0ba6988b
10 changed files with 80 additions and 17 deletions

View File

@@ -24,6 +24,7 @@ class RtpSession : public toolkit::Session, public RtpSplitter, public MediaSour
public:
static const std::string kStreamID;
static const std::string kSSRC;
static const std::string kOnlyAudio;
RtpSession(const toolkit::Socket::Ptr &sock);
~RtpSession() override;
@@ -45,6 +46,7 @@ private:
bool _is_udp = false;
bool _search_rtp = false;
bool _search_rtp_finished = false;
bool _only_audio = false;
uint32_t _ssrc = 0;
toolkit::Ticker _ticker;
std::string _stream_id;