[MPlayer-dev-eng] [PATCH] add -name and -title options for x video_outs
Paul TT
mplayer at paultt.org
Thu Oct 22 15:51:19 CEST 2009
On Thu, 22 Oct 2009 15:36:54 +0200
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On Thu, Oct 22, 2009 at 02:38:15PM +0200, Paul TT wrote:
> > > > - wmClass.res_name = name;
> > > > + if (vo_winname != NULL)
> > > > + wmClass.res_name = vo_winname;
> > > > + else
> > > > + wmClass.res_name = name;
> > >
> > > Use ?:
> > changing it could be useful for window identification.
> > man xter
> > /-name
> > for example
> > with the effort to implement title, name could be useful too.
>
> I meant, write this as
> wmClass.res_name = vo_winname ? vo_winname : name;
lol, i completely misunderstood :D
it's okay, i'll do
> > > > +void vo_x11_settitle(char *title)
> > > > +{
> > > > + if(title != NULL)
> > > > + vo_wintitle = title;
> > > > +}
> > > [...]
> > > > + vo_x11_settitle(vo_wintitle);
> > >
> > > That really makes no sense whatsoever.
> > > Also the doxy is nonsense, vo_x11_settitle only
> > > sets vo_wintitle, it does not set the title
> > > of an existing window.
> > mhhhhh iep.
> > probably the doxy is superfluous indeed and moving out from x11 code
> > that one function ist name and meaning indeed varies
>
> Not the reason it makes no sense is because you use
> it like
> vo_x11_settitle(vo_wintitle);
> which is a very complicated way to do nothing at all.
understood yr point
> You don't have to, not at all. But you are making it needlessly
> hard to implement it in other vos by making it X11-specific, and
> that's not ok IMO.
> Btw. it also seems you forgot to put the cfg-mplayer.h part under
> #ifdef CONFIG_X11, so it wouldn't compile at all without X11 :-)
you're right. anyway by moving it, the CONFIG_X11 will have no sense :)
> > > Seems to me like there's no way to get the current behaviour.
> >
> > didnt' really understand what you're saying.. ????
>
> Well, what is the title currently set to? How do you get MPlayer to
> set it to exactly the same value after your patch?
> I'd find it preferable if the default window title would not be
> changed by your patch, in case someone relies on it.
mh
what about setting into that way, so:
-title "fancy title" :: set the title to "Fancy Title"
-title :: (without arg) set the title to filename
no -title option specified :: leave the current behaviour working
(title set to "MPlayer")
what do you think about this?
> > ...
> > good point, my fault :(
> > title should be updated at every file change, right :)
>
> Well, if you don't want that, at least these options should be
> CONFIG_GLOBAL to indicate you can not change them per-file.
> But making them changeable (preferably in a way that makes it easy to
> add support for changing the title via the set_property slave
> interface) would be better.
me too think this ;)
(yoda speaking :D)
> Of course in that regard, implementing this via a VFCTRL/VOCTRL might
> be even nicer, since it would allow video filters to easily display
> it e.g. in the OSD, too.
> > anyway, point to do:
> > 1. move from x11 code to video_out generic code
> > 2. verify fixed-vo and related stuff.
>
> Yes, other improvements as suggested above would be possible, too,
> though.
yes, obviously :)
thanx
More information about the MPlayer-dev-eng
mailing list