fix qcom decoder compilation on mac with platform check (#36131)

This commit is contained in:
Jimmy
2025-09-11 07:45:36 -10:00
committed by GitHub
parent 3c28188d7a
commit 994170ddb5
3 changed files with 14 additions and 2 deletions
+6 -1
View File
@@ -39,9 +39,12 @@ struct DecoderManager {
}
std::unique_ptr<VideoDecoder> decoder;
#ifndef __APPLE__
if (Hardware::TICI() && hw_decoder) {
decoder = std::make_unique<QcomVideoDecoder>();
} else {
} else
#endif
{
decoder = std::make_unique<FFmpegVideoDecoder>();
}
@@ -264,6 +267,7 @@ bool FFmpegVideoDecoder::copyBuffer(AVFrame *f, VisionBuf *buf) {
return true;
}
#ifndef __APPLE__
bool QcomVideoDecoder::open(AVCodecParameters *codecpar, bool hw_decoder) {
if (codecpar->codec_id != AV_CODEC_ID_HEVC) {
rError("Hardware decoder only supports HEVC codec");
@@ -305,3 +309,4 @@ bool QcomVideoDecoder::decode(FrameReader *reader, int idx, VisionBuf *buf) {
}
return result;
}
#endif