提高PSRtpSender对象的线程安全性

This commit is contained in:
xiongziliang
2020-09-12 18:53:51 +08:00
parent dc192c95fc
commit 9a088f4825
2 changed files with 60 additions and 37 deletions

View File

@@ -54,6 +54,11 @@ public:
*/
void startSend(const string &dst_url, uint16_t dst_port, bool is_udp, const function<void(const SockException &ex)> &cb);
/**
* 输入帧数据
*/
void inputFrame(const Frame::Ptr &frame) override;
protected:
//mpeg-ps回调
void onPS(uint32_t stamp, void *packet, size_t bytes) override;
@@ -65,7 +70,6 @@ protected:
*/
void onFlush(std::shared_ptr<List<RtpPacket::Ptr> > &rtp_list, bool key_pos) override;
private:
//rtp打包后回调
void onRtp(const RtpPacket::Ptr &in, bool is_key);