From 01afd4a74d5f14855679ee710c7229451b9d3ed4 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 4 Jan 2023 16:29:02 +0100 Subject: [PATCH] Remove unused flags to decoder contexts Everything in flags is already handled at a higher level. --- common/rfb/H264Decoder.cxx | 2 +- common/rfb/H264DecoderContext.h | 3 ++- common/rfb/H264LibavDecoderContext.cxx | 4 +++- common/rfb/H264LibavDecoderContext.h | 3 ++- common/rfb/H264WinDecoderContext.cxx | 4 +++- common/rfb/H264WinDecoderContext.h | 3 ++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/common/rfb/H264Decoder.cxx b/common/rfb/H264Decoder.cxx index 27c380bb..1341366d 100644 --- a/common/rfb/H264Decoder.cxx +++ b/common/rfb/H264Decoder.cxx @@ -134,5 +134,5 @@ void H264Decoder::decodeRect(const Rect& r, const void* buffer, if (!len) return; - ctx->decode(is.getptr(len), len, flags, pb); + ctx->decode(is.getptr(len), len, pb); } diff --git a/common/rfb/H264DecoderContext.h b/common/rfb/H264DecoderContext.h index bd93b46f..20c65774 100644 --- a/common/rfb/H264DecoderContext.h +++ b/common/rfb/H264DecoderContext.h @@ -33,7 +33,8 @@ namespace rfb { virtual ~H264DecoderContext() = 0; - virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, rdr::U32 flags, ModifiablePixelBuffer* pb) {} + virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, + ModifiablePixelBuffer* pb) {} void reset(); inline bool isEqualRect(const Rect &r) const { return r.equals(rect); } diff --git a/common/rfb/H264LibavDecoderContext.cxx b/common/rfb/H264LibavDecoderContext.cxx index 6254c8a2..67c14991 100644 --- a/common/rfb/H264LibavDecoderContext.cxx +++ b/common/rfb/H264LibavDecoderContext.cxx @@ -128,7 +128,9 @@ rdr::U8* H264LibavDecoderContext::makeH264WorkBuffer(const rdr::U8* buffer, rdr: return h264WorkBuffer; } -void H264LibavDecoderContext::decode(const rdr::U8* h264_in_buffer, rdr::U32 len, rdr::U32 flags, ModifiablePixelBuffer* pb) { +void H264LibavDecoderContext::decode(const rdr::U8* h264_in_buffer, + rdr::U32 len, + ModifiablePixelBuffer* pb) { os::AutoMutex lock(&mutex); if (!initialized) return; diff --git a/common/rfb/H264LibavDecoderContext.h b/common/rfb/H264LibavDecoderContext.h index ff2a0868..1f005e4b 100644 --- a/common/rfb/H264LibavDecoderContext.h +++ b/common/rfb/H264LibavDecoderContext.h @@ -34,7 +34,8 @@ namespace rfb { H264LibavDecoderContext(const Rect &r) : H264DecoderContext(r) {} ~H264LibavDecoderContext() { freeCodec(); } - virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, rdr::U32 flags, ModifiablePixelBuffer* pb); + virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, + ModifiablePixelBuffer* pb); protected: virtual bool initCodec(); diff --git a/common/rfb/H264WinDecoderContext.cxx b/common/rfb/H264WinDecoderContext.cxx index 12dfda77..a6855c0d 100644 --- a/common/rfb/H264WinDecoderContext.cxx +++ b/common/rfb/H264WinDecoderContext.cxx @@ -154,7 +154,9 @@ void H264WinDecoderContext::freeCodec() { initialized = false; } -void H264WinDecoderContext::decode(const rdr::U8* h264_buffer, rdr::U32 len, rdr::U32 flags, ModifiablePixelBuffer* pb) { +void H264WinDecoderContext::decode(const rdr::U8* h264_buffer, + rdr::U32 len, + ModifiablePixelBuffer* pb) { os::AutoMutex lock(&mutex); if (!initialized) return; diff --git a/common/rfb/H264WinDecoderContext.h b/common/rfb/H264WinDecoderContext.h index e79f97ae..96e7bf00 100644 --- a/common/rfb/H264WinDecoderContext.h +++ b/common/rfb/H264WinDecoderContext.h @@ -33,7 +33,8 @@ namespace rfb { H264WinDecoderContext(const Rect &r) : H264DecoderContext(r) {}; ~H264WinDecoderContext() { freeCodec(); } - virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, rdr::U32 flags, ModifiablePixelBuffer* pb); + virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, + ModifiablePixelBuffer* pb); protected: virtual bool initCodec(); -- 2.39.5