refactor: remove dead FfmpegCamera::imagePixFormat field

The field was assigned in three branches of the constructor (always to
the same value as Camera::pixelFormat) and never read anywhere. Unlike
LocalCamera, FfmpegCamera doesn't run a sws_scale step at the Camera
layer — libavcodec hands frames to the pipeline directly — so there's
no separate capture-vs-image format distinction to track.

Drop the redundant assignments and the member declaration. The
canonical camera-side format is now exclusively Camera::pixelFormat
(via Camera::PixelFormat()).

refs #4788

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Isaac Connor
2026-06-06 12:29:35 -04:00
parent b486c0cd6b
commit 9687faac67
2 changed files with 0 additions and 5 deletions

View File

@@ -96,15 +96,12 @@ FfmpegCamera::FfmpegCamera(
* will receive correct colours and subpixel order */
if ( zm_is_rgb32(pixelFormat) ) {
subpixelorder = ZM_SUBPIX_ORDER_RGBA;
imagePixFormat = AV_PIX_FMT_RGBA;
pixelFormat = AV_PIX_FMT_RGBA;
} else if ( zm_is_rgb24(pixelFormat) ) {
subpixelorder = ZM_SUBPIX_ORDER_RGB;
imagePixFormat = AV_PIX_FMT_RGB24;
pixelFormat = AV_PIX_FMT_RGB24;
} else if ( pixelFormat == AV_PIX_FMT_GRAY8 ) {
subpixelorder = ZM_SUBPIX_ORDER_NONE;
imagePixFormat = AV_PIX_FMT_GRAY8;
pixelFormat = AV_PIX_FMT_GRAY8;
} else {
Panic("Unexpected pixel format %d (%s); legacy colours=%d subpixelorder=%d",

View File

@@ -54,8 +54,6 @@ class FfmpegCamera : public Camera {
int frameCount;
_AVPIXELFORMAT imagePixFormat;
bool use_hwaccel; //will default to on if hwaccel specified, will get turned off if there is a failure
#if HAVE_LIBAVUTIL_HWCONTEXT_H
AVBufferRef *hw_device_ctx = nullptr;