完善mingw编译环境的适配

This commit is contained in:
ziyue 2022-01-11 14:09:57 +08:00
parent fdcc29e0ed
commit 5b6ff0af27
6 changed files with 14 additions and 17 deletions

@ -1 +1 @@
Subproject commit 86407d4cea8a344cf737082215fe7ffcabaa33b3
Subproject commit dd101bcc31290e3d1ec1ae939d937f2712719a0d

View File

@ -747,14 +747,6 @@ std::shared_ptr<MediaSourceEvent> MediaSourceEventInterceptor::getDelegate() con
/////////////////////////////////////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) {
if (new_stamp + 500 < last_stamp) {
//时间戳回退比较大(可能seek中)由于rtp中时间戳是pts是可能存在一定程度的回退的

View File

@ -376,9 +376,13 @@ private:
}
bool flushImmediatelyWhenCloseMerge() {
//一般的协议关闭合并写时立即刷新缓存这样可以减少一帧的延时但是rtp例外请看相应的模板特例化函数
//一般的协议关闭合并写时立即刷新缓存这样可以减少一帧的延时但是rtp例外
//因为rtp的包很小一个RtpPacket包中也不是完整的一帧图像所以在关闭合并写时
//还是有必要缓冲一帧的rtp(也就是时间戳相同的rtp)再输出,这样虽然会增加一帧的延时
//但是却对性能提升很大,这样做还是比较划算的
GET_CONFIG(int, mergeWriteMS, General::kMergeWriteMS);
return mergeWriteMS <= 0;
return std::is_same<packet, RtpPacket>::value ? false : (mergeWriteMS <= 0);
}
private:

View File

@ -50,10 +50,10 @@ private:
///////////////////////////////////////////////////////////////////////////////////////////
GB28181Process::GB28181Process(const MediaInfo &media_info, MediaSinkInterface *interface) {
assert(interface);
GB28181Process::GB28181Process(const MediaInfo &media_info, MediaSinkInterface *sink) {
assert(sink);
_media_info = media_info;
_interface = interface;
_interface = sink;
}
GB28181Process::~GB28181Process() {}

View File

@ -25,7 +25,7 @@ class RtpReceiverImp;
class GB28181Process : public ProcessInterface {
public:
typedef std::shared_ptr<GB28181Process> Ptr;
GB28181Process(const MediaInfo &media_info, MediaSinkInterface *interface);
GB28181Process(const MediaInfo &media_info, MediaSinkInterface *sink);
~GB28181Process() override;
/**

View File

@ -2,14 +2,15 @@
aux_source_directory(. TEST_SRC_LIST)
foreach (TEST_SRC ${TEST_SRC_LIST})
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
if (NOT ENABLE_WEBRTC)
# WebRTC
if ("${TEST_SRC}" MATCHES "test_rtcp_nack\.cpp")
if ("${TEST_EXE_NAME}" MATCHES "test_rtcp_nack")
continue()
endif ()
endif ()
get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE)
message(STATUS "add test:${TEST_EXE_NAME}")
add_executable(${TEST_EXE_NAME} ${TEST_SRC})