Header refactor (#2115)

* 优化MultiMediaSourceMuxer头文件包含

* 将MediaSinkDelegate和Demux移到MediaSink中

* MediaSource头文件重构, 独立出PacketCache.h
精简Frame和Track的头文件

* Rtmp头文件重构

* Rtsp头文件重构

* webrtc头文件重构

* 规范.h头文件包含,并将其移到.cpp中:
- 尽量不包含Common\config.h
- Util\File.h
- Rtsp/RtspPlayer.h
- Rtmp/RtmpPlayer.h

* 删除多余的Stamp.h和Base64包含
This commit is contained in:
mtdxc
2022-11-29 11:07:13 +08:00
committed by GitHub
parent 59ecdd13e5
commit 754073918a
127 changed files with 1043 additions and 917 deletions

View File

@@ -18,6 +18,9 @@
#include "Extension/Opus.h"
#include "Http/HttpTSPlayer.h"
#include "Util/File.h"
#include "Common/config.h"
#include "Rtsp/RtpCodec.h"
#include "Rtsp/RtpReceiver.h"
using namespace std;
using namespace toolkit;

View File

@@ -15,12 +15,12 @@
#include "Decoder.h"
#include "ProcessInterface.h"
#include "Rtsp/RtpCodec.h"
#include "Rtsp/RtpReceiver.h"
#include "Http/HttpRequestSplitter.h"
// for MediaInfo
#include "Common/MediaSource.h"
namespace mediakit{
class RtpCodec;
class RtpReceiverImp;
class GB28181Process : public ProcessInterface {
public:

View File

@@ -11,7 +11,9 @@
#if defined(ENABLE_RTPPROXY)
#include "PSEncoder.h"
#include "Common/config.h"
#include "Extension/H264.h"
#include "Extension/CommonRtp.h"
#include "Rtsp/RtspMuxer.h"
using namespace toolkit;

View File

@@ -15,11 +15,9 @@
#include "Record/MPEG.h"
#include "Common/MediaSink.h"
#include "Common/Stamp.h"
#include "Extension/CommonRtp.h"
namespace mediakit{
class CommonRtpEncoder;
class PSEncoderImp : public MpegMuxer{
public:
PSEncoderImp(uint32_t ssrc, uint8_t payload_type = 96);

View File

@@ -14,11 +14,9 @@
#if defined(ENABLE_RTPPROXY)
#include "Common/MediaSink.h"
#include "Common/Stamp.h"
#include "Extension/CommonRtp.h"
namespace mediakit {
class RtpCodec;
class RawEncoderImp : public MediaSinkInterface {
public:
RawEncoderImp(uint32_t ssrc, uint8_t payload_type = 96, bool send_audio = true);
@@ -44,13 +42,13 @@ protected:
virtual void onRTP(toolkit::Buffer::Ptr rtp, bool is_key = false) = 0;
private:
RtpCodec::Ptr createRtpEncoder(const Track::Ptr &track);
std::shared_ptr<RtpCodec> createRtpEncoder(const Track::Ptr &track);
private:
bool _send_audio;
uint8_t _payload_type;
uint32_t _ssrc;
RtpCodec::Ptr _rtp_encoder;
std::shared_ptr<RtpCodec> _rtp_encoder;
};
} // namespace mediakit

View File

@@ -15,7 +15,7 @@
#include "PSEncoder.h"
#include "RawEncoder.h"
#include "Extension/CommonRtp.h"
#include "Common/PacketCache.h"
namespace mediakit{

View File

@@ -12,6 +12,8 @@
#include "GB28181Process.h"
#include "RtpProcess.h"
#include "Http/HttpTSPlayer.h"
#include "Util/File.h"
#include "Common/config.h"
using namespace std;
using namespace toolkit;

View File

@@ -14,6 +14,7 @@
#include "Thread/WorkThreadPool.h"
#include "Util/uv_errno.h"
#include "RtpCache.h"
#include "Rtcp/RtcpContext.h"
using namespace std;
using namespace toolkit;

View File

@@ -14,6 +14,8 @@
#include "PSEncoder.h"
#include "Extension/CommonRtp.h"
#include "Rtcp/RtcpContext.h"
#include "Common/MediaSource.h"
#include "Common/MediaSink.h"
namespace mediakit{

View File

@@ -13,6 +13,7 @@
#include "RtpServer.h"
#include "RtpSelector.h"
#include "Rtcp/RtcpContext.h"
#include "Common/config.h"
using namespace std;
using namespace toolkit;

View File

@@ -13,6 +13,7 @@
#include "RtpSelector.h"
#include "Network/TcpServer.h"
#include "Rtsp/RtpReceiver.h"
#include "Common/config.h"
using namespace std;
using namespace toolkit;