mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 03:40:30 +00:00
print display mode by disp. module
Printout by video decoder might have been incorrect if there is a
postprocessor that changes properties, eg.:
uv -t testcard:fps=50i -d gl -p double_framerate
printed 50i but display was actually set to 50p.
This commit is contained in:
@@ -1235,12 +1235,8 @@ static bool reconfigure_decoder(struct state_video_decoder *decoder,
|
||||
/* reconfigure VO and give it opportunity to pass us pitch */
|
||||
ret = display_reconfigure(decoder->display, display_desc, decoder->video_mode);
|
||||
if(!ret) {
|
||||
LOG(LOG_LEVEL_ERROR) << MOD_NAME << "Unable to reconfigure display to "
|
||||
<< display_desc << "\n";
|
||||
return false;
|
||||
}
|
||||
LOG(LOG_LEVEL_NOTICE) << MOD_NAME << "Successfully reconfigured display to "
|
||||
<< display_desc << "\n";
|
||||
decoder->display_desc = display_desc;
|
||||
|
||||
len = sizeof(display_requested_rgb_shift);
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "vo_postprocess.h"
|
||||
|
||||
#define DISPLAY_MAGIC 0x01ba7ef1
|
||||
#define MOD_NAME "[display] "
|
||||
|
||||
/// @brief This struct represents initialized video display state.
|
||||
struct display {
|
||||
@@ -445,7 +446,7 @@ int display_reconfigure(struct display *d, struct video_desc desc, enum video_mo
|
||||
pp_desc.tile_count = 1;
|
||||
}
|
||||
if (!vo_postprocess_reconfigure(d->postprocess, pp_desc)) {
|
||||
log_msg(LOG_LEVEL_ERROR, "[video dec.] Unable to reconfigure video "
|
||||
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Unable to reconfigure video "
|
||||
"postprocess.\n");
|
||||
return false;
|
||||
}
|
||||
@@ -453,6 +454,13 @@ int display_reconfigure(struct display *d, struct video_desc desc, enum video_mo
|
||||
int render_mode; // WTF ?
|
||||
vo_postprocess_get_out_desc(d->postprocess, &display_desc, &render_mode, &d->pp_output_frames_count);
|
||||
int rc = d->funcs->reconfigure_video(d->state, display_desc);
|
||||
if (rc) {
|
||||
log_msg(LOG_LEVEL_NOTICE, MOD_NAME "Successfully reconfigured display to %s\n",
|
||||
video_desc_to_string(display_desc));
|
||||
} else {
|
||||
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Unable to reconfigure display to %s\n",
|
||||
video_desc_to_string(display_desc));
|
||||
}
|
||||
len = sizeof d->display_pitch;
|
||||
d->display_pitch = PITCH_DEFAULT;
|
||||
d->funcs->ctl_property(d->state, DISPLAY_PROPERTY_BUF_PITCH,
|
||||
|
||||
Reference in New Issue
Block a user