mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-22 04:29:49 -04:00
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:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user