ui: display exposure/gain settings
This commit is contained in:
@@ -165,6 +165,12 @@ update_io_pipeline()
|
||||
mp_io_pipeline_update_state(&new_state);
|
||||
}
|
||||
|
||||
void
|
||||
notify_auto_status(gchar *msg)
|
||||
{
|
||||
gtk_button_set_label(GTK_BUTTON(status_button), msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* State transfer from Process -> Main
|
||||
*/
|
||||
@@ -236,7 +242,6 @@ update_state(const mp_state_main *new_state)
|
||||
// as flash, so always enable this button
|
||||
gtk_widget_set_visible(flash_button, true);
|
||||
gtk_widget_set_visible(status_button, true);
|
||||
gtk_button_set_label(GTK_BUTTON(status_button), "(st)");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -41,3 +41,4 @@ bool check_window_active();
|
||||
void notify_movie_progress(void);
|
||||
|
||||
void notify_movie_message(gchar *msg);
|
||||
void notify_auto_status(gchar *msg);
|
||||
|
@@ -496,25 +496,29 @@ static void
|
||||
summarize()
|
||||
{
|
||||
double time, gain;
|
||||
bool portrait = (state_proc.device_rotation == 0 || state_proc.device_rotation == 180);
|
||||
char *sep = portrait ? " " : "\n";
|
||||
char buf[2048];
|
||||
|
||||
/* FIXME: may be approximate -- width/height should include blank areas */
|
||||
double PCK = state_proc.mode->width * state_proc.mode->height * 30;
|
||||
double per_line = state_proc.mode->width / PCK;
|
||||
time = state_proc.exposure.value * per_line;
|
||||
|
||||
//Then the exposure time = (exposure line) * (time per line ).
|
||||
|
||||
/* Frame time in seconds */
|
||||
//time = state_proc.exposure.value * state_proc.mode->height;
|
||||
|
||||
/* */
|
||||
gain = state_proc.gain.value / ((float) state_proc.gain.min); /* FIXME: .min */
|
||||
gain = state_proc.gain.value / ((float) state_proc.gain.min);
|
||||
if (0) /* dgain */
|
||||
gain *= state_proc.dgain.value / ((float) state_proc.dgain.min);
|
||||
|
||||
printf("1/%.0f sec, ISO %.0f, t=%f, g=%f %d %d\n",
|
||||
(float) (1.0/time), (float) (gain*100),
|
||||
(float) time, (float) gain, state_proc.gain.value, state_proc.dgain.value);
|
||||
|
||||
sprintf(buf, "1/%s%.0f%sISO%s%.0f",
|
||||
sep, (float) (1.0/time), sep,
|
||||
sep, (float) (gain*100));
|
||||
|
||||
notify_auto_status(buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user