规范.h头文件包含,并将其移到.cpp中:
- 尽量不包含Common\config.h - Util\File.h - Rtsp/RtspPlayer.h - Rtmp/RtmpPlayer.h
This commit is contained in:
parent
45cc14a7d5
commit
baf69905e2
|
|
@ -11,6 +11,7 @@
|
|||
#include <signal.h>
|
||||
#include "Util/logger.h"
|
||||
#include <iostream>
|
||||
#include "Common/config.h"
|
||||
#include "Rtsp/UDPServer.h"
|
||||
#include "Player/MediaPlayer.h"
|
||||
#include "Util/onceToken.h"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#include <functional>
|
||||
#include "Process.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
#include "Network/Socket.h"
|
||||
#include "Common/MediaSource.h"
|
||||
|
||||
namespace FFmpeg {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "Rtmp/RtmpCodec.h"
|
||||
#include "Extension/Track.h"
|
||||
#include "Util/ResourcePool.h"
|
||||
#include "Extension/H264.h"
|
||||
|
||||
namespace mediakit{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "Rtmp/RtmpCodec.h"
|
||||
#include "Extension/Track.h"
|
||||
#include "Util/ResourcePool.h"
|
||||
#include "Extension/H265.h"
|
||||
|
||||
namespace mediakit{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "HlsPlayer.h"
|
||||
|
||||
#include "Common/config.h"
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "HttpSession.h"
|
||||
#include "Record/HlsMediaSource.h"
|
||||
#include "Common/Parser.h"
|
||||
#include "Common/config.h"
|
||||
#include "strCoding.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <functional>
|
||||
#include "Network/Session.h"
|
||||
#include "Rtmp/RtmpMediaSource.h"
|
||||
#include "Rtmp/FlvMuxer.h"
|
||||
#include "HttpRequestSplitter.h"
|
||||
#include "WebSocketSplitter.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "TsPlayer.h"
|
||||
|
||||
#include "Common/config.h"
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "TsPlayerImp.h"
|
||||
#include "HlsPlayer.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include "MediaPlayer.h"
|
||||
#include "Rtmp/RtmpPlayerImp.h"
|
||||
#include "Rtsp/RtspPlayerImp.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include "PlayerBase.h"
|
||||
#include "Rtsp/RtspPlayer.h"
|
||||
#include "Rtmp/RtmpPlayer.h"
|
||||
#include "Thread/TaskExecutor.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@
|
|||
#define SRC_DEVICE_PLAYERPROXY_H_
|
||||
|
||||
#include <memory>
|
||||
#include "Common/Device.h"
|
||||
#include "Common/MultiMediaSourceMuxer.h"
|
||||
#include "Player/MediaPlayer.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
|
@ -72,7 +71,7 @@ private:
|
|||
std::string _app;
|
||||
std::string _stream_id;
|
||||
std::string _pull_url;
|
||||
toolkit::Timer::Ptr _timer;
|
||||
std::shared_ptr<toolkit::Timer> _timer;
|
||||
std::function<void(const toolkit::SockException &ex)> _on_close;
|
||||
std::function<void(const toolkit::SockException &ex)> _on_play;
|
||||
MultiMediaSourceMuxer::Ptr _muxer;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include "PusherBase.h"
|
||||
#include "Thread/TaskExecutor.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "HlsMaker.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,9 @@
|
|||
#ifndef HLSMAKER_H
|
||||
#define HLSMAKER_H
|
||||
|
||||
#include <string>
|
||||
#include <deque>
|
||||
#include <tuple>
|
||||
#include "Common/config.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
#include "Util/File.h"
|
||||
#include "Util/util.h"
|
||||
#include "Util/logger.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
#include "HlsMakerImp.h"
|
||||
#include "Util/util.h"
|
||||
#include "Util/uv_errno.h"
|
||||
#include "Util/File.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "HlsMakerImp.h"
|
||||
#include "MPEG.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@
|
|||
#ifdef ENABLE_MP4
|
||||
|
||||
#include "MP4Muxer.h"
|
||||
#include "Util/File.h"
|
||||
#include "Extension/AAC.h"
|
||||
#include "Extension/G711.h"
|
||||
#include "Extension/H264.h"
|
||||
#include "Extension/H265.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -14,10 +14,6 @@
|
|||
#ifdef ENABLE_MP4
|
||||
|
||||
#include "Common/MediaSink.h"
|
||||
#include "Extension/AAC.h"
|
||||
#include "Extension/G711.h"
|
||||
#include "Extension/H264.h"
|
||||
#include "Extension/H265.h"
|
||||
#include "Common/Stamp.h"
|
||||
#include "MP4.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "Common/MediaSource.h"
|
||||
#include "MP4Recorder.h"
|
||||
#include "HlsRecorder.h"
|
||||
#include "Util/File.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#ifndef ZLMEDIAKIT_RTCPFCI_H
|
||||
#define ZLMEDIAKIT_RTCPFCI_H
|
||||
|
||||
#include "Common/config.h"
|
||||
#include "Rtcp.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "Util/onceToken.h"
|
||||
#include "Thread/ThreadPool.h"
|
||||
#include "Common/Parser.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "RtpProcess.h"
|
||||
#include "Http/HttpTSPlayer.h"
|
||||
#include "Util/File.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "Util/util.h"
|
||||
#include "Network/sockutil.h"
|
||||
#include "RtspSession.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "RtpCodec.h"
|
||||
#include "RtspMediaSource.h"
|
||||
#include "Rtsp/Rtsp.h"
|
||||
#include "Extension/Frame.h"
|
||||
// for NtpStamp
|
||||
#include "Common/Stamp.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
|
@ -166,7 +167,7 @@ private:
|
|||
std::function<void(SEQ seq, T &packet)> _cb;
|
||||
};
|
||||
|
||||
class RtpTrack : private PacketSortor<RtpPacket::Ptr>{
|
||||
class RtpTrack : private PacketSortor<RtpPacket::Ptr> {
|
||||
public:
|
||||
class BadRtpException : public std::invalid_argument {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "RtspPusher.h"
|
||||
#include "RtspSession.h"
|
||||
#include "Rtcp/RtcpContext.h"
|
||||
#include "Common/config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#define SRC_SHELL_SHELLSESSION_H_
|
||||
|
||||
#include <functional>
|
||||
#include "Common/config.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
#include "Network/Session.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "Util/util.h"
|
||||
#include <memory>
|
||||
#include "Common/Parser.h"
|
||||
#include "Common/config.h"
|
||||
#include "SrtTransportImp.hpp"
|
||||
|
||||
namespace SRT {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "Util/logger.h"
|
||||
#include "Util/onceToken.h"
|
||||
#include "Util/CMD.h"
|
||||
#include "Common/config.h"
|
||||
#include "Rtsp/UDPServer.h"
|
||||
#include "Thread/WorkThreadPool.h"
|
||||
#include "Player/PlayerProxy.h"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
#include "Util/logger.h"
|
||||
#include "Util/onceToken.h"
|
||||
#include "Util/CMD.h"
|
||||
#include "Common/config.h"
|
||||
#include "Common/Parser.h"
|
||||
#include "Rtsp/Rtsp.h"
|
||||
#include "Thread/WorkThreadPool.h"
|
||||
#include "Pusher/MediaPusher.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <map>
|
||||
#include <signal.h>
|
||||
#include <iostream>
|
||||
#include "Util/File.h"
|
||||
#include "Util/SSLBox.h"
|
||||
#include "Util/logger.h"
|
||||
#include "Util/onceToken.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
#include "Util/MD5.h"
|
||||
#include "Util/File.h"
|
||||
#include "Util/logger.h"
|
||||
#include "Util/onceToken.h"
|
||||
#include "Poller/EventPoller.h"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "Player/PlayerProxy.h"
|
||||
#include "Rtmp/RtmpPusher.h"
|
||||
#include "Common/config.h"
|
||||
#include "Common/Parser.h"
|
||||
#include "Pusher/MediaPusher.h"
|
||||
#include "Record/MP4Reader.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "Util/MD5.h"
|
||||
#include "Util/File.h"
|
||||
#include "Util/logger.h"
|
||||
#include "Util/SSLBox.h"
|
||||
#include "Util/onceToken.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue