Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add FlickerPeriod (https://github.com/bluenviron/mediamtx/issues/3463) #7

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,13 @@ static void fill_dynamic_controls(ControlList *ctrls, const parameters_t *params
}
ctrls->set(controls::AeExposureMode, exposure_mode);

if (params->flicker_period != 0) {
ctrls->set(controls::AeFlickerMode, controls::FlickerManual);
ctrls->set(controls::AeFlickerPeriod, params->flicker_period);
} else {
ctrls->set(controls::AeFlickerMode, controls::FlickerAuto);
}

int awb_mode;
if (strcmp(params->awb, "incandescent") == 0) {
awb_mode = controls::AwbIncandescent;
Expand Down
2 changes: 2 additions & 0 deletions parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ bool parameters_unserialize(parameters_t *params, const uint8_t *buf, size_t buf
}
}
free(decoded_val);
} else if (strcmp(key, "FlickerPeriod") == 0) {
params->flicker_period = atoi(val);
} else if (strcmp(key, "TextOverlayEnable") == 0) {
params->text_overlay_enable = (strcmp(val, "1") == 0);
} else if (strcmp(key, "TextOverlay") == 0) {
Expand Down
1 change: 1 addition & 0 deletions parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ typedef struct {
char *af_speed;
float lens_position;
window_t *af_window;
unsigned int flicker_period;
bool text_overlay_enable;
char *text_overlay;

Expand Down