code style

This commit is contained in:
Isaac Connor 2020-12-27 11:57:50 -05:00
parent 61bffdb249
commit 63687c8e44
1 changed files with 18 additions and 11 deletions

View File

@ -668,7 +668,10 @@ LocalCamera::LocalCamera(
Fatal("Image size mismatch. Required: %d Available: %u", pSize, imagesize); Fatal("Image size mismatch. Required: %d Available: %u", pSize, imagesize);
} }
imgConversionContext = sws_getContext(width, height, capturePixFormat, width, height, imagePixFormat, SWS_BICUBIC, nullptr, nullptr, nullptr); imgConversionContext = sws_getContext(
width, height, capturePixFormat,
width, height, imagePixFormat, SWS_BICUBIC,
nullptr, nullptr, nullptr);
if ( !imgConversionContext ) { if ( !imgConversionContext ) {
Fatal("Unable to initialise image scaling context"); Fatal("Unable to initialise image scaling context");
@ -802,7 +805,7 @@ void LocalCamera::Initialise() {
Warning("Failed to set requested width"); Warning("Failed to set requested width");
} }
if ( v4l2_data.fmt.fmt.pix.height != height ) { if ( v4l2_data.fmt.fmt.pix.height != height ) {
Warning("Failed to set requested width"); Warning("Failed to set requested height");
} }
/* Buggy driver paranoia. */ /* Buggy driver paranoia. */
@ -922,7 +925,8 @@ void LocalCamera::Initialise() {
#else #else
avpicture_fill( avpicture_fill(
(AVPicture *)capturePictures[i], (AVPicture *)capturePictures[i],
(uint8_t*)v4l2_data.buffers[i].start, capturePixFormat, (uint8_t*)v4l2_data.buffers[i].start,
capturePixFormat,
v4l2_data.fmt.fmt.pix.width, v4l2_data.fmt.fmt.pix.width,
v4l2_data.fmt.fmt.pix.height v4l2_data.fmt.fmt.pix.height
); );
@ -1271,7 +1275,11 @@ uint32_t LocalCamera::AutoSelectFormat(int p_colours) {
#define capString(test,prefix,yesString,noString,capability) \ #define capString(test,prefix,yesString,noString,capability) \
(test) ? (prefix yesString " " capability "\n") : (prefix noString " " capability "\n") (test) ? (prefix yesString " " capability "\n") : (prefix noString " " capability "\n")
bool LocalCamera::GetCurrentSettings(const char *device, char *output, int version, bool verbose) { bool LocalCamera::GetCurrentSettings(
const char *device,
char *output,
int version,
bool verbose) {
output[0] = 0; output[0] = 0;
char *output_ptr = output; char *output_ptr = output;
@ -2122,7 +2130,6 @@ int LocalCamera::Capture(ZMPacket &zm_packet) {
} }
if ( conversion_type != 0 ) { if ( conversion_type != 0 ) {
Debug(3, "Performing format conversion %d", conversion_type); Debug(3, "Performing format conversion %d", conversion_type);
/* Request a writeable buffer of the target image */ /* Request a writeable buffer of the target image */