webrtc头文件重构

This commit is contained in:
cqm 2022-11-25 18:55:04 +08:00
parent 16c48e967d
commit 45cc14a7d5
15 changed files with 25 additions and 26 deletions

View File

@ -38,6 +38,7 @@ static std::shared_ptr<RtpServer> rtpServer;
#ifdef ENABLE_WEBRTC
#include "../webrtc/WebRtcSession.h"
#include "../webrtc/WebRtcTransport.h"
static std::shared_ptr<UdpServer> rtcServer_udp;
static std::shared_ptr<TcpServer> rtcServer_tcp;
#endif

View File

@ -11,6 +11,10 @@
#ifndef ZLMEDIAKIT_NACK_H
#define ZLMEDIAKIT_NACK_H
#include <set>
#include <map>
#include <deque>
#include <unordered_map>
#include "Rtsp/Rtsp.h"
#include "Rtcp/RtcpFCI.h"

View File

@ -5,6 +5,7 @@
#include "SctpAssociation.hpp"
#include "logger.h"
#include <stdarg.h>
#include <cstdlib> // std::malloc(), std::free()
#include <cstring> // std::memset(), std::memcpy()
#include <string>

View File

@ -11,6 +11,8 @@
#ifndef ZLMEDIAKIT_SDP_H
#define ZLMEDIAKIT_SDP_H
#include <set>
#include <map>
#include <string>
#include <vector>
#include "RtpExt.h"

View File

@ -22,6 +22,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "StunPacket.hpp"
#include <cstdio> // std::snprintf()
#include <cstring> // std::memcmp(), std::memcpy()
#include <openssl/hmac.h>
namespace RTC
{

View File

@ -14,7 +14,7 @@
#include <stdint.h>
#include <map>
#include <functional>
#include "Util/TimeTicker.h"
#include <string>
namespace mediakit {

View File

@ -22,30 +22,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#if defined(_WIN32)
#include <winsock2.h>
#include <ws2tcpip.h>
#include <Iphlpapi.h>
#pragma comment (lib, "Ws2_32.lib")
#pragma comment(lib,"Iphlpapi.lib")
#else
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#endif // defined(_WIN32)
#include <algorithm>// std::transform(), std::find(), std::min(), std::max()
#include <cinttypes>// PRIu64, etc
#include <cmath>
#include <cstddef>// size_t
#include <cstdint>// uint8_t, etc
#include <cstring>// std::memcmp(), std::memcpy()
#include <memory>
#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <string>
namespace Utils {

View File

@ -9,6 +9,7 @@
*/
#include "WebRtcPlayer.h"
#include "Common/config.h"
using namespace std;

View File

@ -12,6 +12,7 @@
#define ZLMEDIAKIT_WEBRTCPLAYER_H
#include "WebRtcTransport.h"
#include "Rtsp/RtspMediaSource.h"
namespace mediakit {

View File

@ -9,6 +9,7 @@
*/
#include "WebRtcPusher.h"
#include "Common/config.h"
using namespace std;

View File

@ -12,6 +12,7 @@
#define ZLMEDIAKIT_WEBRTCPUSHER_H
#include "WebRtcTransport.h"
#include "Rtsp/RtspMediaSourceImp.h"
namespace mediakit {

View File

@ -11,6 +11,9 @@
#include "WebRtcSession.h"
#include "Util/util.h"
#include "Network/TcpServer.h"
#include "Common/config.h"
#include "IceServer.hpp"
#include "WebRtcTransport.h"
using namespace std;

View File

@ -13,8 +13,6 @@
#define ZLMEDIAKIT_WEBRTCSESSION_H
#include "Network/Session.h"
#include "IceServer.hpp"
#include "WebRtcTransport.h"
#include "Http/HttpRequestSplitter.h"
namespace toolkit {
@ -22,6 +20,8 @@ namespace toolkit {
}
namespace mediakit {
class WebRtcTransportImp;
using namespace toolkit;
class WebRtcSession : public Session, public HttpRequestSplitter {
public:

View File

@ -10,10 +10,11 @@
#include <iostream>
#include <srtp2/srtp.h>
#include "Common/config.h"
#include "RtpExt.h"
#include "Rtcp/Rtcp.h"
#include "Rtcp/RtcpFCI.h"
#include "Rtcp/RtcpContext.h"
#include "Rtsp/RtpReceiver.h"
#include "WebRtcTransport.h"

View File

@ -17,18 +17,16 @@
#include "SrtpSession.hpp"
#include "StunPacket.hpp"
#include "Sdp.h"
#include "Util/mini.h"
#include "Poller/EventPoller.h"
#include "Network/Socket.h"
#include "Rtsp/RtspMediaSourceImp.h"
#include "Rtcp/RtcpContext.h"
#include "Rtcp/RtcpFCI.h"
#include "Nack.h"
#include "Network/Session.h"
#include "Nack.h"
#include "TwccContext.h"
#include "SctpAssociation.hpp"
namespace mediakit {
class RtcpContext;
//RTC配置项目
namespace Rtc {
extern const std::string kPort;
@ -203,7 +201,7 @@ public:
//for send rtp
NackList nack_list;
RtcpContext::Ptr rtcp_context_send;
std::shared_ptr<RtcpContext> rtcp_context_send;
//for recv rtp
std::unordered_map<std::string/*rid*/, std::shared_ptr<RtpChannel> > rtp_channel;