sys->display.title = var_CreateGetNonEmptyString(vout, "video-title");
/* */
- video_format_t source = vout->p->fmt_render;
+ video_format_t source = vout->p->original;
source.i_visible_width = source.i_width;
source.i_visible_height = source.i_height;
source.i_x_offset = 0;
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd = sys->display.vd;
-
- /* */
video_format_t source = vd->source;
- vout->p->fmt_out.i_chroma = source.i_chroma;
- vout->p->fmt_out.i_width =
- vout->p->fmt_out.i_visible_width = source.i_width;
- vout->p->fmt_out.i_height =
- vout->p->fmt_out.i_visible_height = source.i_height;
- if (source.i_sar_num > 0 && source.i_sar_den > 0) {
- vlc_ureduce(&vout->p->fmt_out.i_sar_num, &vout->p->fmt_out.i_sar_den,
- source.i_sar_num, source.i_sar_den, 0);
- } else {
- vout->p->fmt_out.i_sar_num = 1;
- vout->p->fmt_out.i_sar_den = 1;
- }
- vout->p->fmt_out.i_sar_num = source.i_sar_num;
- vout->p->fmt_out.i_sar_den = source.i_sar_den;
- vout->p->fmt_out.i_x_offset = 0;
- vout->p->fmt_out.i_y_offset = 0;
- vout->p->fmt_out.i_rmask = source.i_rmask;
- vout->p->fmt_out.i_gmask = source.i_gmask;
- vout->p->fmt_out.i_bmask = source.i_bmask;
- video_format_FixRgb(&vout->p->fmt_out);
-
- if (vout->p->fmt_in.i_visible_width != source.i_visible_width ||
- vout->p->fmt_in.i_visible_height != source.i_visible_height ||
- vout->p->fmt_in.i_x_offset != source.i_x_offset ||
- vout->p->fmt_in.i_y_offset != source.i_y_offset )
- sys->i_changes |= VOUT_CROP_CHANGE;
-
/* XXX For non dr case, the current vout implementation force us to
* create at most 1 direct picture (otherwise the buffers will be kept
* referenced even through the Init/End.
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd = sys->display.vd;
- while (sys->i_changes & (VOUT_ASPECT_CHANGE |
- VOUT_CROP_CHANGE)) {
- /* */
- if (sys->i_changes & VOUT_ASPECT_CHANGE) {
- vout->p->fmt_out.i_sar_num = vout->p->fmt_in.i_sar_num;
- vout->p->fmt_out.i_sar_den = vout->p->fmt_in.i_sar_den;
-
- vout_SetDisplayAspect(vd, vout->p->fmt_in.i_sar_num, vout->p->fmt_in.i_sar_den);
-
- sys->i_changes &= ~VOUT_ASPECT_CHANGE;
- }
- if (sys->i_changes & VOUT_CROP_CHANGE) {
- const video_format_t crop = vout->p->fmt_in;
- const video_format_t org = vout->p->fmt_render;
- /* FIXME because of rounding errors, the reconstructed ratio is wrong */
- unsigned num = 0;
- unsigned den = 0;
- if (crop.i_x_offset == org.i_x_offset &&
- crop.i_visible_width == org.i_visible_width &&
- crop.i_y_offset == org.i_y_offset + (org.i_visible_height - crop.i_visible_height)/2) {
- vlc_ureduce(&num, &den,
- crop.i_visible_width * crop.i_sar_num,
- crop.i_visible_height * crop.i_sar_den, 0);
- } else if (crop.i_y_offset == org.i_y_offset &&
- crop.i_visible_height == org.i_visible_height &&
- crop.i_x_offset == org.i_x_offset + (org.i_visible_width - crop.i_visible_width)/2) {
- vlc_ureduce(&num, &den,
- crop.i_visible_width * crop.i_sar_num,
- crop.i_visible_height * crop.i_sar_den, 0);
- }
- vout_SetDisplayCrop(vd, num, den,
- crop.i_x_offset, crop.i_y_offset,
- crop.i_visible_width, crop.i_visible_height);
- sys->i_changes &= ~VOUT_CROP_CHANGE;
- }
-
- }
-
bool reset_display_pool = sys->display.use_dr && vout_AreDisplayPicturesInvalid(vd);
vout_ManageDisplay(vd, !sys->display.use_dr || reset_display_pool);