整理代码

This commit is contained in:
xiongzilaing 2017-04-25 11:35:41 +08:00
parent 5ae69f6e57
commit 0eb82e4627
75 changed files with 260 additions and 252 deletions

View File

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="2101233173096" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="689079599215608580" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
@ -16,7 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-863197511674744034" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1841186106001966342" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
@ -27,7 +27,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorCygwin" console="false" env-hash="-1608958325086134348" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cygwin" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorCygwin" console="false" env-hash="-541592762162302216" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cygwin" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

View File

@ -5,16 +5,15 @@
* Author: xzl * Author: xzl
*/ */
#ifdef ENABLE_FAAC #ifdef ENABLE_FAAC
#include <cstdlib>
#include "AACEncoder.h" #include "AACEncoder.h"
#include "Util/logger.h" #include "Util/logger.h"
#include <cstdlib>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <faac.h> #include <faac.h>
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -8,7 +8,6 @@
#ifndef CODEC_AACENCODER_H_ #ifndef CODEC_AACENCODER_H_
#define CODEC_AACENCODER_H_ #define CODEC_AACENCODER_H_
namespace ZL { namespace ZL {
namespace Codec { namespace Codec {

View File

@ -7,17 +7,15 @@
#ifndef CODEC_H264ENCODER_H_ #ifndef CODEC_H264ENCODER_H_
#define CODEC_H264ENCODER_H_ #define CODEC_H264ENCODER_H_
#include <cstdint> #include <cstdint>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif //__cplusplus #endif //__cplusplus
#include <x264.h> #include <x264.h>
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif //__cplusplus #endif //__cplusplus
namespace ZL { namespace ZL {

View File

@ -5,14 +5,14 @@
* Author: xzl * Author: xzl
*/ */
#include <stdio.h>
#include <stdio.h>
#include "base64.h"
#include "Device.h" #include "Device.h"
#include "Util/logger.h" #include "Util/logger.h"
#include <stdio.h>
#include "Util/util.h" #include "Util/util.h"
#include <cstdio>
#include "base64.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -7,14 +7,16 @@
#ifndef DEVICE_DEVICE_H_ #ifndef DEVICE_DEVICE_H_
#define DEVICE_DEVICE_H_ #define DEVICE_DEVICE_H_
#include <sys/time.h> #include <sys/time.h>
#include <memory>
#include <string> #include <string>
#include <functional> #include <functional>
#include <memory>
#include "Util/util.h" #include "Util/util.h"
#include "RTP/RtpMakerAAC.h" #include "RTP/RtpMakerAAC.h"
#include "RTP/RtpMakerH264.h" #include "RTP/RtpMakerH264.h"
#include "Rtsp/RtspToRtmpMediaSource.h" #include "Rtsp/RtspToRtmpMediaSource.h"
using namespace std; using namespace std;
using namespace ZL::Rtsp; using namespace ZL::Rtsp;
using namespace ZL::Util; using namespace ZL::Util;
@ -29,7 +31,6 @@ using namespace ZL::Codec;
using namespace ZL::Codec; using namespace ZL::Codec;
#endif //ENABLE_X264 #endif //ENABLE_X264
using namespace ZL::Rtsp;
namespace ZL { namespace ZL {
namespace DEV { namespace DEV {
@ -46,7 +47,6 @@ public:
int iSampleRate; int iSampleRate;
}; };
class DevChannel { class DevChannel {
public: public:
typedef std::shared_ptr<DevChannel> Ptr; typedef std::shared_ptr<DevChannel> Ptr;

View File

@ -5,12 +5,12 @@
* Author: xzl * Author: xzl
*/ */
#include "config.h"
#include "PlayerProxy.h" #include "PlayerProxy.h"
#include "Thread/AsyncTaskThread.h" #include "Util/mini.h"
#include "Util/MD5.h" #include "Util/MD5.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "config.h" #include "Thread/AsyncTaskThread.h"
#include "Util/mini.hpp"
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Thread; using namespace ZL::Thread;

View File

@ -8,8 +8,8 @@
#ifndef SRC_DEVICE_PLAYERPROXY_H_ #ifndef SRC_DEVICE_PLAYERPROXY_H_
#define SRC_DEVICE_PLAYERPROXY_H_ #define SRC_DEVICE_PLAYERPROXY_H_
#include "Device.h"
#include <memory> #include <memory>
#include "Device.h"
#include "Player/MediaPlayer.h" #include "Player/MediaPlayer.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"

View File

@ -8,6 +8,7 @@
#include "H264Parser.h" #include "H264Parser.h"
#include "Util/logger.h" #include "Util/logger.h"
using namespace ZL::Util; using namespace ZL::Util;
H264Parser::H264Parser(){ H264Parser::H264Parser(){

View File

@ -1,5 +1,5 @@
// //
// H264Parser.hpp // H264Parser.h
// MediaPlayer // MediaPlayer
// //
// Created by xzl on 2017/1/16. // Created by xzl on 2017/1/16.
@ -11,8 +11,8 @@
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>
#include "h264_parser.h"
#include "h264_poc.h" #include "h264_poc.h"
#include "h264_parser.h"
using namespace std; using namespace std;

View File

@ -17,7 +17,7 @@
#include "Util/util.h" #include "Util/util.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
#include "Util/onceToken.h" #include "Util/onceToken.h"
#include "Util/mini.hpp" #include "Util/mini.h"
#include "Util/NoticeCenter.h" #include "Util/NoticeCenter.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,10 +8,10 @@
#ifndef SRC_HTTP_HTTPSESSION_H_ #ifndef SRC_HTTP_HTTPSESSION_H_
#define SRC_HTTP_HTTPSESSION_H_ #define SRC_HTTP_HTTPSESSION_H_
#include <functional>
#include "config.h" #include "config.h"
#include "Rtsp/Rtsp.h" #include "Rtsp/Rtsp.h"
#include "Network/TcpLimitedSession.h" #include "Network/TcpLimitedSession.h"
#include <functional>
using namespace std; using namespace std;
using namespace ZL::Network; using namespace ZL::Network;

View File

@ -11,6 +11,7 @@
#include "HttpSession.h" #include "HttpSession.h"
#include "Util/SSLBox.h" #include "Util/SSLBox.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -5,8 +5,8 @@
* Author: xzl * Author: xzl
*/ */
#include "strCoding.h"
#include <string.h> #include <string.h>
#include "strCoding.h"
namespace ZL { namespace ZL {
namespace Http { namespace Http {

View File

@ -11,10 +11,6 @@
#include <iostream> #include <iostream>
#include <string> #include <string>
#ifdef _WINDOWS
#include <windows.h>
#endif
using namespace std; using namespace std;
namespace ZL { namespace ZL {

View File

@ -5,8 +5,8 @@
* Author: root * Author: root
*/ */
#include "HLSMaker.h"
#include <sys/time.h> #include <sys/time.h>
#include "HLSMaker.h"
namespace ZL { namespace ZL {
namespace MediaFile { namespace MediaFile {

View File

@ -8,12 +8,13 @@
#ifndef HLSMAKER_H_ #ifndef HLSMAKER_H_
#define HLSMAKER_H_ #define HLSMAKER_H_
#include "config.h"
#include "TSMaker.h" #include "TSMaker.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
#include "Util/File.h" #include "Util/File.h"
#include "Util/util.h" #include "Util/util.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "config.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -5,10 +5,10 @@
* Author: xzl * Author: xzl
*/ */
#include "MediaReader.h"
#include "Http/HttpSession.h"
#include "config.h" #include "config.h"
#include "Util/mini.hpp" #include "MediaReader.h"
#include "Util/mini.h"
#include "Http/HttpSession.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,9 +8,9 @@
#ifndef SRC_MEDAIFILE_MEDIAREADER_H_ #ifndef SRC_MEDAIFILE_MEDIAREADER_H_
#define SRC_MEDAIFILE_MEDIAREADER_H_ #define SRC_MEDAIFILE_MEDIAREADER_H_
#include "Device/Device.h"
#include "Rtsp/RtspMediaSource.h" #include "Rtsp/RtspMediaSource.h"
#include "Rtmp/RtmpMediaSource.h" #include "Rtmp/RtmpMediaSource.h"
#include "Device/Device.h"
#ifdef ENABLE_MEDIAFILE #ifdef ENABLE_MEDIAFILE
#include <mp4v2/mp4v2.h> #include <mp4v2/mp4v2.h>

View File

@ -6,12 +6,11 @@
*/ */
#include "config.h" #include "config.h"
#include "Network/sockutil.h"
#include "MediaRecorder.h" #include "MediaRecorder.h"
#include "Util/util.h"
#include "Http/HttpSession.h" #include "Http/HttpSession.h"
#include "config.h" #include "Util/util.h"
#include "Util/mini.hpp" #include "Util/mini.h"
#include "Network/sockutil.h"
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Network; using namespace ZL::Network;

View File

@ -8,8 +8,8 @@
#ifndef SRC_MEDAIFILE_MEDIARECORDER_H_ #ifndef SRC_MEDAIFILE_MEDIARECORDER_H_
#define SRC_MEDAIFILE_MEDIARECORDER_H_ #define SRC_MEDAIFILE_MEDIARECORDER_H_
#include "Player/PlayerBase.h"
#include <memory> #include <memory>
#include "Player/PlayerBase.h"
#ifdef ENABLE_MEDIAFILE #ifdef ENABLE_MEDIAFILE
#include "Mp4Maker.h" #include "Mp4Maker.h"
#include "HLSMaker.h" #include "HLSMaker.h"

View File

@ -1,14 +1,14 @@
#ifdef ENABLE_MEDIAFILE #ifdef ENABLE_MEDIAFILE
#include "MediaRecorder.h"
#include <netinet/in.h> #include <netinet/in.h>
#include <sys/stat.h> #include <sys/stat.h>
#include "Util/File.h"
#include "Mp4Maker.h"
#include "Util/NoticeCenter.h"
#include "config.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; using namespace ZL::Util;

View File

@ -11,17 +11,17 @@
#ifdef ENABLE_MEDIAFILE #ifdef ENABLE_MEDIAFILE
#include <mutex> #include <mutex>
#include "Player/PlayerBase.h"
#include <memory> #include <memory>
#include "Util/logger.h"
#include "Util/util.h"
#include "Util/TimeTicker.h"
#include <mp4v2/mp4v2.h> #include <mp4v2/mp4v2.h>
#include "Player/PlayerBase.h"
#include "Util/util.h"
#include "Util/logger.h"
#include "Util/TimeTicker.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
using namespace std; using namespace std;
using namespace ZL::Player;
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Player;
namespace ZL { namespace ZL {
namespace MediaFile { namespace MediaFile {

View File

@ -5,9 +5,9 @@
* Author: root * Author: root
*/ */
#include <sys/time.h>
#include "TSMaker.h" #include "TSMaker.h"
#include "Util/logger.h" #include "Util/logger.h"
#include <sys/time.h>
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,17 +8,17 @@
#ifndef TSMAKER_H_ #ifndef TSMAKER_H_
#define TSMAKER_H_ #define TSMAKER_H_
#include "CRC/crc32.h"
#include <string>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream>
#include <string.h> #include <string.h>
#include <string>
#include <iostream>
#include "CRC/crc32.h"
#include "Util/File.h" #include "Util/File.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
#define TS_PACKET_SIZE 188 #define TS_PACKET_SIZE 188
#define TS_PACKET_HEADER 4 #define TS_PACKET_HEADER 4
#define TS_SYNC_BYTE 0x47 #define TS_SYNC_BYTE 0x47

View File

@ -7,7 +7,8 @@
#ifndef SRC_MEDIASENDER_H_ #ifndef SRC_MEDIASENDER_H_
#define SRC_MEDIASENDER_H_ #define SRC_MEDIASENDER_H_
#include "Thread/ThreadPool.hpp"
#include "Thread/ThreadPool.h"
using namespace ZL::Thread; using namespace ZL::Thread;
class MediaSender { class MediaSender {

View File

@ -5,10 +5,10 @@
* Author: xzl * Author: xzl
*/ */
#include <algorithm>
#include "MediaPlayer.h"
#include "Rtmp/RtmpPlayerImp.h" #include "Rtmp/RtmpPlayerImp.h"
#include "Rtsp/RtspPlayerImp.h" #include "Rtsp/RtspPlayerImp.h"
#include "MediaPlayer.h"
#include <algorithm>
using namespace ZL::Rtmp; using namespace ZL::Rtmp;
using namespace ZL::Rtsp; using namespace ZL::Rtsp;

View File

@ -8,12 +8,12 @@
#ifndef SRC_PLAYER_MEDIAPLAYER_H_ #ifndef SRC_PLAYER_MEDIAPLAYER_H_
#define SRC_PLAYER_MEDIAPLAYER_H_ #define SRC_PLAYER_MEDIAPLAYER_H_
#include <memory>
#include <string>
#include "Player.h" #include "Player.h"
#include "PlayerBase.h" #include "PlayerBase.h"
#include <string>
#include <memory>
using namespace std;
using namespace std;
namespace ZL { namespace ZL {
namespace Player { namespace Player {

View File

@ -5,12 +5,12 @@
* Author: xzl * Author: xzl
*/ */
#include <cstring>
#include "Player.h" #include "Player.h"
#include "H264/SPSParser.h" #include "H264/SPSParser.h"
#include <cstring>
#include "Util/logger.h" #include "Util/logger.h"
using namespace ZL::Util;
using namespace ZL::Util;
static unsigned const samplingFrequencyTable[16] = { 96000, 88200, static unsigned const samplingFrequencyTable[16] = { 96000, 88200,
64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025,

View File

@ -5,11 +5,11 @@
* Author: xzl * Author: xzl
*/ */
#include "PlayerBase.h"
#include "Rtmp/RtmpPlayerImp.h"
#include "Rtsp/RtspPlayerImp.h"
#include "Rtsp/Rtsp.h"
#include <algorithm> #include <algorithm>
#include "PlayerBase.h"
#include "Rtsp/Rtsp.h"
#include "Rtsp/RtspPlayerImp.h"
#include "Rtmp/RtmpPlayerImp.h"
using namespace std; using namespace std;
using namespace ZL::Rtmp; using namespace ZL::Rtmp;

View File

@ -8,18 +8,18 @@
#ifndef SRC_PLAYER_PLAYERBASE_H_ #ifndef SRC_PLAYER_PLAYERBASE_H_
#define SRC_PLAYER_PLAYERBASE_H_ #define SRC_PLAYER_PLAYERBASE_H_
#include "Player.h"
#include "Network/Socket.hpp"
#include <functional>
#include <memory> #include <memory>
#include <string> #include <string>
#include <functional>
#include "Player.h"
#include "Network/Socket.h"
using namespace std; using namespace std;
using namespace ZL::Network; using namespace ZL::Network;
namespace ZL { namespace ZL {
namespace Player { namespace Player {
class PlayerBase{ class PlayerBase{
public: public:
typedef std::shared_ptr<PlayerBase> Ptr; typedef std::shared_ptr<PlayerBase> Ptr;

View File

@ -9,11 +9,11 @@
#define RTP_RTPMAKER_H_ #define RTP_RTPMAKER_H_
#include "Rtsp/RtspMediaSource.h" #include "Rtsp/RtspMediaSource.h"
#include "Util/ResourcePool.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "Util/RingBuffer.hpp" #include "Util/RingBuffer.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
#include "Thread/ThreadPool.hpp" #include "Util/ResourcePool.h"
#include "Thread/ThreadPool.h"
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Thread; using namespace ZL::Thread;

View File

@ -6,9 +6,9 @@
*/ */
#include <netinet/in.h> #include <netinet/in.h>
#include "RtpMakerAAC.h"
#include "config.h" #include "config.h"
#include "Util/mini.hpp" #include "RtpMakerAAC.h"
#include "Util/mini.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -7,14 +7,15 @@
#ifndef RTP_RTPMAKERAAC_H_ #ifndef RTP_RTPMAKERAAC_H_
#define RTP_RTPMAKERAAC_H_ #define RTP_RTPMAKERAAC_H_
#include <memory>
#include "RtpMaker.h"
#include "Rtsp/RtspMediaSource.h" #include "Rtsp/RtspMediaSource.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "Util/RingBuffer.hpp" #include "Util/RingBuffer.h"
#include "RtpMaker.h"
#include <memory>
#include "Util/ResourcePool.h" #include "Util/ResourcePool.h"
using namespace std;
using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -6,9 +6,9 @@
*/ */
#include <netinet/in.h> #include <netinet/in.h>
#include "RtpMakerH264.h"
#include "config.h" #include "config.h"
#include "Util/mini.hpp" #include "RtpMakerH264.h"
#include "Util/mini.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,11 +8,12 @@
#ifndef RTP_RTPMAKERH264_H_ #ifndef RTP_RTPMAKERH264_H_
#define RTP_RTPMAKERH264_H_ #define RTP_RTPMAKERH264_H_
#include <memory>
#include "RtpMaker.h"
#include "Rtsp/RtspMediaSource.h" #include "Rtsp/RtspMediaSource.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "Util/RingBuffer.hpp" #include "Util/RingBuffer.h"
#include "RtpMaker.h"
#include <memory>
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Rtsp; using namespace ZL::Rtsp;

View File

@ -2,22 +2,18 @@
#define __rtmp_h #define __rtmp_h
#include <netinet/in.h> #include <netinet/in.h>
#include "Util/util.h"
#include <string>
#include <memory> #include <memory>
#include <string>
#include "Util/util.h"
#include "Util/logger.h" #include "Util/logger.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
#define PORT 1935 #define PORT 1935
#define DEFAULT_CHUNK_LEN 128 #define DEFAULT_CHUNK_LEN 128
#define PACKED __attribute__((packed)) #define PACKED __attribute__((packed))
#define HANDSHAKE_PLAINTEXT 0x03 #define HANDSHAKE_PLAINTEXT 0x03
#define RANDOM_LEN (1536 - 8) #define RANDOM_LEN (1536 - 8)
#define MSG_SET_CHUNK 1 /*Set Chunk Size (1)*/ #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_OBJECT 19 /*Shared Object Message (19, 16) AMF0*/
#define MSG_AGGREGATE 22 /*Aggregate Message (22)*/ #define MSG_AGGREGATE 22 /*Aggregate Message (22)*/
#define CONTROL_STREAM_BEGIN 0 #define CONTROL_STREAM_BEGIN 0
#define CONTROL_STREAM_EOF 1 #define CONTROL_STREAM_EOF 1
#define CONTROL_STREAM_DRY 2 #define CONTROL_STREAM_DRY 2
@ -45,7 +40,6 @@ using namespace ZL::Util;
#define CONTROL_PING_REQUEST 6 #define CONTROL_PING_REQUEST 6
#define CONTROL_PING_RESPONSE 7 #define CONTROL_PING_RESPONSE 7
#define STREAM_CONTROL 0 #define STREAM_CONTROL 0
#define STREAM_MEDIA 1 #define STREAM_MEDIA 1

View File

@ -7,8 +7,8 @@
#include "RtmpMediaSource.h" #include "RtmpMediaSource.h"
#include "MedaiFile/MediaReader.h" #include "MedaiFile/MediaReader.h"
using namespace ZL::MediaFile;
using namespace ZL::MediaFile;
namespace ZL { namespace ZL {
namespace Rtmp { namespace Rtmp {

View File

@ -8,24 +8,23 @@
#ifndef SRC_RTMP_RTMPMEDIASOURCE_H_ #ifndef SRC_RTMP_RTMPMEDIASOURCE_H_
#define SRC_RTMP_RTMPMEDIASOURCE_H_ #define SRC_RTMP_RTMPMEDIASOURCE_H_
#include "config.h"
#include <netinet/in.h> #include <netinet/in.h>
#include "Util/NoticeCenter.h" #include <mutex>
#include "Util/ResourcePool.h" #include <memory>
#include <string> #include <string>
#include <functional> #include <functional>
#include <memory>
#include "Util/RingBuffer.hpp"
#include <unordered_map> #include <unordered_map>
#include <mutex>
#include "Util/logger.h"
#include "Thread/ThreadPool.hpp"
#include "Util/TimeTicker.h"
#include "amf.h" #include "amf.h"
#include "Rtmp.h" #include "Rtmp.h"
#include "Util/util.h" #include "config.h"
#include "MediaSender.h" #include "MediaSender.h"
#include <mutex> #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 std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,16 +8,18 @@
#ifndef SRC_RTMP_RTMPPARSER_H_ #ifndef SRC_RTMP_RTMPPARSER_H_
#define SRC_RTMP_RTMPPARSER_H_ #define SRC_RTMP_RTMPPARSER_H_
#include "Rtmp.h"
#include "amf.h"
#include "Player/Player.h"
#include <unordered_map>
#include "Util/TimeTicker.h"
#include <functional> #include <functional>
#include <unordered_map>
#include "amf.h"
#include "Rtmp.h"
#include "Player/Player.h"
#include "Util/TimeTicker.h"
#include "Player/PlayerBase.h" #include "Player/PlayerBase.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Player; using namespace ZL::Player;
namespace ZL { namespace ZL {
namespace Rtmp { namespace Rtmp {

View File

@ -6,11 +6,12 @@
*/ */
#include "RtmpPlayer.h" #include "RtmpPlayer.h"
#include "Thread/ThreadPool.hpp" #include "Rtsp/Rtsp.h"
#include "Rtmp/utils.h"
#include "Util/util.h" #include "Util/util.h"
#include "Util/onceToken.h" #include "Util/onceToken.h"
#include "Rtmp/utils.h" #include "Thread/ThreadPool.h"
#include "Rtsp/Rtsp.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -9,18 +9,18 @@
#define SRC_RTMP_RtmpPlayer2_H_ #define SRC_RTMP_RtmpPlayer2_H_
#include <netinet/in.h> #include <netinet/in.h>
#include "Player/PlayerBase.h"
#include <string>
#include "Util/logger.h"
#include "Util/util.h"
#include "Network/Socket.hpp"
#include "Network/TcpClient.h"
#include "Util/TimeTicker.h"
#include <functional>
#include "Rtmp.h"
#include <memory> #include <memory>
#include <string>
#include <functional>
#include "amf.h" #include "amf.h"
#include "Rtmp.h"
#include "RtmpProtocol.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 std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -8,13 +8,13 @@
#ifndef SRC_RTMP_RTMPPLAYERIMP_H_ #ifndef SRC_RTMP_RTMPPLAYERIMP_H_
#define SRC_RTMP_RTMPPLAYERIMP_H_ #define SRC_RTMP_RTMPPLAYERIMP_H_
#include <functional>
#include <memory> #include <memory>
#include <functional>
#include "config.h"
#include "RtmpPlayer.h" #include "RtmpPlayer.h"
#include "RtmpParser.h" #include "RtmpParser.h"
#include "config.h" #include "Poller/Timer.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
#include "Poller/Timer.hpp"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -6,11 +6,12 @@
*/ */
#include "RtmpProtocol.h" #include "RtmpProtocol.h"
#include "Thread/ThreadPool.hpp" #include "Rtsp/Rtsp.h"
#include "Rtmp/utils.h"
#include "Util/util.h" #include "Util/util.h"
#include "Util/onceToken.h" #include "Util/onceToken.h"
#include "Rtmp/utils.h" #include "Thread/ThreadPool.h"
#include "Rtsp/Rtsp.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {

View File

@ -9,15 +9,15 @@
#define SRC_RTMP_RTMPPROTOCOL_H_ #define SRC_RTMP_RTMPPROTOCOL_H_
#include <netinet/in.h> #include <netinet/in.h>
#include <string>
#include "Util/logger.h"
#include "Util/util.h"
#include "Network/Socket.hpp"
#include "Util/TimeTicker.h"
#include <functional>
#include "Rtmp.h"
#include <memory> #include <memory>
#include <string>
#include <functional>
#include "amf.h" #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 std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -6,11 +6,11 @@
*/ */
#include "RtmpPusher.h" #include "RtmpPusher.h"
#include "Thread/ThreadPool.hpp"
#include "Util/util.h"
#include "Util/onceToken.h"
#include "Rtmp/utils.h" #include "Rtmp/utils.h"
#include "Rtsp/Rtsp.h" #include "Rtsp/Rtsp.h"
#include "Util/util.h"
#include "Util/onceToken.h"
#include "Thread/ThreadPool.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -9,8 +9,8 @@
#define SRC_RTMP_RTMPPUSHER_H_ #define SRC_RTMP_RTMPPUSHER_H_
#include "RtmpProtocol.h" #include "RtmpProtocol.h"
#include "Network/TcpClient.h"
#include "RtmpMediaSource.h" #include "RtmpMediaSource.h"
#include "Network/TcpClient.h"
namespace ZL { namespace ZL {
namespace Rtmp { namespace Rtmp {

View File

@ -10,15 +10,14 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <unordered_map> #include <unordered_map>
#include "amf.h" #include "amf.h"
#include "Rtmp.h" #include "Rtmp.h"
#include "utils.h" #include "utils.h"
#include "config.h" #include "config.h"
#include "Util/util.h"
#include "Util/TimeTicker.h"
#include "RtmpProtocol.h" #include "RtmpProtocol.h"
#include "RtmpToRtspMediaSource.h" #include "RtmpToRtspMediaSource.h"
#include "Util/util.h"
#include "Util/TimeTicker.h"
#include "Network/TcpLimitedSession.h" #include "Network/TcpLimitedSession.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -5,12 +5,12 @@
* Author: xzl * Author: xzl
*/ */
#include "Network/sockutil.h" #include "config.h"
#include "RtmpToRtspMediaSource.h" #include "RtmpToRtspMediaSource.h"
#include "Util/util.h" #include "Util/util.h"
#include "Device/base64.h" #include "Device/base64.h"
#include "Network/sockutil.h" #include "Network/sockutil.h"
#include "config.h"
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Network; using namespace ZL::Network;

View File

@ -7,23 +7,23 @@
#ifndef SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_ #ifndef SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_
#define SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_ #define SRC_RTMP_RTMPTORTSPMEDIASOURCE_H_
#include <string>
#include <functional>
#include <memory>
#include <unordered_map>
#include <mutex> #include <mutex>
#include "Util/logger.h" #include <string>
#include <memory>
#include <functional>
#include <unordered_map>
#include "amf.h" #include "amf.h"
#include "Rtmp.h" #include "Rtmp.h"
#include "Util/util.h" #include "RtmpParser.h"
#include <mutex>
#include "RtmpMediaSource.h" #include "RtmpMediaSource.h"
#include "Rtsp/RtspMediaSource.h"
#include "RTP/RtpMakerH264.h" #include "RTP/RtpMakerH264.h"
#include "RTP/RtpMakerAAC.h" #include "RTP/RtpMakerAAC.h"
#include "MedaiFile/MediaRecorder.h"
#include "Rtsp/RtpParser.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 std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -1,10 +1,11 @@
#include <string.h>
#include <stdexcept>
#include <arpa/inet.h>
#include "amf.h" #include "amf.h"
#include "utils.h" #include "utils.h"
#include <stdexcept>
#include <string.h>
#include <arpa/inet.h>
#include "Util/logger.h" #include "Util/logger.h"
#include "Util/util.h" #include "Util/util.h"
using namespace ZL::Util; using namespace ZL::Util;
/////////////////////AMFValue///////////////////////////// /////////////////////AMFValue/////////////////////////////

View File

@ -1,10 +1,11 @@
#ifndef __amf_h #ifndef __amf_h
#define __amf_h #define __amf_h
#include <string>
#include <unordered_map>
#include <assert.h> #include <assert.h>
#include <string>
#include <vector> #include <vector>
#include <unordered_map>
enum AMFType { enum AMFType {
AMF_NUMBER, AMF_NUMBER,
AMF_INTEGER, AMF_INTEGER,

View File

@ -5,11 +5,11 @@
* Author: xzl * Author: xzl
*/ */
#include "Network/sockutil.h"
#include "RtpBroadCaster.h"
#include "Util/util.h"
#include <arpa/inet.h> #include <arpa/inet.h>
#include <list> #include <list>
#include "RtpBroadCaster.h"
#include "Util/util.h"
#include "Network/sockutil.h"
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -7,16 +7,17 @@
#ifndef SRC_RTSP_RTPBROADCASTER_H_ #ifndef SRC_RTSP_RTPBROADCASTER_H_
#define SRC_RTSP_RTPBROADCASTER_H_ #define SRC_RTSP_RTPBROADCASTER_H_
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <memory> #include <netinet/in.h>
#include <mutex> #include <mutex>
#include <unordered_map> #include <memory>
#include "RtspMediaSource.h"
#include "Network/Socket.hpp"
#include <unordered_set> #include <unordered_set>
#include "Util/mini.hpp" #include <unordered_map>
#include "config.h" #include "config.h"
#include "RtspMediaSource.h"
#include "Util/mini.h"
#include "Network/Socket.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -5,12 +5,14 @@
* Author: xzl * Author: xzl
*/ */
#include <cctype>
#include <algorithm>
#include "RtpParser.h" #include "RtpParser.h"
#include "Device/base64.h" #include "Device/base64.h"
#include "H264/SPSParser.h" #include "H264/SPSParser.h"
#include <algorithm>
#include <cctype>
using namespace std; using namespace std;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -7,11 +7,12 @@
#ifndef SRC_RTP_RTPPARSER_H_ #ifndef SRC_RTP_RTPPARSER_H_
#define SRC_RTP_RTPPARSER_H_ #define SRC_RTP_RTPPARSER_H_
#include "Player/Player.h"
#include "Rtsp/Rtsp.h"
#include <unordered_map> #include <unordered_map>
#include "Util/TimeTicker.h" #include "Rtsp/Rtsp.h"
#include "Player/Player.h"
#include "Player/PlayerBase.h" #include "Player/PlayerBase.h"
#include "Util/TimeTicker.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -5,8 +5,9 @@
* Author: xzl * Author: xzl
*/ */
#include "Rtsp.h"
#include <stdlib.h> #include <stdlib.h>
#include "Rtsp.h"
string FindField(const char* buf, const char* start, const char *end ,int bufSize) { string FindField(const char* buf, const char* start, const char *end ,int bufSize) {
if(bufSize <=0 ){ if(bufSize <=0 ){
bufSize = strlen(buf); bufSize = strlen(buf);

View File

@ -1,11 +1,12 @@
#ifndef RTSP_RTSP_H_ #ifndef RTSP_RTSP_H_
#define RTSP_RTSP_H_ #define RTSP_RTSP_H_
#include "config.h"
#include <string.h> #include <string.h>
#include <string> #include <string>
#include <unordered_map>
#include <memory> #include <memory>
#include <unordered_map>
#include "config.h"
using namespace std; using namespace std;
typedef enum { typedef enum {

View File

@ -7,8 +7,8 @@
#include "RtspMediaSource.h" #include "RtspMediaSource.h"
#include "MedaiFile/MediaReader.h" #include "MedaiFile/MediaReader.h"
using namespace ZL::MediaFile;
using namespace ZL::MediaFile;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -8,20 +8,20 @@
#ifndef SRC_RTSP_RTSPMEDIASOURCE_H_ #ifndef SRC_RTSP_RTSPMEDIASOURCE_H_
#define SRC_RTSP_RTSPMEDIASOURCE_H_ #define SRC_RTSP_RTSPMEDIASOURCE_H_
#include "config.h"
#include "Util/NoticeCenter.h"
#include "Util/ResourcePool.h"
#include <string>
#include <functional>
#include <memory>
#include "Util/RingBuffer.hpp"
#include <unordered_map>
#include <mutex> #include <mutex>
#include "Util/logger.h" #include <string>
#include "Thread/ThreadPool.hpp" #include <memory>
#include "Util/TimeTicker.h" #include <functional>
#include "MediaSender.h" #include <unordered_map>
#include "config.h"
#include "Rtsp.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 std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -4,11 +4,11 @@
#include <algorithm> #include <algorithm>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "RtspPlayer.h"
#include "config.h" #include "config.h"
#include "Util/mini.hpp" #include "RtspPlayer.h"
#include "Device/base64.h" #include "Device/base64.h"
#include "H264/SPSParser.h" #include "H264/SPSParser.h"
#include "Util/mini.h"
#include "Network/sockutil.h" #include "Network/sockutil.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -7,26 +7,28 @@
#ifndef SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_ #ifndef SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_
#define SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_ #define SRC_RTSPPLAYER_RTSPPLAYER_H_TXT_
#include <netinet/in.h> #include <netinet/in.h>
#include "Player/PlayerBase.h"
#include "Poller/Timer.hpp"
#include "RtspMediaSource.h"
#include <string> #include <string>
#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 <memory> #include <memory>
#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 std;
using namespace ZL::Util;
using namespace ZL::Network;
using namespace ZL::Rtsp; using namespace ZL::Rtsp;
using namespace ZL::Poller;
using namespace ZL::Player; using namespace ZL::Player;
using namespace ZL::Util;
using namespace ZL::Poller;
using namespace ZL::Network;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -8,14 +8,14 @@
#ifndef SRC_RTP_RTPPARSERTESTER_H_ #ifndef SRC_RTP_RTPPARSERTESTER_H_
#define SRC_RTP_RTPPARSERTESTER_H_ #define SRC_RTP_RTPPARSERTESTER_H_
#include <functional>
#include <algorithm>
#include <memory> #include <memory>
#include "RtspPlayer.h" #include <algorithm>
#include "RtpParser.h" #include <functional>
#include "config.h" #include "config.h"
#include "RtpParser.h"
#include "RtspPlayer.h"
#include "Poller/Timer.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
#include "Poller/Timer.hpp"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -5,18 +5,17 @@
* Author: xzl * Author: xzl
*/ */
#include <arpa/inet.h> #include <arpa/inet.h>
#include "config.h"
#include <netinet/in.h> #include <netinet/in.h>
#include "Network/sockutil.h"
#include "RtspSession.h"
#include "Util/onceToken.h"
#include "Device/base64.h"
#include "UDPServer.h"
#include <atomic> #include <atomic>
#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/TimeTicker.h"
#include "Util/NoticeCenter.h" #include "Util/NoticeCenter.h"
#include "config.h" #include "Network/sockutil.h"
#include "Util/mini.hpp"
using namespace Config; using namespace Config;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -9,17 +9,16 @@
#define SESSION_RTSPSESSION_H_ #define SESSION_RTSPSESSION_H_
#include <netinet/in.h> #include <netinet/in.h>
#include <vector>
#include <set> #include <set>
#include <vector>
#include <unordered_map> #include <unordered_map>
#include "config.h" #include "config.h"
#include "Rtsp.h" #include "Rtsp.h"
#include "Util/util.h"
#include "Util/logger.h"
#include "RtpBroadCaster.h" #include "RtpBroadCaster.h"
#include "RtspMediaSource.h" #include "RtspMediaSource.h"
#include "Player/PlayerBase.h" #include "Player/PlayerBase.h"
#include "Util/util.h"
#include "Util/logger.h"
#include "Network/TcpLimitedSession.h" #include "Network/TcpLimitedSession.h"
using namespace std; using namespace std;

View File

@ -5,21 +5,22 @@
* Author: xzl * Author: xzl
*/ */
#include "RtspToRtmpMediaSource.h"
#include "Rtmp/Rtmp.h"
#include "Util/util.h"
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <net/if.h> #include <net/if.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <netinet/in.h>
#include <sys/socket.h> #include <sys/socket.h>
#include "Network/sockutil.h"
#include "config.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::Util;
using namespace ZL::Network; using namespace ZL::Network;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -8,11 +8,11 @@
#ifndef SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_ #ifndef SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_
#define SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_ #define SRC_RTSP_RTSPTORTMPMEDIASOURCE_H_
#include "MedaiFile/MediaRecorder.h"
#include "RtspMediaSource.h"
#include "RtpParser.h" #include "RtpParser.h"
#include "Rtmp/RtmpMediaSource.h" #include "RtspMediaSource.h"
#include "Rtmp/amf.h" #include "Rtmp/amf.h"
#include "Rtmp/RtmpMediaSource.h"
#include "MedaiFile/MediaRecorder.h"
using namespace ZL::Rtmp; using namespace ZL::Rtmp;
using namespace ZL::MediaFile; using namespace ZL::MediaFile;

View File

@ -8,7 +8,9 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include "UDPServer.h" #include "UDPServer.h"
#include "Util/TimeTicker.h" #include "Util/TimeTicker.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -7,16 +7,19 @@
#ifndef RTSP_UDPSERVER_H_ #ifndef RTSP_UDPSERVER_H_
#define RTSP_UDPSERVER_H_ #define RTSP_UDPSERVER_H_
#include <stdint.h>
#include "Network/Socket.hpp"
#include "unordered_map"
#include <mutex> #include <mutex>
#include "Util/logger.h" #include <stdint.h>
#include <unordered_map>
#include <unordered_set>
#include "Util/util.h" #include "Util/util.h"
#include "unordered_set" #include "Util/logger.h"
#include "Network/Socket.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;
using namespace ZL::Network; using namespace ZL::Network;
namespace ZL { namespace ZL {
namespace Rtsp { namespace Rtsp {

View File

@ -7,14 +7,16 @@
#ifndef SRC_SHELL_CMD_H_ #ifndef SRC_SHELL_CMD_H_
#define SRC_SHELL_CMD_H_ #define SRC_SHELL_CMD_H_
#include <string>
#include <getopt.h> #include <getopt.h>
#include <functional> #include <string>
#include <unordered_map>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <functional>
#include <unordered_map>
#include "Util/util.h" #include "Util/util.h"
#include "Util/logger.h" #include "Util/logger.h"
using namespace std; using namespace std;
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -5,12 +5,12 @@
* Author: xzl * Author: xzl
*/ */
#include "config.h"
#include "ShellSession.h" #include "ShellSession.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "Util/util.h" #include "Util/util.h"
#include "Util/onceToken.h" #include "Util/onceToken.h"
#include "Util/mini.hpp" #include "Util/mini.h"
#include "config.h"
using namespace ZL::Util; using namespace ZL::Util;

View File

@ -9,11 +9,10 @@
#ifndef appConfig_h #ifndef appConfig_h
#define appConfig_h #define appConfig_h
#include "Util/mini.hpp" #include "Util/mini.h"
using namespace ZL::Util; using namespace ZL::Util;
namespace Config { namespace Config {
////////////TCP最大连接数/////////// ////////////TCP最大连接数///////////
#ifdef __x86_64__ #ifdef __x86_64__
#define MAX_TCP_SESSION 512 #define MAX_TCP_SESSION 512

View File

@ -6,8 +6,8 @@
*/ */
#ifdef ENABLE_HKDEVICE #ifdef ENABLE_HKDEVICE
#include "DeviceHK.h" #include "DeviceHK.h"
#include "Util/TimeTicker.h"
#include "Util/MD5.h" #include "Util/MD5.h"
#include "Util/TimeTicker.h"
namespace ZL { namespace ZL {
namespace DEV { namespace DEV {

View File

@ -9,8 +9,8 @@
#define DEVICE_DEVICEHK_H_ #define DEVICE_DEVICEHK_H_
#include <sys/time.h> #include <sys/time.h>
#include "HCNetSDK.h"
#include "PlayM4.h" #include "PlayM4.h"
#include "HCNetSDK.h"
#include "Device/Device.h" #include "Device/Device.h"
#include "Util/onceToken.h" #include "Util/onceToken.h"
#include "Util/logger.h" #include "Util/logger.h"

View File

@ -8,20 +8,20 @@
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <iostream> #include <iostream>
#include "Util/SqlPool.h"
#include "Util/logger.h"
#include "Util/onceToken.h"
#include "Rtsp/UDPServer.h" #include "Rtsp/UDPServer.h"
#include "Rtsp/RtspSession.h" #include "Rtsp/RtspSession.h"
#include "Rtmp/RtmpSession.h" #include "Rtmp/RtmpSession.h"
#include "Network/TcpServer.h"
#include "Poller/EventPoller.hpp"
#include "Thread/WorkThreadPool.h"
#include "Http/HttpSession.h" #include "Http/HttpSession.h"
#include "Http/HttpsSession.h" #include "Http/HttpsSession.h"
#include "Util/SSLBox.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 #ifdef ENABLE_HKDEVICE
#include "test/DeviceHK.h" #include "DeviceHK.h"
#endif //ENABLE_HKDEVICE #endif //ENABLE_HKDEVICE
using namespace std; using namespace std;