[MPlayer-cvslog] r32478 - in trunk: DOCS/tech/slave.txt command.c input/input.c input/input.h

Nicolas George nicolas.george at normalesup.org
Wed Oct 13 11:54:47 CEST 2010


Le duodi 22 vendémiaire, an CCXIX, Reimar Döffinger a écrit :
> Hm? If settings.changed is meant to indicate that the video properties
> changed, I don't think it should be set on switching to another file.

My reasoning was: from the point of view of the sources that were just added
or reset, the settings have really changed, since before that, they were
nothing at all.

On the other hand, from the point of view of the other sources, a few
extraneous cases where settings.changed is set should be no problem at all:
after all, it happens if the user toggles the fullscreen by mistake or if
what changed was a parameter they do not care about.

And after all, "this is a new file" or "there is a new source" could
reasonably be considered settings changes worthy of being reported, there is
nothing absurd there.

> Can you explain what kind of initialization those sources have to do
> and why they can't figure out that they have to do it in some other way?

I can explain the particular case of ASS: the resolution has to be set once
just after the render has been created, and then each time it changes. The
problem is the first case: the resolution can not be set immediately,
because it will only be available on the next "update" call. And on the next
"update" call, there is nothing to indicate that the resolution needs to be
set apart from adding "static int ass_renderer_needs_init = 1" somewhere.

The change I suggested ensures that settings.changed is set on the first
"update" call after a source is added or reset. The consequence is that "set
the resolution on init" becomes just a special case of "set the resolution
when it changes", with absolutely no need for additional code.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20101013/f6b7ed29/attachment.pgp>


More information about the MPlayer-cvslog mailing list