mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 12:11:36 +08:00
完善mingw编译环境的适配
This commit is contained in:
parent
fdcc29e0ed
commit
5b6ff0af27
@ -1 +1 @@
|
|||||||
Subproject commit 86407d4cea8a344cf737082215fe7ffcabaa33b3
|
Subproject commit dd101bcc31290e3d1ec1ae939d937f2712719a0d
|
@ -747,14 +747,6 @@ std::shared_ptr<MediaSourceEvent> MediaSourceEventInterceptor::getDelegate() con
|
|||||||
|
|
||||||
/////////////////////////////////////FlushPolicy//////////////////////////////////////
|
/////////////////////////////////////FlushPolicy//////////////////////////////////////
|
||||||
|
|
||||||
template<>
|
|
||||||
bool PacketCache<RtpPacket>::flushImmediatelyWhenCloseMerge() {
|
|
||||||
//因为rtp的包很小,一个RtpPacket包中也不是完整的一帧图像,所以在关闭合并写时,
|
|
||||||
//还是有必要缓冲一帧的rtp(也就是时间戳相同的rtp)再输出,这样虽然会增加一帧的延时
|
|
||||||
//但是却对性能提升很大,这样做还是比较划算的
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isFlushAble_default(bool is_video, uint64_t last_stamp, uint64_t new_stamp, size_t cache_size) {
|
static bool isFlushAble_default(bool is_video, uint64_t last_stamp, uint64_t new_stamp, size_t cache_size) {
|
||||||
if (new_stamp + 500 < last_stamp) {
|
if (new_stamp + 500 < last_stamp) {
|
||||||
//时间戳回退比较大(可能seek中),由于rtp中时间戳是pts,是可能存在一定程度的回退的
|
//时间戳回退比较大(可能seek中),由于rtp中时间戳是pts,是可能存在一定程度的回退的
|
||||||
|
@ -376,9 +376,13 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool flushImmediatelyWhenCloseMerge() {
|
bool flushImmediatelyWhenCloseMerge() {
|
||||||
//一般的协议关闭合并写时,立即刷新缓存,这样可以减少一帧的延时,但是rtp例外,请看相应的模板特例化函数
|
//一般的协议关闭合并写时,立即刷新缓存,这样可以减少一帧的延时,但是rtp例外
|
||||||
|
//因为rtp的包很小,一个RtpPacket包中也不是完整的一帧图像,所以在关闭合并写时,
|
||||||
|
//还是有必要缓冲一帧的rtp(也就是时间戳相同的rtp)再输出,这样虽然会增加一帧的延时
|
||||||
|
//但是却对性能提升很大,这样做还是比较划算的
|
||||||
|
|
||||||
GET_CONFIG(int, mergeWriteMS, General::kMergeWriteMS);
|
GET_CONFIG(int, mergeWriteMS, General::kMergeWriteMS);
|
||||||
return mergeWriteMS <= 0;
|
return std::is_same<packet, RtpPacket>::value ? false : (mergeWriteMS <= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -50,10 +50,10 @@ private:
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
GB28181Process::GB28181Process(const MediaInfo &media_info, MediaSinkInterface *interface) {
|
GB28181Process::GB28181Process(const MediaInfo &media_info, MediaSinkInterface *sink) {
|
||||||
assert(interface);
|
assert(sink);
|
||||||
_media_info = media_info;
|
_media_info = media_info;
|
||||||
_interface = interface;
|
_interface = sink;
|
||||||
}
|
}
|
||||||
|
|
||||||
GB28181Process::~GB28181Process() {}
|
GB28181Process::~GB28181Process() {}
|
||||||
|
@ -25,7 +25,7 @@ class RtpReceiverImp;
|
|||||||
class GB28181Process : public ProcessInterface {
|
class GB28181Process : public ProcessInterface {
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr<GB28181Process> Ptr;
|
typedef std::shared_ptr<GB28181Process> Ptr;
|
||||||
GB28181Process(const MediaInfo &media_info, MediaSinkInterface *interface);
|
GB28181Process(const MediaInfo &media_info, MediaSinkInterface *sink);
|
||||||
~GB28181Process() override;
|
~GB28181Process() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
aux_source_directory(. TEST_SRC_LIST)
|
aux_source_directory(. TEST_SRC_LIST)
|
||||||
|
|
||||||
foreach (TEST_SRC ${TEST_SRC_LIST})
|
foreach (TEST_SRC ${TEST_SRC_LIST})
|
||||||
|
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
|
||||||
|
|
||||||
if (NOT ENABLE_WEBRTC)
|
if (NOT ENABLE_WEBRTC)
|
||||||
# 暂时过滤掉依赖 WebRTC 的测试模块
|
# 暂时过滤掉依赖 WebRTC 的测试模块
|
||||||
if ("${TEST_SRC}" MATCHES "test_rtcp_nack\.cpp")
|
if ("${TEST_EXE_NAME}" MATCHES "test_rtcp_nack")
|
||||||
continue()
|
continue()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
|
|
||||||
message(STATUS "add test:${TEST_EXE_NAME}")
|
message(STATUS "add test:${TEST_EXE_NAME}")
|
||||||
add_executable(${TEST_EXE_NAME} ${TEST_SRC})
|
add_executable(${TEST_EXE_NAME} ${TEST_SRC})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user