mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
初步完成Windows下的移植
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "TSMaker.h"
|
||||
#include <sys/time.h>
|
||||
#include "Util/logger.h"
|
||||
|
||||
using namespace ZL::Util;
|
||||
|
||||
Reference in New Issue
Block a user