From 383da1e09ea78c24f380ffce8b7695ceec315c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Sat, 5 Aug 2023 21:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=20(#2741)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除无效的配置项, 同时修复编译警告 --- src/Common/config.cpp | 2 -- src/Rtmp/Rtmp.h | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Common/config.cpp b/src/Common/config.cpp index 4a742fe9..87e4e855 100644 --- a/src/Common/config.cpp +++ b/src/Common/config.cpp @@ -231,12 +231,10 @@ static onceToken token([]() { ////////////RTMP服务器配置/////////// namespace Rtmp { #define RTMP_FIELD "rtmp." -const string kModifyStamp = RTMP_FIELD "modifyStamp"; const string kHandshakeSecond = RTMP_FIELD "handshakeSecond"; const string kKeepAliveSecond = RTMP_FIELD "keepAliveSecond"; static onceToken token([]() { - mINI::Instance()[kModifyStamp] = false; mINI::Instance()[kHandshakeSecond] = 15; mINI::Instance()[kKeepAliveSecond] = 15; }); diff --git a/src/Rtmp/Rtmp.h b/src/Rtmp/Rtmp.h index 30a56c74..66908af2 100644 --- a/src/Rtmp/Rtmp.h +++ b/src/Rtmp/Rtmp.h @@ -263,6 +263,8 @@ enum class RtmpFrameType : uint8_t { video_info_frame = 5, // video info/command frame }; +#define MKBETAG(a, b, c, d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) + // UB [4]; Codec Identifier. enum class RtmpVideoCodec : uint32_t { h263 = 2, // Sorenson H.263 @@ -274,9 +276,9 @@ enum class RtmpVideoCodec : uint32_t { h265 = 12, // 国内扩展 // 增强型rtmp FourCC - fourcc_vp9 = 'vp09', - fourcc_av1 = 'av01', - fourcc_hevc = 'hvc1' + fourcc_vp9 = MKBETAG('v', 'p', '0', '9'), + fourcc_av1 = MKBETAG('a', 'v', '0', '1'), + fourcc_hevc = MKBETAG('h', 'v', 'c', '1') }; // UI8;