ENABLE_MEDIAFILE宏拆分为ENABLE_HLS和ENABLE_MP4V2

This commit is contained in:
xiongziliang 2017-05-02 17:07:02 +08:00
parent 810bb71e21
commit bf9b575569
21 changed files with 97 additions and 104 deletions

View File

@ -124,10 +124,11 @@
<listOptionValue builtIn="false" value="../../ZLToolKit/src"/>
</option>
<option id="gnu.cpp.compiler.option.preprocessor.def.863813077" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="ENABLE_FAAC"/>
<listOptionValue builtIn="false" value="ENABLE_RTSP2RTMP"/>
<listOptionValue builtIn="false" value="ENABLE_RTMP2RTSP"/>
<listOptionValue builtIn="false" value="ENABLE_MEDIAFILE"/>
<listOptionValue builtIn="false" value="ENABLE_HLS"/>
<listOptionValue builtIn="false" value="ENABLE_MP4V2"/>
<listOptionValue builtIn="false" value="ENABLE_FAAC"/>
<listOptionValue builtIn="false" value="ENABLE_X264"/>
</option>
<option id="gnu.cpp.compiler.option.other.pic.198751626" name="Position Independent Code (-fPIC)" superClass="gnu.cpp.compiler.option.other.pic" useByScannerDiscovery="false" value="true" valueType="boolean"/>

View File

@ -20,7 +20,7 @@ CPP_DEPS += \
src/Codec/%.o: ../src/Codec/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -23,7 +23,7 @@ CPP_DEPS += \
src/Device/%.o: ../src/Device/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -36,7 +36,7 @@ CPP_DEPS += \
src/H264/%.o: ../src/H264/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -20,7 +20,7 @@ CPP_DEPS += \
src/Http/%.o: ../src/Http/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -1,24 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/MedaiFile/CRC/crc32.cpp
OBJS += \
./src/MedaiFile/CRC/crc32.o
CPP_DEPS += \
./src/MedaiFile/CRC/crc32.d
# Each subdirectory must supply rules for building sources it contributes
src/MedaiFile/CRC/%.o: ../src/MedaiFile/CRC/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -1,36 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/MedaiFile/HLSMaker.cpp \
../src/MedaiFile/MediaReader.cpp \
../src/MedaiFile/MediaRecorder.cpp \
../src/MedaiFile/Mp4Maker.cpp \
../src/MedaiFile/TSMaker.cpp
OBJS += \
./src/MedaiFile/HLSMaker.o \
./src/MedaiFile/MediaReader.o \
./src/MedaiFile/MediaRecorder.o \
./src/MedaiFile/Mp4Maker.o \
./src/MedaiFile/TSMaker.o
CPP_DEPS += \
./src/MedaiFile/HLSMaker.d \
./src/MedaiFile/MediaReader.d \
./src/MedaiFile/MediaRecorder.d \
./src/MedaiFile/Mp4Maker.d \
./src/MedaiFile/TSMaker.d
# Each subdirectory must supply rules for building sources it contributes
src/MedaiFile/%.o: ../src/MedaiFile/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -0,0 +1,39 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/MediaFile/HLSMaker.cpp \
../src/MediaFile/MediaReader.cpp \
../src/MediaFile/MediaRecorder.cpp \
../src/MediaFile/Mp4Maker.cpp \
../src/MediaFile/TSMaker.cpp \
../src/MediaFile/crc32.cpp
OBJS += \
./src/MediaFile/HLSMaker.o \
./src/MediaFile/MediaReader.o \
./src/MediaFile/MediaRecorder.o \
./src/MediaFile/Mp4Maker.o \
./src/MediaFile/TSMaker.o \
./src/MediaFile/crc32.o
CPP_DEPS += \
./src/MediaFile/HLSMaker.d \
./src/MediaFile/MediaReader.d \
./src/MediaFile/MediaRecorder.d \
./src/MediaFile/Mp4Maker.d \
./src/MediaFile/TSMaker.d \
./src/MediaFile/crc32.d
# Each subdirectory must supply rules for building sources it contributes
src/MediaFile/%.o: ../src/MediaFile/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -23,7 +23,7 @@ CPP_DEPS += \
src/Player/%.o: ../src/Player/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -20,7 +20,7 @@ CPP_DEPS += \
src/RTP/%.o: ../src/RTP/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -44,7 +44,7 @@ CPP_DEPS += \
src/Rtmp/%.o: ../src/Rtmp/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -41,7 +41,7 @@ CPP_DEPS += \
src/Rtsp/%.o: ../src/Rtsp/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -20,7 +20,7 @@ CPP_DEPS += \
src/Shell/%.o: ../src/Shell/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -17,7 +17,7 @@ CPP_DEPS += \
src/%.o: ../src/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -20,7 +20,7 @@ CPP_DEPS += \
test/%.o: ../test/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cross G++ Compiler'
g++ -std=c++1y -DENABLE_FAAC -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_MEDIAFILE -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
g++ -std=c++1y -DENABLE_RTSP2RTMP -DENABLE_RTMP2RTSP -DENABLE_HLS -DENABLE_MP4V2 -DENABLE_FAAC -DENABLE_X264 -I"/home/xzl/git/ZLMediaKit/src" -I../../ZLToolKit/src -O3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

View File

@ -16,7 +16,7 @@ using namespace ZL::Util;
namespace ZL {
namespace MediaFile {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
MediaReader::MediaReader(const string &strApp, const string &strId) {
static string recordPath = mINI::Instance()[Config::Record::kFilePath];
auto strFileName = recordPath + "/" + strApp + "/" + strId;
@ -301,10 +301,10 @@ void MediaReader::seek(int iSeekTime,bool bReStart){
}
}
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
RtspMediaSource::Ptr MediaReader::onMakeRtsp(const string &strApp, const string &strId) {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
static string appName = mINI::Instance()[Config::Record::kAppName];
if (strApp != appName) {
return nullptr;
@ -319,12 +319,12 @@ RtspMediaSource::Ptr MediaReader::onMakeRtsp(const string &strApp, const string
}
#else
return nullptr;
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
}
RtmpMediaSource::Ptr MediaReader::onMakeRtmp(const string &strApp, const string &strId) {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
static string appName = mINI::Instance()[Config::Record::kAppName];
if (strApp != appName) {
return nullptr;
@ -339,7 +339,7 @@ RtmpMediaSource::Ptr MediaReader::onMakeRtmp(const string &strApp, const string
}
#else
return nullptr;
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
}

View File

@ -12,9 +12,9 @@
#include "Rtsp/RtspMediaSource.h"
#include "Rtmp/RtmpMediaSource.h"
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
#include <mp4v2/mp4v2.h>
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
using namespace ZL::DEV;
using namespace ZL::Rtsp;
@ -32,7 +32,7 @@ public:
static RtmpMediaSource::Ptr onMakeRtmp(const string &strApp, const string &strId);
private:
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
MP4FileHandle m_hMP4File = MP4_INVALID_FILE_HANDLE;
MP4TrackId m_video_trId = MP4_INVALID_TRACK_ID;
uint32_t m_video_ms = 0;
@ -76,7 +76,7 @@ private:
inline bool readAudioSample(int iTimeInc = 0);
inline void writeH264(uint8_t *pucData,int iLen,uint32_t uiStamp);
inline void writeAAC(uint8_t *pucData,int iLen,uint32_t uiStamp);
#endif
#endif //ENABLE_MP4V2
};
} /* namespace MediaFile */

View File

@ -19,42 +19,47 @@ namespace ZL {
namespace MediaFile {
MediaRecorder::MediaRecorder(const string &strApp,const string &strId,const std::shared_ptr<PlayerBase> &pPlayer) {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_HLS
static string hlsPrefix = mINI::Instance()[Config::Http::kHttpPrefix];
static string hlsPath = mINI::Instance()[Config::Hls::kFilePath];
static uint32_t hlsBufSize = mINI::Instance()[Config::Hls::kFileBufSize].as<uint32_t>();
static uint32_t hlsDuration = mINI::Instance()[Config::Hls::kSegmentDuration].as<uint32_t>();
static uint32_t hlsNum = mINI::Instance()[Config::Hls::kSegmentNum].as<uint32_t>();
static string recordPath = mINI::Instance()[Config::Record::kFilePath];
static string recordAppName = mINI::Instance()[Config::Record::kAppName];
m_hlsMaker.reset(new HLSMaker(hlsPath + "/" + strApp + "/" + strId + "/hls.m3u8",
hlsPrefix + "/" + strApp + "/" + strId + "/",
hlsBufSize,hlsDuration,hlsNum));
#endif //ENABLE_HLS
#ifdef ENABLE_MP4V2
static string recordPath = mINI::Instance()[Config::Record::kFilePath];
static string recordAppName = mINI::Instance()[Config::Record::kAppName];
m_mp4Maker.reset(new Mp4Maker(recordPath + "/" + recordAppName + "/" + strApp + "/" + strId + "/",
strApp,strId,pPlayer));
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
}
MediaRecorder::~MediaRecorder() {
}
void MediaRecorder::inputH264(void* pData, uint32_t ui32Length, uint32_t ui32TimeStamp, int iType) {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_HLS
m_hlsMaker->inputH264(pData, ui32Length, ui32TimeStamp * 90, iType);
m_mp4Maker->inputH264(pData, ui32Length, ui32TimeStamp, iType);
#endif //ENABLE_HLS
#endif //ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
m_mp4Maker->inputH264(pData, ui32Length, ui32TimeStamp, iType);
#endif //ENABLE_MP4V2
}
void MediaRecorder::inputAAC(void* pData, uint32_t ui32Length, uint32_t ui32TimeStamp) {
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_HLS
m_hlsMaker->inputAAC(pData, ui32Length, ui32TimeStamp * 90);
#endif //ENABLE_HLS
#ifdef ENABLE_MP4V2
m_mp4Maker->inputAAC(pData, ui32Length, ui32TimeStamp);
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
}
} /* namespace MediaFile */

View File

@ -10,10 +10,14 @@
#include <memory>
#include "Player/PlayerBase.h"
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
#include "Mp4Maker.h"
#endif //ENABLE_MP4V2
#ifdef ENABLE_HLS
#include "HLSMaker.h"
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_HLS
using namespace std;
using namespace ZL::Player;
@ -37,10 +41,14 @@ public:
uint32_t ui32Length,
uint32_t ui32TimeStamp);
private:
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_HLS
std::shared_ptr<HLSMaker> m_hlsMaker;
#endif //ENABLE_HLS
#ifdef ENABLE_MP4V2
std::shared_ptr<Mp4Maker> m_mp4Maker;
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2
};

View File

@ -1,5 +1,5 @@
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
#include <netinet/in.h>
#include <sys/stat.h>
@ -187,4 +187,4 @@ void Mp4Maker::closeFile() {
} /* namespace ZL */
#endif //ENABLE_MEDIAFILE
#endif //ENABLE_MP4V2

View File

@ -8,7 +8,7 @@
#ifndef MP4MAKER_H_
#define MP4MAKER_H_
#ifdef ENABLE_MEDIAFILE
#ifdef ENABLE_MP4V2
#include <mutex>
#include <memory>
@ -77,6 +77,6 @@ private:
} /* namespace MediaFile */
} /* namespace ZL */
#endif ///ENABLE_MEDIAFILE
#endif ///ENABLE_MP4V2
#endif /* MP4MAKER_H_ */