mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-20 23:32:22 +08:00
简化命名空间
This commit is contained in:
@@ -31,10 +31,9 @@
|
||||
#include "Util/base64.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
|
||||
using namespace ZL::Util;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace ZL {
|
||||
namespace DEV {
|
||||
namespace mediakit {
|
||||
|
||||
DevChannel::DevChannel(const char *strVhost,
|
||||
const char *strApp,
|
||||
@@ -107,7 +106,7 @@ void DevChannel::inputH264(const char* pcData, int iDataLen, uint32_t uiStamp) {
|
||||
auto lam = [this](const RtpPacket::Ptr &pkt, bool bKeyPos) {
|
||||
onGetRTP(pkt,bKeyPos);
|
||||
};
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,videoMtu,Config::Rtp::kVideoMtuSize);
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,videoMtu,Rtp::kVideoMtuSize);
|
||||
_pRtpMaker_h264.reset(new RtpMaker_H264(lam, ui32Ssrc,videoMtu));
|
||||
}
|
||||
if (!_bSdp_gotH264 && _video) {
|
||||
@@ -139,7 +138,7 @@ void DevChannel::inputAAC(const char *pcDataWithoutAdts,int iDataLen, uint32_t u
|
||||
auto lam = [this](const RtpPacket::Ptr &pkt, bool keyPos) {
|
||||
onGetRTP(pkt,keyPos);
|
||||
};
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,audioMtu,Config::Rtp::kAudioMtuSize);
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,audioMtu,Rtp::kAudioMtuSize);
|
||||
_pRtpMaker_aac.reset(new RtpMaker_AAC(lam, ssrc, audioMtu,_audio->iSampleRate));
|
||||
}
|
||||
if (!_bSdp_gotAAC && _audio && pcAdtsHeader) {
|
||||
@@ -304,6 +303,5 @@ void DevChannel::initAudio(const AudioInfo& info) {
|
||||
_pAdtsHeader->no_raw_data_blocks_in_frame = 0;
|
||||
|
||||
}
|
||||
} /* namespace DEV */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
|
||||
|
||||
@@ -39,22 +39,18 @@
|
||||
#include "Util/TimeTicker.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ZL::Rtsp;
|
||||
using namespace ZL::Util;
|
||||
using namespace toolkit;
|
||||
|
||||
#ifdef ENABLE_FAAC
|
||||
#include "Codec/AACEncoder.h"
|
||||
using namespace ZL::Codec;
|
||||
#endif //ENABLE_FAAC
|
||||
|
||||
#ifdef ENABLE_X264
|
||||
#include "Codec/H264Encoder.h"
|
||||
using namespace ZL::Codec;
|
||||
#endif //ENABLE_X264
|
||||
|
||||
|
||||
namespace ZL {
|
||||
namespace DEV {
|
||||
namespace mediakit {
|
||||
|
||||
class VideoInfo {
|
||||
public:
|
||||
@@ -124,7 +120,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
} /* namespace DEV */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
|
||||
#endif /* DEVICE_DEVICE_H_ */
|
||||
|
||||
8
src/Device/MediaSourceMaker.cpp
Normal file
8
src/Device/MediaSourceMaker.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by xzl on 2018/10/24.
|
||||
//
|
||||
|
||||
#include "MediaSourceMaker.h"
|
||||
namespace mediakit{
|
||||
|
||||
}
|
||||
24
src/Device/MediaSourceMaker.h
Normal file
24
src/Device/MediaSourceMaker.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Created by xzl on 2018/10/24.
|
||||
//
|
||||
|
||||
#ifndef ZLMEDIAKIT_MEDIASOURCEMAKER_H
|
||||
#define ZLMEDIAKIT_MEDIASOURCEMAKER_H
|
||||
|
||||
#include "Player/Track.h"
|
||||
#include "Rtsp/RtspMediaSource.h"
|
||||
#include "Rtmp/RtmpMediaSource.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
class MediaSourceMaker {
|
||||
public:
|
||||
MediaSourceMaker() {}
|
||||
virtual ~MediaSourceMaker() {}
|
||||
private:
|
||||
RtspMediaSource::Ptr _rtspSrc;
|
||||
RtmpMediaSource::Ptr _rtmpSrc;
|
||||
};
|
||||
|
||||
} //namespace mediakit
|
||||
#endif //ZLMEDIAKIT_MEDIASOURCEMAKER_H
|
||||
@@ -32,11 +32,9 @@
|
||||
#include "Util/logger.h"
|
||||
#include "Thread/AsyncTaskThread.h"
|
||||
|
||||
using namespace ZL::Util;
|
||||
using namespace ZL::Thread;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace ZL {
|
||||
namespace DEV {
|
||||
namespace mediakit {
|
||||
|
||||
static uint8_t s_mute_adts[] = {0xff, 0xf1, 0x6c, 0x40, 0x2d, 0x3f, 0xfc, 0x00, 0xe0, 0x34, 0x20, 0xad, 0xf2, 0x3f, 0xb5, 0xdd,
|
||||
0x73, 0xac, 0xbd, 0xca, 0xd7, 0x7d, 0x4a, 0x13, 0x2d, 0x2e, 0xa2, 0x62, 0x02, 0x70, 0x3c, 0x1c,
|
||||
@@ -220,5 +218,4 @@ void PlayerProxy::makeMuteAudio(uint32_t stamp) {
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Player */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "Util/TimeTicker.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ZL::Player;
|
||||
using namespace toolkit;
|
||||
|
||||
namespace ZL {
|
||||
namespace DEV {
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
class PlayerProxy :public MediaPlayer, public std::enable_shared_from_this<PlayerProxy> , public MediaSourceEvent {
|
||||
public:
|
||||
@@ -71,7 +71,6 @@ private:
|
||||
int _iAudioIndex = 0;
|
||||
};
|
||||
|
||||
} /* namespace Player */
|
||||
} /* namespace ZL */
|
||||
} /* namespace mediakit */
|
||||
|
||||
#endif /* SRC_DEVICE_PLAYERPROXY_H_ */
|
||||
|
||||
Reference in New Issue
Block a user