FFmpegPlayer/WebRTCPublisher.h
2024-01-18 23:43:16 +08:00

24 lines
788 B
C++

#ifndef WEBRTCPUBLISHER_H
#define WEBRTCPUBLISHER_H
#include "Helpers.h"
#include <boost/asio/io_context.hpp>
class WebRTCPublisher {
public:
WebRTCPublisher(boost::asio::io_context &ioContext);
protected:
std::shared_ptr<ClientTrackData> addVideo(const std::shared_ptr<rtc::PeerConnection> pc, const uint8_t payloadType,
const uint32_t ssrc, const std::string cname, const std::string msid,
const std::function<void(void)> onOpen);
private:
boost::asio::io_context &m_ioContext;
rtc::Configuration m_configuration;
std::shared_ptr<rtc::PeerConnection> m_peer;
std::shared_ptr<rtc::DataChannel> m_dataChannel;
};
#endif // WEBRTCPUBLISHER_H