Update spdlog to v1.14.1 and fix compile error

This commit is contained in:
dijunkun
2024-05-24 15:04:40 +08:00
parent a20927ec6c
commit 5deb52ce2d
5 changed files with 9 additions and 8 deletions

View File

@@ -66,7 +66,7 @@ int FecDecoder::ResetParams(unsigned int source_symbol_num) {
fec_params_->encoding_symbol_length = max_size_of_packet_;
if (OF_STATUS_OK != of_set_fec_parameters(fec_session_, fec_params_)) {
LOG_ERROR("Set FEC params failed for codec_id {}", fec_codec_id_);
LOG_ERROR("Set FEC params failed for codec_id {}", (int)fec_codec_id_);
return -1;
}

View File

@@ -62,7 +62,7 @@ uint8_t **FecEncoder::Encode(const char *data, size_t len) {
fec_params_->encoding_symbol_length = max_size_of_packet_;
if (OF_STATUS_OK != of_set_fec_parameters(fec_session_, fec_params_)) {
LOG_ERROR("Set FEC params failed for codec_id {}", fec_codec_id_);
LOG_ERROR("Set FEC params failed for codec_id {}", (int)fec_codec_id_);
return nullptr;
}

View File

@@ -45,7 +45,7 @@ bool AomAv1Encoder::SetEncoderControlParameters(int param_id, P param_value) {
if (error_code != AOM_CODEC_OK) {
LOG_ERROR(
"AomAv1Encoder::SetEncoderControlParameters returned {} on id: {}",
error_code, param_id);
(int)error_code, param_id);
}
return error_code == AOM_CODEC_OK;
}
@@ -113,7 +113,7 @@ int AomAv1Encoder::Init() {
if (ret != AOM_CODEC_OK) {
LOG_ERROR(
"AomAv1Encoder::EncodeInit returned {} on aom_codec_enc_config_default",
ret);
(int)ret);
return -1;
}
@@ -156,7 +156,7 @@ int AomAv1Encoder::Init() {
&aom_av1_encoder_config_, flags);
if (ret != AOM_CODEC_OK) {
LOG_ERROR("AomAv1Encoder::EncodeInit returned {} on aom_codec_enc_init",
ret);
(int)ret);
return -1;
}
inited_ = true;
@@ -285,7 +285,8 @@ int AomAv1Encoder::Encode(const uint8_t *pData, int nSize,
aom_codec_encode(&aom_av1_encoder_ctx_, frame_for_encode_, timestamp_,
duration, force_i_frame_flags_);
if (ret != AOM_CODEC_OK) {
LOG_ERROR("AomAv1Encoder::Encode returned {} on aom_codec_encode", ret);
LOG_ERROR("AomAv1Encoder::Encode returned {} on aom_codec_encode",
(int)ret);
return -1;
}

View File

@@ -22,7 +22,7 @@ void RtpPacket::TryToDecodeRtpPacket() {
} else if (PAYLOAD_TYPE::DATA == PAYLOAD_TYPE(buffer_[1] & 0x7F)) {
DecodeData();
} else {
LOG_ERROR("Unknown pt: {}", PAYLOAD_TYPE(buffer_[1] & 0x7F));
LOG_ERROR("Unknown pt: {}", (int)PAYLOAD_TYPE(buffer_[1] & 0x7F));
}
}