From 0eb82e462761338453d73001b826e4fee44882cb Mon Sep 17 00:00:00 2001 From: xiongzilaing <771730766@qq.com> Date: Tue, 25 Apr 2017 11:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .settings/language.settings.xml | 6 +++--- src/Codec/AACEncoder.cpp | 5 ++--- src/Codec/AACEncoder.h | 1 - src/Codec/H264Encoder.h | 4 +--- src/Device/Device.cpp | 8 ++++---- src/Device/Device.h | 6 +++--- src/Device/PlayerProxy.cpp | 6 +++--- src/Device/PlayerProxy.h | 2 +- src/H264/H264Parser.cpp | 1 + src/H264/H264Parser.h | 4 ++-- src/Http/HttpSession.cpp | 2 +- src/Http/HttpSession.h | 2 +- src/Http/HttpsSession.h | 1 + src/Http/strCoding.cpp | 2 +- src/Http/strCoding.h | 4 ---- src/MedaiFile/HLSMaker.cpp | 2 +- src/MedaiFile/HLSMaker.h | 3 ++- src/MedaiFile/MediaReader.cpp | 6 +++--- src/MedaiFile/MediaReader.h | 2 +- src/MedaiFile/MediaRecorder.cpp | 7 +++---- src/MedaiFile/MediaRecorder.h | 2 +- src/MedaiFile/Mp4Maker.cpp | 10 +++++----- src/MedaiFile/Mp4Maker.h | 10 +++++----- src/MedaiFile/TSMaker.cpp | 2 +- src/MedaiFile/TSMaker.h | 8 ++++---- src/MediaSender.h | 3 ++- src/Player/MediaPlayer.cpp | 4 ++-- src/Player/MediaPlayer.h | 6 +++--- src/Player/Player.cpp | 4 ++-- src/Player/PlayerBase.cpp | 8 ++++---- src/Player/PlayerBase.h | 8 ++++---- src/RTP/RtpMaker.h | 6 +++--- src/RTP/RtpMakerAAC.cpp | 4 ++-- src/RTP/RtpMakerAAC.h | 9 +++++---- src/RTP/RtpMakerH264.cpp | 4 ++-- src/RTP/RtpMakerH264.h | 7 ++++--- src/Rtmp/Rtmp.h | 12 +++--------- src/Rtmp/RtmpMediaSource.cpp | 2 +- src/Rtmp/RtmpMediaSource.h | 21 ++++++++++----------- src/Rtmp/RtmpParser.h | 12 +++++++----- src/Rtmp/RtmpPlayer.cpp | 7 ++++--- src/Rtmp/RtmpPlayer.h | 18 +++++++++--------- src/Rtmp/RtmpPlayerImp.h | 6 +++--- src/Rtmp/RtmpProtocol.cpp | 7 ++++--- src/Rtmp/RtmpProtocol.h | 14 +++++++------- src/Rtmp/RtmpPusher.cpp | 6 +++--- src/Rtmp/RtmpPusher.h | 2 +- src/Rtmp/RtmpSession.h | 5 ++--- src/Rtmp/RtmpToRtspMediaSource.cpp | 4 ++-- src/Rtmp/RtmpToRtspMediaSource.h | 20 ++++++++++---------- src/Rtmp/amf.cpp | 7 ++++--- src/Rtmp/amf.h | 5 +++-- src/Rtsp/RtpBroadCaster.cpp | 6 +++--- src/Rtsp/RtpBroadCaster.h | 13 +++++++------ src/Rtsp/RtpParser.cpp | 6 ++++-- src/Rtsp/RtpParser.h | 7 ++++--- src/Rtsp/Rtsp.cpp | 3 ++- src/Rtsp/Rtsp.h | 5 +++-- src/Rtsp/RtspMediaSource.cpp | 2 +- src/Rtsp/RtspMediaSource.h | 24 ++++++++++++------------ src/Rtsp/RtspPlayer.cpp | 4 ++-- src/Rtsp/RtspPlayer.h | 28 +++++++++++++++------------- src/Rtsp/RtspPlayerImp.h | 10 +++++----- src/Rtsp/RtspSession.cpp | 15 +++++++-------- src/Rtsp/RtspSession.h | 7 +++---- src/Rtsp/RtspToRtmpMediaSource.cpp | 11 ++++++----- src/Rtsp/RtspToRtmpMediaSource.h | 6 +++--- src/Rtsp/UDPServer.cpp | 2 ++ src/Rtsp/UDPServer.h | 13 ++++++++----- src/Shell/CMD.h | 8 +++++--- src/Shell/ShellSession.cpp | 4 ++-- src/config.h | 3 +-- test/DeviceHK.cpp | 2 +- test/DeviceHK.h | 2 +- test/test.cpp | 14 +++++++------- 75 files changed, 260 insertions(+), 252 deletions(-) diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 655295cc..d81ea5ff 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + @@ -27,7 +27,7 @@ - + diff --git a/src/Codec/AACEncoder.cpp b/src/Codec/AACEncoder.cpp index 42d1dbfd..33827f55 100644 --- a/src/Codec/AACEncoder.cpp +++ b/src/Codec/AACEncoder.cpp @@ -5,16 +5,15 @@ * Author: xzl */ #ifdef ENABLE_FAAC + +#include #include "AACEncoder.h" #include "Util/logger.h" -#include #ifdef __cplusplus extern "C" { #endif - #include - #ifdef __cplusplus } #endif diff --git a/src/Codec/AACEncoder.h b/src/Codec/AACEncoder.h index 3facf8cb..d1e9f661 100644 --- a/src/Codec/AACEncoder.h +++ b/src/Codec/AACEncoder.h @@ -8,7 +8,6 @@ #ifndef CODEC_AACENCODER_H_ #define CODEC_AACENCODER_H_ - namespace ZL { namespace Codec { diff --git a/src/Codec/H264Encoder.h b/src/Codec/H264Encoder.h index 5d5ff879..c846c5cb 100644 --- a/src/Codec/H264Encoder.h +++ b/src/Codec/H264Encoder.h @@ -7,17 +7,15 @@ #ifndef CODEC_H264ENCODER_H_ #define CODEC_H264ENCODER_H_ + #include #ifdef __cplusplus extern "C" { #endif //__cplusplus - #include - #ifdef __cplusplus } - #endif //__cplusplus namespace ZL { diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp index 0fa4dd77..01ab382f 100644 --- a/src/Device/Device.cpp +++ b/src/Device/Device.cpp @@ -5,14 +5,14 @@ * Author: xzl */ +#include +#include +#include "base64.h" #include "Device.h" #include "Util/logger.h" -#include #include "Util/util.h" -#include -#include "base64.h" - #include "Util/TimeTicker.h" + using namespace ZL::Util; namespace ZL { diff --git a/src/Device/Device.h b/src/Device/Device.h index 172bf3ee..45033fe8 100644 --- a/src/Device/Device.h +++ b/src/Device/Device.h @@ -7,14 +7,16 @@ #ifndef DEVICE_DEVICE_H_ #define DEVICE_DEVICE_H_ + #include +#include #include #include -#include #include "Util/util.h" #include "RTP/RtpMakerAAC.h" #include "RTP/RtpMakerH264.h" #include "Rtsp/RtspToRtmpMediaSource.h" + using namespace std; using namespace ZL::Rtsp; using namespace ZL::Util; @@ -29,7 +31,6 @@ using namespace ZL::Codec; using namespace ZL::Codec; #endif //ENABLE_X264 -using namespace ZL::Rtsp; namespace ZL { namespace DEV { @@ -46,7 +47,6 @@ public: int iSampleRate; }; - class DevChannel { public: typedef std::shared_ptr Ptr; diff --git a/src/Device/PlayerProxy.cpp b/src/Device/PlayerProxy.cpp index f306de0d..2be2a711 100644 --- a/src/Device/PlayerProxy.cpp +++ b/src/Device/PlayerProxy.cpp @@ -5,12 +5,12 @@ * Author: xzl */ +#include "config.h" #include "PlayerProxy.h" -#include "Thread/AsyncTaskThread.h" +#include "Util/mini.h" #include "Util/MD5.h" #include "Util/logger.h" -#include "config.h" -#include "Util/mini.hpp" +#include "Thread/AsyncTaskThread.h" using namespace ZL::Util; using namespace ZL::Thread; diff --git a/src/Device/PlayerProxy.h b/src/Device/PlayerProxy.h index 967fa35a..7a29b3b0 100644 --- a/src/Device/PlayerProxy.h +++ b/src/Device/PlayerProxy.h @@ -8,8 +8,8 @@ #ifndef SRC_DEVICE_PLAYERPROXY_H_ #define SRC_DEVICE_PLAYERPROXY_H_ -#include "Device.h" #include +#include "Device.h" #include "Player/MediaPlayer.h" #include "Util/TimeTicker.h" diff --git a/src/H264/H264Parser.cpp b/src/H264/H264Parser.cpp index d1b44dc5..eb9e43bb 100644 --- a/src/H264/H264Parser.cpp +++ b/src/H264/H264Parser.cpp @@ -8,6 +8,7 @@ #include "H264Parser.h" #include "Util/logger.h" + using namespace ZL::Util; H264Parser::H264Parser(){ diff --git a/src/H264/H264Parser.h b/src/H264/H264Parser.h index 662ce33b..70597b5a 100644 --- a/src/H264/H264Parser.h +++ b/src/H264/H264Parser.h @@ -1,5 +1,5 @@ // -// H264Parser.hpp +// H264Parser.h // MediaPlayer // // Created by xzl on 2017/1/16. @@ -11,8 +11,8 @@ #include #include -#include "h264_parser.h" #include "h264_poc.h" +#include "h264_parser.h" using namespace std; diff --git a/src/Http/HttpSession.cpp b/src/Http/HttpSession.cpp index 6f407e04..ab6f2c53 100644 --- a/src/Http/HttpSession.cpp +++ b/src/Http/HttpSession.cpp @@ -17,7 +17,7 @@ #include "Util/util.h" #include "Util/TimeTicker.h" #include "Util/onceToken.h" -#include "Util/mini.hpp" +#include "Util/mini.h" #include "Util/NoticeCenter.h" using namespace ZL::Util; diff --git a/src/Http/HttpSession.h b/src/Http/HttpSession.h index aba0a44c..c16f51a6 100644 --- a/src/Http/HttpSession.h +++ b/src/Http/HttpSession.h @@ -8,10 +8,10 @@ #ifndef SRC_HTTP_HTTPSESSION_H_ #define SRC_HTTP_HTTPSESSION_H_ +#include #include "config.h" #include "Rtsp/Rtsp.h" #include "Network/TcpLimitedSession.h" -#include using namespace std; using namespace ZL::Network; diff --git a/src/Http/HttpsSession.h b/src/Http/HttpsSession.h index f668e250..e240dd09 100644 --- a/src/Http/HttpsSession.h +++ b/src/Http/HttpsSession.h @@ -11,6 +11,7 @@ #include "HttpSession.h" #include "Util/SSLBox.h" #include "Util/TimeTicker.h" + using namespace ZL::Util; namespace ZL { diff --git a/src/Http/strCoding.cpp b/src/Http/strCoding.cpp index b699b93e..e1d98b5b 100644 --- a/src/Http/strCoding.cpp +++ b/src/Http/strCoding.cpp @@ -5,8 +5,8 @@ * Author: xzl */ -#include "strCoding.h" #include +#include "strCoding.h" namespace ZL { namespace Http { diff --git a/src/Http/strCoding.h b/src/Http/strCoding.h index 5da951b2..831a4157 100644 --- a/src/Http/strCoding.h +++ b/src/Http/strCoding.h @@ -11,10 +11,6 @@ #include #include -#ifdef _WINDOWS -#include -#endif - using namespace std; namespace ZL { diff --git a/src/MedaiFile/HLSMaker.cpp b/src/MedaiFile/HLSMaker.cpp index c342e1ad..a897decf 100644 --- a/src/MedaiFile/HLSMaker.cpp +++ b/src/MedaiFile/HLSMaker.cpp @@ -5,8 +5,8 @@ * Author: root */ -#include "HLSMaker.h" #include +#include "HLSMaker.h" namespace ZL { namespace MediaFile { diff --git a/src/MedaiFile/HLSMaker.h b/src/MedaiFile/HLSMaker.h index 80d01d25..8f28a81b 100644 --- a/src/MedaiFile/HLSMaker.h +++ b/src/MedaiFile/HLSMaker.h @@ -8,12 +8,13 @@ #ifndef HLSMAKER_H_ #define HLSMAKER_H_ +#include "config.h" #include "TSMaker.h" #include "Util/TimeTicker.h" #include "Util/File.h" #include "Util/util.h" #include "Util/logger.h" -#include "config.h" + using namespace ZL::Util; namespace ZL { diff --git a/src/MedaiFile/MediaReader.cpp b/src/MedaiFile/MediaReader.cpp index f09ccb38..cdd6228a 100644 --- a/src/MedaiFile/MediaReader.cpp +++ b/src/MedaiFile/MediaReader.cpp @@ -5,10 +5,10 @@ * Author: xzl */ -#include "MediaReader.h" -#include "Http/HttpSession.h" #include "config.h" -#include "Util/mini.hpp" +#include "MediaReader.h" +#include "Util/mini.h" +#include "Http/HttpSession.h" using namespace ZL::Util; diff --git a/src/MedaiFile/MediaReader.h b/src/MedaiFile/MediaReader.h index 413fb2cc..bd09a9c4 100644 --- a/src/MedaiFile/MediaReader.h +++ b/src/MedaiFile/MediaReader.h @@ -8,9 +8,9 @@ #ifndef SRC_MEDAIFILE_MEDIAREADER_H_ #define SRC_MEDAIFILE_MEDIAREADER_H_ +#include "Device/Device.h" #include "Rtsp/RtspMediaSource.h" #include "Rtmp/RtmpMediaSource.h" -#include "Device/Device.h" #ifdef ENABLE_MEDIAFILE #include diff --git a/src/MedaiFile/MediaRecorder.cpp b/src/MedaiFile/MediaRecorder.cpp index 661c54e7..4cf625cf 100644 --- a/src/MedaiFile/MediaRecorder.cpp +++ b/src/MedaiFile/MediaRecorder.cpp @@ -6,12 +6,11 @@ */ #include "config.h" -#include "Network/sockutil.h" #include "MediaRecorder.h" -#include "Util/util.h" #include "Http/HttpSession.h" -#include "config.h" -#include "Util/mini.hpp" +#include "Util/util.h" +#include "Util/mini.h" +#include "Network/sockutil.h" using namespace ZL::Util; using namespace ZL::Network; diff --git a/src/MedaiFile/MediaRecorder.h b/src/MedaiFile/MediaRecorder.h index 6a2b734f..d05d5300 100644 --- a/src/MedaiFile/MediaRecorder.h +++ b/src/MedaiFile/MediaRecorder.h @@ -8,8 +8,8 @@ #ifndef SRC_MEDAIFILE_MEDIARECORDER_H_ #define SRC_MEDAIFILE_MEDIARECORDER_H_ -#include "Player/PlayerBase.h" #include +#include "Player/PlayerBase.h" #ifdef ENABLE_MEDIAFILE #include "Mp4Maker.h" #include "HLSMaker.h" diff --git a/src/MedaiFile/Mp4Maker.cpp b/src/MedaiFile/Mp4Maker.cpp index afb06e8b..a138edf9 100644 --- a/src/MedaiFile/Mp4Maker.cpp +++ b/src/MedaiFile/Mp4Maker.cpp @@ -1,14 +1,14 @@ #ifdef ENABLE_MEDIAFILE -#include "MediaRecorder.h" #include #include -#include "Util/File.h" -#include "Mp4Maker.h" -#include "Util/NoticeCenter.h" #include "config.h" -#include "Util/mini.hpp" +#include "Mp4Maker.h" +#include "MediaRecorder.h" +#include "Util/File.h" +#include "Util/mini.h" +#include "Util/NoticeCenter.h" using namespace ZL::Util; diff --git a/src/MedaiFile/Mp4Maker.h b/src/MedaiFile/Mp4Maker.h index 29bc5e84..d87e8e87 100644 --- a/src/MedaiFile/Mp4Maker.h +++ b/src/MedaiFile/Mp4Maker.h @@ -11,17 +11,17 @@ #ifdef ENABLE_MEDIAFILE #include -#include "Player/PlayerBase.h" #include -#include "Util/logger.h" -#include "Util/util.h" -#include "Util/TimeTicker.h" #include +#include "Player/PlayerBase.h" +#include "Util/util.h" +#include "Util/logger.h" +#include "Util/TimeTicker.h" #include "Util/TimeTicker.h" using namespace std; -using namespace ZL::Player; using namespace ZL::Util; +using namespace ZL::Player; namespace ZL { namespace MediaFile { diff --git a/src/MedaiFile/TSMaker.cpp b/src/MedaiFile/TSMaker.cpp index 9014e6cf..4561b249 100644 --- a/src/MedaiFile/TSMaker.cpp +++ b/src/MedaiFile/TSMaker.cpp @@ -5,9 +5,9 @@ * Author: root */ +#include #include "TSMaker.h" #include "Util/logger.h" -#include using namespace ZL::Util; diff --git a/src/MedaiFile/TSMaker.h b/src/MedaiFile/TSMaker.h index b760fde0..915a7739 100644 --- a/src/MedaiFile/TSMaker.h +++ b/src/MedaiFile/TSMaker.h @@ -8,17 +8,17 @@ #ifndef TSMAKER_H_ #define TSMAKER_H_ -#include "CRC/crc32.h" -#include #include #include -#include #include +#include +#include +#include "CRC/crc32.h" #include "Util/File.h" + using namespace std; using namespace ZL::Util; - #define TS_PACKET_SIZE 188 #define TS_PACKET_HEADER 4 #define TS_SYNC_BYTE 0x47 diff --git a/src/MediaSender.h b/src/MediaSender.h index 66165603..ea3cacd3 100644 --- a/src/MediaSender.h +++ b/src/MediaSender.h @@ -7,7 +7,8 @@ #ifndef SRC_MEDIASENDER_H_ #define SRC_MEDIASENDER_H_ -#include "Thread/ThreadPool.hpp" + +#include "Thread/ThreadPool.h" using namespace ZL::Thread; class MediaSender { diff --git a/src/Player/MediaPlayer.cpp b/src/Player/MediaPlayer.cpp index df274b68..bf7be6c3 100644 --- a/src/Player/MediaPlayer.cpp +++ b/src/Player/MediaPlayer.cpp @@ -5,10 +5,10 @@ * Author: xzl */ +#include +#include "MediaPlayer.h" #include "Rtmp/RtmpPlayerImp.h" #include "Rtsp/RtspPlayerImp.h" -#include "MediaPlayer.h" -#include using namespace ZL::Rtmp; using namespace ZL::Rtsp; diff --git a/src/Player/MediaPlayer.h b/src/Player/MediaPlayer.h index 3b8206b8..4039ccc9 100644 --- a/src/Player/MediaPlayer.h +++ b/src/Player/MediaPlayer.h @@ -8,12 +8,12 @@ #ifndef SRC_PLAYER_MEDIAPLAYER_H_ #define SRC_PLAYER_MEDIAPLAYER_H_ +#include +#include #include "Player.h" #include "PlayerBase.h" -#include -#include -using namespace std; +using namespace std; namespace ZL { namespace Player { diff --git a/src/Player/Player.cpp b/src/Player/Player.cpp index 487cdfb7..79ddd8b0 100644 --- a/src/Player/Player.cpp +++ b/src/Player/Player.cpp @@ -5,12 +5,12 @@ * Author: xzl */ +#include #include "Player.h" #include "H264/SPSParser.h" -#include #include "Util/logger.h" -using namespace ZL::Util; +using namespace ZL::Util; static unsigned const samplingFrequencyTable[16] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, diff --git a/src/Player/PlayerBase.cpp b/src/Player/PlayerBase.cpp index 65a6e8a2..466e373e 100644 --- a/src/Player/PlayerBase.cpp +++ b/src/Player/PlayerBase.cpp @@ -5,11 +5,11 @@ * Author: xzl */ -#include "PlayerBase.h" -#include "Rtmp/RtmpPlayerImp.h" -#include "Rtsp/RtspPlayerImp.h" -#include "Rtsp/Rtsp.h" #include +#include "PlayerBase.h" +#include "Rtsp/Rtsp.h" +#include "Rtsp/RtspPlayerImp.h" +#include "Rtmp/RtmpPlayerImp.h" using namespace std; using namespace ZL::Rtmp; diff --git a/src/Player/PlayerBase.h b/src/Player/PlayerBase.h index 24c91e8d..9aa8f316 100644 --- a/src/Player/PlayerBase.h +++ b/src/Player/PlayerBase.h @@ -8,18 +8,18 @@ #ifndef SRC_PLAYER_PLAYERBASE_H_ #define SRC_PLAYER_PLAYERBASE_H_ -#include "Player.h" -#include "Network/Socket.hpp" -#include #include #include +#include +#include "Player.h" +#include "Network/Socket.h" + using namespace std; using namespace ZL::Network; namespace ZL { namespace Player { - class PlayerBase{ public: typedef std::shared_ptr Ptr; diff --git a/src/RTP/RtpMaker.h b/src/RTP/RtpMaker.h index 50bb3cce..c13232cf 100644 --- a/src/RTP/RtpMaker.h +++ b/src/RTP/RtpMaker.h @@ -9,11 +9,11 @@ #define RTP_RTPMAKER_H_ #include "Rtsp/RtspMediaSource.h" -#include "Util/ResourcePool.h" #include "Util/logger.h" -#include "Util/RingBuffer.hpp" +#include "Util/RingBuffer.h" #include "Util/TimeTicker.h" -#include "Thread/ThreadPool.hpp" +#include "Util/ResourcePool.h" +#include "Thread/ThreadPool.h" using namespace ZL::Util; using namespace ZL::Thread; diff --git a/src/RTP/RtpMakerAAC.cpp b/src/RTP/RtpMakerAAC.cpp index e8180d3a..16d0f005 100644 --- a/src/RTP/RtpMakerAAC.cpp +++ b/src/RTP/RtpMakerAAC.cpp @@ -6,9 +6,9 @@ */ #include -#include "RtpMakerAAC.h" #include "config.h" -#include "Util/mini.hpp" +#include "RtpMakerAAC.h" +#include "Util/mini.h" using namespace ZL::Util; diff --git a/src/RTP/RtpMakerAAC.h b/src/RTP/RtpMakerAAC.h index 3f320659..2675a008 100644 --- a/src/RTP/RtpMakerAAC.h +++ b/src/RTP/RtpMakerAAC.h @@ -7,14 +7,15 @@ #ifndef RTP_RTPMAKERAAC_H_ #define RTP_RTPMAKERAAC_H_ + +#include +#include "RtpMaker.h" #include "Rtsp/RtspMediaSource.h" #include "Util/logger.h" -#include "Util/RingBuffer.hpp" -#include "RtpMaker.h" -#include +#include "Util/RingBuffer.h" #include "Util/ResourcePool.h" -using namespace std; +using namespace std; using namespace ZL::Util; namespace ZL { diff --git a/src/RTP/RtpMakerH264.cpp b/src/RTP/RtpMakerH264.cpp index a7ed1b5e..487ffdeb 100644 --- a/src/RTP/RtpMakerH264.cpp +++ b/src/RTP/RtpMakerH264.cpp @@ -6,9 +6,9 @@ */ #include -#include "RtpMakerH264.h" #include "config.h" -#include "Util/mini.hpp" +#include "RtpMakerH264.h" +#include "Util/mini.h" using namespace ZL::Util; diff --git a/src/RTP/RtpMakerH264.h b/src/RTP/RtpMakerH264.h index 68461fda..5fb21cac 100644 --- a/src/RTP/RtpMakerH264.h +++ b/src/RTP/RtpMakerH264.h @@ -8,11 +8,12 @@ #ifndef RTP_RTPMAKERH264_H_ #define RTP_RTPMAKERH264_H_ +#include +#include "RtpMaker.h" #include "Rtsp/RtspMediaSource.h" #include "Util/logger.h" -#include "Util/RingBuffer.hpp" -#include "RtpMaker.h" -#include +#include "Util/RingBuffer.h" + using namespace std; using namespace ZL::Util; using namespace ZL::Rtsp; diff --git a/src/Rtmp/Rtmp.h b/src/Rtmp/Rtmp.h index 2befd768..80be7bfe 100644 --- a/src/Rtmp/Rtmp.h +++ b/src/Rtmp/Rtmp.h @@ -2,22 +2,18 @@ #define __rtmp_h #include -#include "Util/util.h" -#include #include +#include +#include "Util/util.h" #include "Util/logger.h" + using namespace std; using namespace ZL::Util; - #define PORT 1935 - #define DEFAULT_CHUNK_LEN 128 - #define PACKED __attribute__((packed)) - #define HANDSHAKE_PLAINTEXT 0x03 - #define RANDOM_LEN (1536 - 8) #define MSG_SET_CHUNK 1 /*Set Chunk Size (1)*/ @@ -36,7 +32,6 @@ using namespace ZL::Util; #define MSG_OBJECT 19 /*Shared Object Message (19, 16) AMF0*/ #define MSG_AGGREGATE 22 /*Aggregate Message (22)*/ - #define CONTROL_STREAM_BEGIN 0 #define CONTROL_STREAM_EOF 1 #define CONTROL_STREAM_DRY 2 @@ -45,7 +40,6 @@ using namespace ZL::Util; #define CONTROL_PING_REQUEST 6 #define CONTROL_PING_RESPONSE 7 - #define STREAM_CONTROL 0 #define STREAM_MEDIA 1 diff --git a/src/Rtmp/RtmpMediaSource.cpp b/src/Rtmp/RtmpMediaSource.cpp index eaacff60..f5a1c654 100644 --- a/src/Rtmp/RtmpMediaSource.cpp +++ b/src/Rtmp/RtmpMediaSource.cpp @@ -7,8 +7,8 @@ #include "RtmpMediaSource.h" #include "MedaiFile/MediaReader.h" -using namespace ZL::MediaFile; +using namespace ZL::MediaFile; namespace ZL { namespace Rtmp { diff --git a/src/Rtmp/RtmpMediaSource.h b/src/Rtmp/RtmpMediaSource.h index b52d6495..30cdda09 100644 --- a/src/Rtmp/RtmpMediaSource.h +++ b/src/Rtmp/RtmpMediaSource.h @@ -8,24 +8,23 @@ #ifndef SRC_RTMP_RTMPMEDIASOURCE_H_ #define SRC_RTMP_RTMPMEDIASOURCE_H_ -#include "config.h" #include -#include "Util/NoticeCenter.h" -#include "Util/ResourcePool.h" +#include +#include #include #include -#include -#include "Util/RingBuffer.hpp" #include -#include -#include "Util/logger.h" -#include "Thread/ThreadPool.hpp" -#include "Util/TimeTicker.h" #include "amf.h" #include "Rtmp.h" -#include "Util/util.h" +#include "config.h" #include "MediaSender.h" -#include +#include "Util/util.h" +#include "Util/logger.h" +#include "Util/RingBuffer.h" +#include "Util/TimeTicker.h" +#include "Util/ResourcePool.h" +#include "Util/NoticeCenter.h" +#include "Thread/ThreadPool.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtmp/RtmpParser.h b/src/Rtmp/RtmpParser.h index 92971eaa..06041dc3 100644 --- a/src/Rtmp/RtmpParser.h +++ b/src/Rtmp/RtmpParser.h @@ -8,16 +8,18 @@ #ifndef SRC_RTMP_RTMPPARSER_H_ #define SRC_RTMP_RTMPPARSER_H_ -#include "Rtmp.h" -#include "amf.h" -#include "Player/Player.h" -#include -#include "Util/TimeTicker.h" #include +#include +#include "amf.h" +#include "Rtmp.h" +#include "Player/Player.h" +#include "Util/TimeTicker.h" #include "Player/PlayerBase.h" + using namespace std; using namespace ZL::Util; using namespace ZL::Player; + namespace ZL { namespace Rtmp { diff --git a/src/Rtmp/RtmpPlayer.cpp b/src/Rtmp/RtmpPlayer.cpp index 37250332..f823f3a7 100644 --- a/src/Rtmp/RtmpPlayer.cpp +++ b/src/Rtmp/RtmpPlayer.cpp @@ -6,11 +6,12 @@ */ #include "RtmpPlayer.h" -#include "Thread/ThreadPool.hpp" +#include "Rtsp/Rtsp.h" +#include "Rtmp/utils.h" #include "Util/util.h" #include "Util/onceToken.h" -#include "Rtmp/utils.h" -#include "Rtsp/Rtsp.h" +#include "Thread/ThreadPool.h" + using namespace ZL::Util; namespace ZL { diff --git a/src/Rtmp/RtmpPlayer.h b/src/Rtmp/RtmpPlayer.h index 99a81b22..c9169e9a 100644 --- a/src/Rtmp/RtmpPlayer.h +++ b/src/Rtmp/RtmpPlayer.h @@ -9,18 +9,18 @@ #define SRC_RTMP_RtmpPlayer2_H_ #include -#include "Player/PlayerBase.h" -#include -#include "Util/logger.h" -#include "Util/util.h" -#include "Network/Socket.hpp" -#include "Network/TcpClient.h" -#include "Util/TimeTicker.h" -#include -#include "Rtmp.h" #include +#include +#include #include "amf.h" +#include "Rtmp.h" #include "RtmpProtocol.h" +#include "Player/PlayerBase.h" +#include "Util/util.h" +#include "Util/logger.h" +#include "Util/TimeTicker.h" +#include "Network/Socket.h" +#include "Network/TcpClient.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtmp/RtmpPlayerImp.h b/src/Rtmp/RtmpPlayerImp.h index d9ff0f22..836c4081 100644 --- a/src/Rtmp/RtmpPlayerImp.h +++ b/src/Rtmp/RtmpPlayerImp.h @@ -8,13 +8,13 @@ #ifndef SRC_RTMP_RTMPPLAYERIMP_H_ #define SRC_RTMP_RTMPPLAYERIMP_H_ -#include #include +#include +#include "config.h" #include "RtmpPlayer.h" #include "RtmpParser.h" -#include "config.h" +#include "Poller/Timer.h" #include "Util/TimeTicker.h" -#include "Poller/Timer.hpp" using namespace std; using namespace ZL::Util; diff --git a/src/Rtmp/RtmpProtocol.cpp b/src/Rtmp/RtmpProtocol.cpp index fa232534..35e0b2b8 100644 --- a/src/Rtmp/RtmpProtocol.cpp +++ b/src/Rtmp/RtmpProtocol.cpp @@ -6,11 +6,12 @@ */ #include "RtmpProtocol.h" -#include "Thread/ThreadPool.hpp" +#include "Rtsp/Rtsp.h" +#include "Rtmp/utils.h" #include "Util/util.h" #include "Util/onceToken.h" -#include "Rtmp/utils.h" -#include "Rtsp/Rtsp.h" +#include "Thread/ThreadPool.h" + using namespace ZL::Util; namespace ZL { diff --git a/src/Rtmp/RtmpProtocol.h b/src/Rtmp/RtmpProtocol.h index ccc75fb7..23ae5e54 100644 --- a/src/Rtmp/RtmpProtocol.h +++ b/src/Rtmp/RtmpProtocol.h @@ -9,15 +9,15 @@ #define SRC_RTMP_RTMPPROTOCOL_H_ #include -#include -#include "Util/logger.h" -#include "Util/util.h" -#include "Network/Socket.hpp" -#include "Util/TimeTicker.h" -#include -#include "Rtmp.h" #include +#include +#include #include "amf.h" +#include "Rtmp.h" +#include "Util/util.h" +#include "Util/logger.h" +#include "Util/TimeTicker.h" +#include "Network/Socket.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtmp/RtmpPusher.cpp b/src/Rtmp/RtmpPusher.cpp index 51ca028f..f13ed160 100644 --- a/src/Rtmp/RtmpPusher.cpp +++ b/src/Rtmp/RtmpPusher.cpp @@ -6,11 +6,11 @@ */ #include "RtmpPusher.h" -#include "Thread/ThreadPool.hpp" -#include "Util/util.h" -#include "Util/onceToken.h" #include "Rtmp/utils.h" #include "Rtsp/Rtsp.h" +#include "Util/util.h" +#include "Util/onceToken.h" +#include "Thread/ThreadPool.h" using namespace ZL::Util; diff --git a/src/Rtmp/RtmpPusher.h b/src/Rtmp/RtmpPusher.h index 7ef7463e..1ef501ad 100644 --- a/src/Rtmp/RtmpPusher.h +++ b/src/Rtmp/RtmpPusher.h @@ -9,8 +9,8 @@ #define SRC_RTMP_RTMPPUSHER_H_ #include "RtmpProtocol.h" -#include "Network/TcpClient.h" #include "RtmpMediaSource.h" +#include "Network/TcpClient.h" namespace ZL { namespace Rtmp { diff --git a/src/Rtmp/RtmpSession.h b/src/Rtmp/RtmpSession.h index 6c88dadf..a5ee0d21 100644 --- a/src/Rtmp/RtmpSession.h +++ b/src/Rtmp/RtmpSession.h @@ -10,15 +10,14 @@ #include #include - #include "amf.h" #include "Rtmp.h" #include "utils.h" #include "config.h" -#include "Util/util.h" -#include "Util/TimeTicker.h" #include "RtmpProtocol.h" #include "RtmpToRtspMediaSource.h" +#include "Util/util.h" +#include "Util/TimeTicker.h" #include "Network/TcpLimitedSession.h" using namespace ZL::Util; diff --git a/src/Rtmp/RtmpToRtspMediaSource.cpp b/src/Rtmp/RtmpToRtspMediaSource.cpp index c06b834b..682f4969 100644 --- a/src/Rtmp/RtmpToRtspMediaSource.cpp +++ b/src/Rtmp/RtmpToRtspMediaSource.cpp @@ -5,12 +5,12 @@ * Author: xzl */ -#include "Network/sockutil.h" +#include "config.h" #include "RtmpToRtspMediaSource.h" #include "Util/util.h" #include "Device/base64.h" #include "Network/sockutil.h" -#include "config.h" + using namespace ZL::Util; using namespace ZL::Network; diff --git a/src/Rtmp/RtmpToRtspMediaSource.h b/src/Rtmp/RtmpToRtspMediaSource.h index 56b74b69..89544d7a 100644 --- a/src/Rtmp/RtmpToRtspMediaSource.h +++ b/src/Rtmp/RtmpToRtspMediaSource.h @@ -7,23 +7,23 @@ #ifndef SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_ #define SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_ -#include -#include -#include -#include + #include -#include "Util/logger.h" +#include +#include +#include +#include #include "amf.h" #include "Rtmp.h" -#include "Util/util.h" -#include +#include "RtmpParser.h" #include "RtmpMediaSource.h" -#include "Rtsp/RtspMediaSource.h" #include "RTP/RtpMakerH264.h" #include "RTP/RtpMakerAAC.h" -#include "MedaiFile/MediaRecorder.h" #include "Rtsp/RtpParser.h" -#include "RtmpParser.h" +#include "Rtsp/RtspMediaSource.h" +#include "MedaiFile/MediaRecorder.h" +#include "Util/util.h" +#include "Util/logger.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtmp/amf.cpp b/src/Rtmp/amf.cpp index 22a00e47..3f572ec9 100644 --- a/src/Rtmp/amf.cpp +++ b/src/Rtmp/amf.cpp @@ -1,10 +1,11 @@ +#include +#include +#include #include "amf.h" #include "utils.h" -#include -#include -#include #include "Util/logger.h" #include "Util/util.h" + using namespace ZL::Util; /////////////////////AMFValue///////////////////////////// diff --git a/src/Rtmp/amf.h b/src/Rtmp/amf.h index 8745112d..43eec835 100644 --- a/src/Rtmp/amf.h +++ b/src/Rtmp/amf.h @@ -1,10 +1,11 @@ #ifndef __amf_h #define __amf_h -#include -#include #include +#include #include +#include + enum AMFType { AMF_NUMBER, AMF_INTEGER, diff --git a/src/Rtsp/RtpBroadCaster.cpp b/src/Rtsp/RtpBroadCaster.cpp index 2212b4db..8afe6a18 100644 --- a/src/Rtsp/RtpBroadCaster.cpp +++ b/src/Rtsp/RtpBroadCaster.cpp @@ -5,11 +5,11 @@ * Author: xzl */ -#include "Network/sockutil.h" -#include "RtpBroadCaster.h" -#include "Util/util.h" #include #include +#include "RtpBroadCaster.h" +#include "Util/util.h" +#include "Network/sockutil.h" namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/RtpBroadCaster.h b/src/Rtsp/RtpBroadCaster.h index 7de9758a..a128b06b 100644 --- a/src/Rtsp/RtpBroadCaster.h +++ b/src/Rtsp/RtpBroadCaster.h @@ -7,16 +7,17 @@ #ifndef SRC_RTSP_RTPBROADCASTER_H_ #define SRC_RTSP_RTPBROADCASTER_H_ -#include + #include -#include +#include #include -#include -#include "RtspMediaSource.h" -#include "Network/Socket.hpp" +#include #include -#include "Util/mini.hpp" +#include #include "config.h" +#include "RtspMediaSource.h" +#include "Util/mini.h" +#include "Network/Socket.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtsp/RtpParser.cpp b/src/Rtsp/RtpParser.cpp index 819d8796..b80fb04c 100644 --- a/src/Rtsp/RtpParser.cpp +++ b/src/Rtsp/RtpParser.cpp @@ -5,12 +5,14 @@ * Author: xzl */ +#include +#include #include "RtpParser.h" #include "Device/base64.h" #include "H264/SPSParser.h" -#include -#include + using namespace std; + namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/RtpParser.h b/src/Rtsp/RtpParser.h index f0de316c..e0da8d55 100644 --- a/src/Rtsp/RtpParser.h +++ b/src/Rtsp/RtpParser.h @@ -7,11 +7,12 @@ #ifndef SRC_RTP_RTPPARSER_H_ #define SRC_RTP_RTPPARSER_H_ -#include "Player/Player.h" -#include "Rtsp/Rtsp.h" + #include -#include "Util/TimeTicker.h" +#include "Rtsp/Rtsp.h" +#include "Player/Player.h" #include "Player/PlayerBase.h" +#include "Util/TimeTicker.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtsp/Rtsp.cpp b/src/Rtsp/Rtsp.cpp index 3a6226dd..49da3b79 100644 --- a/src/Rtsp/Rtsp.cpp +++ b/src/Rtsp/Rtsp.cpp @@ -5,8 +5,9 @@ * Author: xzl */ -#include "Rtsp.h" #include +#include "Rtsp.h" + string FindField(const char* buf, const char* start, const char *end ,int bufSize) { if(bufSize <=0 ){ bufSize = strlen(buf); diff --git a/src/Rtsp/Rtsp.h b/src/Rtsp/Rtsp.h index 28c10817..0fe3ac91 100644 --- a/src/Rtsp/Rtsp.h +++ b/src/Rtsp/Rtsp.h @@ -1,11 +1,12 @@ #ifndef RTSP_RTSP_H_ #define RTSP_RTSP_H_ -#include "config.h" #include #include -#include #include +#include +#include "config.h" + using namespace std; typedef enum { diff --git a/src/Rtsp/RtspMediaSource.cpp b/src/Rtsp/RtspMediaSource.cpp index 6469f744..b5cc8ed6 100644 --- a/src/Rtsp/RtspMediaSource.cpp +++ b/src/Rtsp/RtspMediaSource.cpp @@ -7,8 +7,8 @@ #include "RtspMediaSource.h" #include "MedaiFile/MediaReader.h" -using namespace ZL::MediaFile; +using namespace ZL::MediaFile; namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/RtspMediaSource.h b/src/Rtsp/RtspMediaSource.h index 0bc59057..77275d35 100644 --- a/src/Rtsp/RtspMediaSource.h +++ b/src/Rtsp/RtspMediaSource.h @@ -8,20 +8,20 @@ #ifndef SRC_RTSP_RTSPMEDIASOURCE_H_ #define SRC_RTSP_RTSPMEDIASOURCE_H_ -#include "config.h" -#include "Util/NoticeCenter.h" -#include "Util/ResourcePool.h" -#include -#include -#include -#include "Util/RingBuffer.hpp" -#include #include -#include "Util/logger.h" -#include "Thread/ThreadPool.hpp" -#include "Util/TimeTicker.h" -#include "MediaSender.h" +#include +#include +#include +#include +#include "config.h" #include "Rtsp.h" +#include "MediaSender.h" +#include "Util/logger.h" +#include "Util/RingBuffer.h" +#include "Util/TimeTicker.h" +#include "Util/ResourcePool.h" +#include "Util/NoticeCenter.h" +#include "Thread/ThreadPool.h" using namespace std; using namespace ZL::Util; diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 74fc7a6f..cb5ea0bd 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -4,11 +4,11 @@ #include #include -#include "RtspPlayer.h" #include "config.h" -#include "Util/mini.hpp" +#include "RtspPlayer.h" #include "Device/base64.h" #include "H264/SPSParser.h" +#include "Util/mini.h" #include "Network/sockutil.h" using namespace ZL::Util; diff --git a/src/Rtsp/RtspPlayer.h b/src/Rtsp/RtspPlayer.h index f648453d..5360ec70 100644 --- a/src/Rtsp/RtspPlayer.h +++ b/src/Rtsp/RtspPlayer.h @@ -7,26 +7,28 @@ #ifndef SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_ #define SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_ + #include -#include "Player/PlayerBase.h" -#include "Poller/Timer.hpp" -#include "RtspMediaSource.h" #include -#include "RtspSession.h" -#include "Util/logger.h" -#include "Util/util.h" -#include "Network/Socket.hpp" -#include "Network/TcpClient.h" -#include "Util/TimeTicker.h" -#include "Rtsp.h" #include +#include "Rtsp.h" +#include "RtspSession.h" +#include "RtspMediaSource.h" +#include "Player/PlayerBase.h" +#include "Util/util.h" +#include "Util/logger.h" +#include "Util/TimeTicker.h" +#include "Poller/Timer.h" +#include "Network/Socket.h" +#include "Network/TcpClient.h" using namespace std; -using namespace ZL::Util; -using namespace ZL::Network; using namespace ZL::Rtsp; -using namespace ZL::Poller; using namespace ZL::Player; +using namespace ZL::Util; +using namespace ZL::Poller; +using namespace ZL::Network; + namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/RtspPlayerImp.h b/src/Rtsp/RtspPlayerImp.h index dc0bcf2e..c55d1d9c 100644 --- a/src/Rtsp/RtspPlayerImp.h +++ b/src/Rtsp/RtspPlayerImp.h @@ -8,14 +8,14 @@ #ifndef SRC_RTP_RTPPARSERTESTER_H_ #define SRC_RTP_RTPPARSERTESTER_H_ -#include -#include #include -#include "RtspPlayer.h" -#include "RtpParser.h" +#include +#include #include "config.h" +#include "RtpParser.h" +#include "RtspPlayer.h" +#include "Poller/Timer.h" #include "Util/TimeTicker.h" -#include "Poller/Timer.hpp" using namespace std; using namespace ZL::Util; diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 34fd5c1b..25ed72b4 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -5,18 +5,17 @@ * Author: xzl */ #include -#include "config.h" #include -#include "Network/sockutil.h" -#include "RtspSession.h" -#include "Util/onceToken.h" -#include "Device/base64.h" -#include "UDPServer.h" #include +#include "config.h" +#include "UDPServer.h" +#include "RtspSession.h" +#include "Device/base64.h" +#include "Util/mini.h" +#include "Util/onceToken.h" #include "Util/TimeTicker.h" #include "Util/NoticeCenter.h" -#include "config.h" -#include "Util/mini.hpp" +#include "Network/sockutil.h" using namespace Config; using namespace ZL::Util; diff --git a/src/Rtsp/RtspSession.h b/src/Rtsp/RtspSession.h index 1dcb8488..67703ed6 100644 --- a/src/Rtsp/RtspSession.h +++ b/src/Rtsp/RtspSession.h @@ -9,17 +9,16 @@ #define SESSION_RTSPSESSION_H_ #include -#include #include +#include #include - #include "config.h" #include "Rtsp.h" -#include "Util/util.h" -#include "Util/logger.h" #include "RtpBroadCaster.h" #include "RtspMediaSource.h" #include "Player/PlayerBase.h" +#include "Util/util.h" +#include "Util/logger.h" #include "Network/TcpLimitedSession.h" using namespace std; diff --git a/src/Rtsp/RtspToRtmpMediaSource.cpp b/src/Rtsp/RtspToRtmpMediaSource.cpp index 64922621..fc2e1be6 100644 --- a/src/Rtsp/RtspToRtmpMediaSource.cpp +++ b/src/Rtsp/RtspToRtmpMediaSource.cpp @@ -5,21 +5,22 @@ * Author: xzl */ -#include "RtspToRtmpMediaSource.h" -#include "Rtmp/Rtmp.h" -#include "Util/util.h" #include #include #include #include -#include #include +#include #include -#include "Network/sockutil.h" #include "config.h" +#include "Rtmp/Rtmp.h" +#include "RtspToRtmpMediaSource.h" +#include "Util/util.h" +#include "Network/sockutil.h" using namespace ZL::Util; using namespace ZL::Network; + namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/RtspToRtmpMediaSource.h b/src/Rtsp/RtspToRtmpMediaSource.h index 2a8ec64f..6ee6716d 100644 --- a/src/Rtsp/RtspToRtmpMediaSource.h +++ b/src/Rtsp/RtspToRtmpMediaSource.h @@ -8,11 +8,11 @@ #ifndef SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_ #define SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_ -#include "MedaiFile/MediaRecorder.h" -#include "RtspMediaSource.h" #include "RtpParser.h" -#include "Rtmp/RtmpMediaSource.h" +#include "RtspMediaSource.h" #include "Rtmp/amf.h" +#include "Rtmp/RtmpMediaSource.h" +#include "MedaiFile/MediaRecorder.h" using namespace ZL::Rtmp; using namespace ZL::MediaFile; diff --git a/src/Rtsp/UDPServer.cpp b/src/Rtsp/UDPServer.cpp index 64d4ab44..e229867c 100644 --- a/src/Rtsp/UDPServer.cpp +++ b/src/Rtsp/UDPServer.cpp @@ -8,7 +8,9 @@ #include #include "UDPServer.h" #include "Util/TimeTicker.h" + using namespace ZL::Util; + namespace ZL { namespace Rtsp { diff --git a/src/Rtsp/UDPServer.h b/src/Rtsp/UDPServer.h index 6670f67a..530eddaf 100644 --- a/src/Rtsp/UDPServer.h +++ b/src/Rtsp/UDPServer.h @@ -7,16 +7,19 @@ #ifndef RTSP_UDPSERVER_H_ #define RTSP_UDPSERVER_H_ -#include -#include "Network/Socket.hpp" -#include "unordered_map" + #include -#include "Util/logger.h" +#include +#include +#include #include "Util/util.h" -#include "unordered_set" +#include "Util/logger.h" +#include "Network/Socket.h" + using namespace std; using namespace ZL::Util; using namespace ZL::Network; + namespace ZL { namespace Rtsp { diff --git a/src/Shell/CMD.h b/src/Shell/CMD.h index e7b012a7..a86c2073 100644 --- a/src/Shell/CMD.h +++ b/src/Shell/CMD.h @@ -7,14 +7,16 @@ #ifndef SRC_SHELL_CMD_H_ #define SRC_SHELL_CMD_H_ -#include + #include -#include -#include +#include #include #include +#include +#include #include "Util/util.h" #include "Util/logger.h" + using namespace std; using namespace ZL::Util; diff --git a/src/Shell/ShellSession.cpp b/src/Shell/ShellSession.cpp index 6c83ea4f..43877993 100644 --- a/src/Shell/ShellSession.cpp +++ b/src/Shell/ShellSession.cpp @@ -5,12 +5,12 @@ * Author: xzl */ +#include "config.h" #include "ShellSession.h" #include "Util/logger.h" #include "Util/util.h" #include "Util/onceToken.h" -#include "Util/mini.hpp" -#include "config.h" +#include "Util/mini.h" using namespace ZL::Util; diff --git a/src/config.h b/src/config.h index 5dc51386..7dd4d0ed 100644 --- a/src/config.h +++ b/src/config.h @@ -9,11 +9,10 @@ #ifndef appConfig_h #define appConfig_h -#include "Util/mini.hpp" +#include "Util/mini.h" using namespace ZL::Util; namespace Config { - ////////////TCP最大连接数/////////// #ifdef __x86_64__ #define MAX_TCP_SESSION 512 diff --git a/test/DeviceHK.cpp b/test/DeviceHK.cpp index b8e93a5c..d44a3ce3 100644 --- a/test/DeviceHK.cpp +++ b/test/DeviceHK.cpp @@ -6,8 +6,8 @@ */ #ifdef ENABLE_HKDEVICE #include "DeviceHK.h" -#include "Util/TimeTicker.h" #include "Util/MD5.h" +#include "Util/TimeTicker.h" namespace ZL { namespace DEV { diff --git a/test/DeviceHK.h b/test/DeviceHK.h index 235bbe7b..61b3443e 100644 --- a/test/DeviceHK.h +++ b/test/DeviceHK.h @@ -9,8 +9,8 @@ #define DEVICE_DEVICEHK_H_ #include -#include "HCNetSDK.h" #include "PlayM4.h" +#include "HCNetSDK.h" #include "Device/Device.h" #include "Util/onceToken.h" #include "Util/logger.h" diff --git a/test/test.cpp b/test/test.cpp index eef8f62c..d8a73d13 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -8,20 +8,20 @@ #include #include #include -#include "Util/SqlPool.h" -#include "Util/logger.h" -#include "Util/onceToken.h" #include "Rtsp/UDPServer.h" #include "Rtsp/RtspSession.h" #include "Rtmp/RtmpSession.h" -#include "Network/TcpServer.h" -#include "Poller/EventPoller.hpp" -#include "Thread/WorkThreadPool.h" #include "Http/HttpSession.h" #include "Http/HttpsSession.h" #include "Util/SSLBox.h" +#include "Util/SqlPool.h" +#include "Util/logger.h" +#include "Util/onceToken.h" +#include "Network/TcpServer.h" +#include "Poller/EventPoller.h" +#include "Thread/WorkThreadPool.h" #ifdef ENABLE_HKDEVICE -#include "test/DeviceHK.h" +#include "DeviceHK.h" #endif //ENABLE_HKDEVICE using namespace std;