初步完成Windows下的移植

This commit is contained in:
xiongziliang
2017-08-09 18:39:30 +08:00
parent a8b7d53f87
commit a769d6c284
42 changed files with 160 additions and 121 deletions

View File

@@ -6,7 +6,10 @@
*/
#include "HLSMaker.h"
#include <sys/time.h>
#include "Util/File.h"
#include "Util/uv_errno.h"
using namespace ZL::Util;
namespace ZL {
namespace MediaFile {
@@ -126,7 +129,7 @@ void HLSMaker::inputH264(void *data, uint32_t length, uint32_t timeStamp,
m_Timer.resetTime();
removets();
if (write_index_file(m_ui64TsCnt - m_ui32NumSegments, m_ui64TsCnt, 0) == -1) {
WarnL << "write_index_file error :" << strerror(errno);
WarnL << "write_index_file error :" << get_uv_errmsg();
}
}
case 1: //P

View File

@@ -23,7 +23,7 @@ MediaReader::MediaReader(const string &strApp, const string &strId) {
m_hMP4File = MP4Read(strFileName.data());
if(m_hMP4File == MP4_INVALID_FILE_HANDLE){
throw runtime_error(StrPrinter << "打开MP4文件失败" << strFileName << endl);
throw runtime_error(StrPrinter << "打开MP4文件失败:" << strFileName << endl);
}
m_video_trId = MP4FindTrackId(m_hMP4File, 0, MP4_VIDEO_TRACK_TYPE, 0);
if(m_video_trId != MP4_INVALID_TRACK_ID){
@@ -106,7 +106,7 @@ MediaReader::MediaReader(const string &strApp, const string &strId) {
if(m_audio_trId == MP4_INVALID_TRACK_ID && m_video_trId == MP4_INVALID_TRACK_ID){
MP4Close(m_hMP4File);
m_hMP4File = MP4_INVALID_FILE_HANDLE;
throw runtime_error(StrPrinter << "该MP4文件音视频格式不支持" << strFileName << endl);
throw runtime_error(StrPrinter << "该MP4文件音视频格式不支持:" << strFileName << endl);
}
m_iDuration = MAX(m_video_ms,m_audio_ms);

View File

@@ -6,7 +6,6 @@
*/
#include "TSMaker.h"
#include <sys/time.h>
#include "Util/logger.h"
using namespace ZL::Util;