From: <ku...@cc...> - 2002-06-28 14:07:11
|
I tried asking this some time ago, but I'll ask again as I received no answer and as I know a lot more about xine's internals. Is it possible to have full color (24bpp) overlays with alpha? If not what would you recommend as the easiest way of hacking it in? I was thinking of creating a modified xv output plugin with what I need. The reason I'm asking this is I'm trying to develop a xine ui for an embedded (or whatever) box my friend built. It's supposed to be a DVD/VCD/DivX player with no keyboard and mouse. So I need an on-screen menu, and I'd like to have a pretty one. Thanks -- Kurre |
From: Miguel F. <mi...@ce...> - 2002-06-28 14:25:37
|
Hi, The osd/blending stuff is paletized. Every palette entry is a YUV value plus alpha channel. I guess current palette has 256 colors, but it may be increased if needed. regards, Miguel On Fri, 2002-06-28 at 11:06, Kurre St=E5hlberg wrote: > I tried asking this some time ago, but I'll ask again as I received no=20 > answer and as I know a lot more about xine's internals. >=20 > Is it possible to have full color (24bpp) overlays with alpha? If not=20 > what would you recommend as the easiest way of hacking it in? I was=20 > thinking of creating a modified xv output plugin with what I need. >=20 > The reason I'm asking this is I'm trying to develop a xine ui for an=20 > embedded (or whatever) box my friend built. It's supposed to be a=20 > DVD/VCD/DivX player with no keyboard and mouse. So I need an on-screen=20 > menu, and I'd like to have a pretty one. >=20 > Thanks >=20 > -- > Kurre >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Caffeinated soap. No kidding. > http://thinkgeek.com/sf > _______________________________________________ > xine-devel mailing list > xin...@li... > https://lists.sourceforge.net/lists/listinfo/xine-devel |
From: James Courtier-D. <Ja...@su...> - 2002-06-28 14:38:58
|
Kurre Sta*hlberg wrote: > I tried asking this some time ago, but I'll ask again as I received no > answer and as I know a lot more about xine's internals. > > Is it possible to have full color (24bpp) overlays with alpha? If not > what would you recommend as the easiest way of hacking it in? I was > thinking of creating a modified xv output plugin with what I need. > > The reason I'm asking this is I'm trying to develop a xine ui for an > embedded (or whatever) box my friend built. It's supposed to be a > DVD/VCD/DivX player with no keyboard and mouse. So I need an on-screen > menu, and I'd like to have a pretty one. > > Thanks > > -- > Kurre > The overlay system works on a palette system. The actual colours used are entered into the palette in YUV format, which is the equivalent of 24bpp. Then, I think that at the moment the maximum amount of entries in the palette table is 255. So you can have 255 different colours in your overlay, and the colours can be anything you like. 255 different colours should be enought for a pretty OSD. (On Screen Display). The overlay system does NOT work with the dxr3 card. At a future date, I might add a menu API to the OSD, so that you can get certain areas of the OSD highlighted in a different colour to show menu selections, without having to have the GUI send an entirely new overlay each time a person presses a key to select something else in the OSD menu. So what you need is just the current XV output plugin, and just change/create a new non-gui xine ui which uses OSD calls to display the on screen menus. You might want to start with the current aaxine or sinek ui and modify them as needed. Cheers James |
From: <ku...@cc...> - 2002-06-28 14:46:20
|
James Courtier-Dutton wrote: > The overlay system works on a palette system. > The actual colours used are entered into the palette in YUV format, > which is the equivalent of 24bpp. > Then, I think that at the moment the maximum amount of entries in the > palette table is 255. > So you can have 255 different colours in your overlay, and the colours > can be anything you like. > 255 different colours should be enought for a pretty OSD. (On Screen > Display). > The overlay system does NOT work with the dxr3 card. > > At a future date, I might add a menu API to the OSD, so that you can > get certain areas of the OSD highlighted in a different colour to show > menu selections, without having to have the GUI send an entirely new > overlay each time a person presses a key to select something else in > the OSD menu. > > So what you need is just the current XV output plugin, and just > change/create a new non-gui xine ui which uses OSD calls to display > the on screen menus. > You might want to start with the current aaxine or sinek ui and modify > them as needed. > > Cheers > James > Sorry, but you understood me a bit wrong. I can't use the osd draw stuff, I need to use my own images. Sort of like TV-overlay stuff. To get a better idea why please check out my friends (sucky ;) page about the machine itself at http://www.hut.fi/~tlindber -- Kurre |
From: James Courtier-D. <Ja...@su...> - 2002-06-28 16:16:14
|
Kurre Sta*hlberg wrote: > James Courtier-Dutton wrote: > >> The overlay system works on a palette system. >> The actual colours used are entered into the palette in YUV format, >> which is the equivalent of 24bpp. >> Then, I think that at the moment the maximum amount of entries in the >> palette table is 255. >> So you can have 255 different colours in your overlay, and the >> colours can be anything you like. >> 255 different colours should be enought for a pretty OSD. (On Screen >> Display). >> The overlay system does NOT work with the dxr3 card. >> >> At a future date, I might add a menu API to the OSD, so that you can >> get certain areas of the OSD highlighted in a different colour to >> show menu selections, without having to have the GUI send an entirely >> new overlay each time a person presses a key to select something else >> in the OSD menu. >> >> So what you need is just the current XV output plugin, and just >> change/create a new non-gui xine ui which uses OSD calls to display >> the on screen menus. >> You might want to start with the current aaxine or sinek ui and >> modify them as needed. >> >> Cheers >> James >> > Sorry, but you understood me a bit wrong. I can't use the osd draw > stuff, I need to use my own images. Sort of like TV-overlay stuff. To > get a better idea why please check out my friends (sucky ;) page about > the machine itself at http://www.hut.fi/~tlindber > > -- > Kurre > > You would then need to use the "video_overlay_get_handle" get a overlay handle. "static int32_t video_overlay_add_event(video_overlay_instance_t *this_gen, void *event_gen )" to send the overlays to the display. Maybe those functions calls should be made public so that xine ui can use them if needed. Cheers James |
From: Miguel F. <mi...@ce...> - 2002-06-28 17:19:50
|
On Fri, 2002-06-28 at 13:18, James Courtier-Dutton wrote: > You would then need to use the > "video_overlay_get_handle" get a overlay handle. > "static int32_t video_overlay_add_event(video_overlay_instance_t > *this_gen, void *event_gen )" to send the overlays to the display. > > Maybe those functions calls should be made public so that xine ui can > use them if needed. I don't think it would make any sense to export these. The format used by overlays (rle) is too xine specific, and not everybody will want to encode things to this format. Besides any internal change would break things. regards, Miguel |
From: James Courtier-D. <Ja...@su...> - 2002-06-28 19:24:48
|
Miguel Freitas wrote: >On Fri, 2002-06-28 at 13:18, James Courtier-Dutton wrote: > > >>You would then need to use the >>"video_overlay_get_handle" get a overlay handle. >>"static int32_t video_overlay_add_event(video_overlay_instance_t >>*this_gen, void *event_gen )" to send the overlays to the display. >> >>Maybe those functions calls should be made public so that xine ui can >>use them if needed. >> >> > >I don't think it would make any sense to export these. The format used >by overlays (rle) is too xine specific, and not everybody will want to >encode things to this format. Besides any internal change would break >things. > >regards, > >Miguel > > > > I had originally written them with the intention of the GUI being able to provide full OSD functionallity, with the GUI controlling an entire full screen overlay just like DVD menus. But there are alternatives. Notice that when one puts xine full screen, the GUI still appears. So all one really has to do is design a GUI which relies only on keyboard/remote control input, instead of mouse. So there would be nice big text based menus, instead of all the really small buttons which are currently used, which are impossible to see when sitting on the sofa across the room from the TV. Cheers James |
From: Kurre <ku...@cc...> - 2002-06-28 17:35:23
|
On Friday 28 June 2002 19:18, James Courtier-Dutton wrote: > You would then need to use the > "video_overlay_get_handle" get a overlay handle. > "static int32_t video_overlay_add_event(video_overlay_instance_t > *this_gen, void *event_gen )" to send the overlays to the display. > > Maybe those functions calls should be made public so that xine ui can > use them if needed. > > Cheers > James > That "public" is the key.. :) Although I understand that the stuff I need= =20 isn't needed very commonly. -- Kurre |
From: <ku...@cc...> - 2002-06-28 14:40:28
|
Miguel Freitas wrote: >Hi, > >The osd/blending stuff is paletized. Every palette entry is a YUV value >plus alpha channel. I guess current palette has 256 colors, but it may >be increased if needed. > >regards, > >Miguel > > > Yeah, I've been trying stuff out with it for a while now. But the most important thing for me would be using ready made images (png or whatever). Of course xine should know nothing about loading these images, but I need to be able to copy an image to overlay buffer. That's not possible AFAIK. Would it be possible to add possiblity to do all the overlay stuff (except blending it with the video frame) in gui and then just use xine_set_overlay(...) to set it active. So that I could draw to a buffer easily and then just let xine know about it. (If I remember correctly there was something like that in 0.9.9 but was removed) -- Kurre |
From: Miguel F. <mi...@ce...> - 2002-06-28 15:03:05
|
Hi, On Fri, 2002-06-28 at 11:39, Kurre St=E5hlberg wrote: > Yeah, I've been trying stuff out with it for a while now. But the most=20 > important thing for me would be using ready made images (png or=20 > whatever). Of course xine should know nothing about loading these=20 > images, but I need to be able to copy an image to overlay buffer. That's=20 > not possible AFAIK. It is possible, and this is exactly how fonts are drawed. They are bitmap images rendered outside xine and saved in a gzipped file. Just check the utility that build them (it's in misc directory i guess). =20 > Would it be possible to add possiblity to do all the overlay stuff=20 > (except blending it with the video frame) in gui and then just use=20 > xine_set_overlay(...) to set it active. So that I could draw to a buffer=20 > easily and then just let xine know about it. Hmm, this is an interesting idea... and easily implementable! > (If I remember correctly there was something like that in 0.9.9 but was=20 > removed) No, there was not. regards, Miguel |
From: Kurre <ku...@cc...> - 2002-06-28 17:32:25
|
On Friday 28 June 2002 18:08, Miguel Freitas wrote: > Hi, > > On Fri, 2002-06-28 at 11:39, Kurre St=E5hlberg wrote: > > Yeah, I've been trying stuff out with it for a while now. But the mos= t > > important thing for me would be using ready made images (png or > > whatever). Of course xine should know nothing about loading these > > images, but I need to be able to copy an image to overlay buffer. Tha= t's > > not possible AFAIK. > > It is possible, and this is exactly how fonts are drawed. They are > bitmap images rendered outside xine and saved in a gzipped file. Just > check the utility that build them (it's in misc directory i guess). My motivation for starting this thread was to avoid tinkering with xine-l= ib,=20 since I'm pretty sure that most of my changes wouldn't make it to the CVS= =20 because of bad quality ;) > > Would it be possible to add possiblity to do all the overlay stuff > > (except blending it with the video frame) in gui and then just use > > xine_set_overlay(...) to set it active. So that I could draw to a buf= fer > > easily and then just let xine know about it. > > Hmm, this is an interesting idea... and easily implementable! A few days ago I tried to look into xine-lib sources to find out about th= e=20 overlay engine's possibilities but got lost somewhere in the middle.. :)=20 Anyway I could try to look into it if nobody else (read anybody with=20 knowledge :) is willing to. -- Kurre |
From: Miguel F. <mi...@ce...> - 2002-06-29 20:58:52
|
Hi Kurre, > On Friday 28 June 2002 18:08, Miguel Freitas wrote: >> > Would it be possible to add possiblity to do all the overlay stuff >> > (except blending it with the video frame) in gui and then just use >> > xine_set_overlay(...) to set it active. So that I could draw to a >> > buffer easily and then just let xine know about it. >> >> Hmm, this is an interesting idea... and easily implementable! > > A few days ago I tried to look into xine-lib sources to find out about > the overlay engine's possibilities but got lost somewhere in the > middle.. :) Anyway I could try to look into it if nobody else (read > anybody with knowledge :) is willing to. First, please make sure the current font loading mechanism can't fulfil your needs (it is possible to load any set of bitmaps with it). Also note that fonts/bitmaps can either be installed in system wide xine dir or inside user's home. Then if you think this function is really needed (why?) we can implement it. We'd just have to agree about the parameters, like providing a generic way to copy a bitmap over an area (x1,y1,x2,y2) at the osd image. The hard part will be convincing Guenter about adding another osd function! ;) regards, Miguel |
From: Kurre <ku...@cc...> - 2002-06-30 14:25:40
|
On Sunday 30 June 2002 01:05, Miguel Freitas wrote: > Hi Kurre, > > > On Friday 28 June 2002 18:08, Miguel Freitas wrote: > >> > Would it be possible to add possiblity to do all the overlay stuff > >> > (except blending it with the video frame) in gui and then just use > >> > xine_set_overlay(...) to set it active. So that I could draw to a > >> > buffer easily and then just let xine know about it. > >> > >> Hmm, this is an interesting idea... and easily implementable! > > > > A few days ago I tried to look into xine-lib sources to find out abou= t > > the overlay engine's possibilities but got lost somewhere in the > > middle.. :) Anyway I could try to look into it if nobody else (read > > anybody with knowledge :) is willing to. > > First, please make sure the current font loading mechanism can't fulfil > your needs (it is possible to load any set of bitmaps with it). Also no= te > that fonts/bitmaps can either be installed in system wide xine dir or > inside user's home. > Then if you think this function is really needed (why?) we can implemen= t > it. We'd just have to agree about the parameters, like providing a gene= ric > way to copy a bitmap over an area (x1,y1,x2,y2) at the osd image. > The hard part will be convincing Guenter about adding another osd > function! ;) > regards, > > Miguel Interesting. It never even crossed my mind that I could (mis)use the font= =20 stuff like that.. :) There is still the color amount problem though. I ca= n't=20 think that I could make my vision of the menu use only 256 colors. Thanks= for=20 the tip anyway, I'll check it out.=20 --=20 Kurre |
From: James Courtier-D. <Ja...@su...> - 2002-06-30 14:40:27
|
Kurre Ståhlberg wrote: >On Sunday 30 June 2002 01:05, Miguel Freitas wrote: > > >>Hi Kurre, >> >> >> >>>On Friday 28 June 2002 18:08, Miguel Freitas wrote: >>> >>> >>>>>Would it be possible to add possiblity to do all the overlay stuff >>>>>(except blending it with the video frame) in gui and then just use >>>>>xine_set_overlay(...) to set it active. So that I could draw to a >>>>>buffer easily and then just let xine know about it. >>>>> >>>>> >>>>Hmm, this is an interesting idea... and easily implementable! >>>> >>>> >>>A few days ago I tried to look into xine-lib sources to find out about >>>the overlay engine's possibilities but got lost somewhere in the >>>middle.. :) Anyway I could try to look into it if nobody else (read >>>anybody with knowledge :) is willing to. >>> >>> >>First, please make sure the current font loading mechanism can't fulfil >>your needs (it is possible to load any set of bitmaps with it). Also note >>that fonts/bitmaps can either be installed in system wide xine dir or >>inside user's home. >>Then if you think this function is really needed (why?) we can implement >>it. We'd just have to agree about the parameters, like providing a generic >>way to copy a bitmap over an area (x1,y1,x2,y2) at the osd image. >>The hard part will be convincing Guenter about adding another osd >>function! ;) >>regards, >> >>Miguel >> >> > >Interesting. It never even crossed my mind that I could (mis)use the font >stuff like that.. :) There is still the color amount problem though. I can't >think that I could make my vision of the menu use only 256 colors. Thanks for >the tip anyway, I'll check it out. > > > I think it would be nice to be able to start with a simple bitmap which could be the backround or inital starting point for the OSD, and then Fonts etc, added/rendered onto it. So, probably the API could take a .png image and then behind the scenes, convert it to the xine-lib internal rle osd format. Cheers James |