mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-18 14:12:21 +08:00
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:
@@ -13,6 +13,8 @@
|
||||
#include "Util/util.h"
|
||||
#include "Util/onceToken.h"
|
||||
#include "Thread/ThreadPool.h"
|
||||
#include "Common/Parser.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
@@ -127,7 +129,7 @@ void RtmpPusher::onRecv(const Buffer::Ptr &buf){
|
||||
}
|
||||
}
|
||||
|
||||
inline void RtmpPusher::send_connect() {
|
||||
void RtmpPusher::send_connect() {
|
||||
AMFValue obj(AMF_OBJECT);
|
||||
obj.set("app", _app);
|
||||
obj.set("type", "nonprivate");
|
||||
@@ -147,7 +149,7 @@ inline void RtmpPusher::send_connect() {
|
||||
});
|
||||
}
|
||||
|
||||
inline void RtmpPusher::send_createStream() {
|
||||
void RtmpPusher::send_createStream() {
|
||||
AMFValue obj(AMF_NULL);
|
||||
sendInvoke("createStream", obj);
|
||||
addOnResultCB([this](AMFDecoder &dec) {
|
||||
@@ -159,7 +161,7 @@ inline void RtmpPusher::send_createStream() {
|
||||
}
|
||||
|
||||
#define RTMP_STREAM_LIVE "live"
|
||||
inline void RtmpPusher::send_publish() {
|
||||
void RtmpPusher::send_publish() {
|
||||
AMFEncoder enc;
|
||||
enc << "publish" << ++_send_req_id << nullptr << _stream_id << RTMP_STREAM_LIVE;
|
||||
sendRequest(MSG_CMD, enc.data());
|
||||
@@ -175,7 +177,7 @@ inline void RtmpPusher::send_publish() {
|
||||
});
|
||||
}
|
||||
|
||||
inline void RtmpPusher::send_metaData(){
|
||||
void RtmpPusher::send_metaData(){
|
||||
auto src = _publish_src.lock();
|
||||
if (!src) {
|
||||
throw std::runtime_error("the media source was released");
|
||||
|
||||
Reference in New Issue
Block a user