优化代码 (#2741)

删除无效的配置项,
同时修复编译警告
This commit is contained in:
夏楚 2023-08-05 21:30:01 +08:00 committed by GitHub
parent fbf4819c5a
commit 383da1e09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -231,12 +231,10 @@ static onceToken token([]() {
////////////RTMP服务器配置/////////// ////////////RTMP服务器配置///////////
namespace Rtmp { namespace Rtmp {
#define RTMP_FIELD "rtmp." #define RTMP_FIELD "rtmp."
const string kModifyStamp = RTMP_FIELD "modifyStamp";
const string kHandshakeSecond = RTMP_FIELD "handshakeSecond"; const string kHandshakeSecond = RTMP_FIELD "handshakeSecond";
const string kKeepAliveSecond = RTMP_FIELD "keepAliveSecond"; const string kKeepAliveSecond = RTMP_FIELD "keepAliveSecond";
static onceToken token([]() { static onceToken token([]() {
mINI::Instance()[kModifyStamp] = false;
mINI::Instance()[kHandshakeSecond] = 15; mINI::Instance()[kHandshakeSecond] = 15;
mINI::Instance()[kKeepAliveSecond] = 15; mINI::Instance()[kKeepAliveSecond] = 15;
}); });

View File

@ -263,6 +263,8 @@ enum class RtmpFrameType : uint8_t {
video_info_frame = 5, // video info/command frame 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. // UB [4]; Codec Identifier.
enum class RtmpVideoCodec : uint32_t { enum class RtmpVideoCodec : uint32_t {
h263 = 2, // Sorenson H.263 h263 = 2, // Sorenson H.263
@ -274,9 +276,9 @@ enum class RtmpVideoCodec : uint32_t {
h265 = 12, // 国内扩展 h265 = 12, // 国内扩展
// 增强型rtmp FourCC // 增强型rtmp FourCC
fourcc_vp9 = 'vp09', fourcc_vp9 = MKBETAG('v', 'p', '0', '9'),
fourcc_av1 = 'av01', fourcc_av1 = MKBETAG('a', 'v', '0', '1'),
fourcc_hevc = 'hvc1' fourcc_hevc = MKBETAG('h', 'v', 'c', '1')
}; };
// UI8; // UI8;