On Sat, 2006-12-30 at 20:15 +0100, Dirk Meyer wrote: > Let us make an example. I have Freevo running at 1360x768. Do I create > a Buffercanvas in that size and let the popcorn/candy deal with how to > put that n a hardware scaled video?
If you're talking about OSD, you create a PlayerOSDCanvas, not a BufferCanvas. (PlayerOSDCanvas subclasses BufferCanvas though.) The size of the PlayerOSDCanvas (which is specified on the constructor and lamely defaults to 640x480 right now) will, however, need to be the same aspect ratio as the video that's playing. This is why it's necessary to use expand in the filter chain, so we have a pre-determined aspect ratio for the video. So to answer your question, yes, you can set the canvas size to be 1360x768, or in fact any resolution of the same aspect ratio, as long as we have the player expand the frame to that aspect. Let's say we're playing an NTSC DVD on a 4:3 display: mplayer dvd://1 -vf expand=:::::4/3,overlay=whatever It's not necessary that we know beforehand the actual final resolution, because kaa.popcorn will tell that to us later in the osd_configure signal. But we do need to know the aspect ratio beforehand. So in this example we know that the aspect ratio of the video is guaranteed to be 4:3 (the player will add black bars as needed), and we know that the OSD canvas will get scaled for us to the frame size, we can make the PlayerOSDCanvas any resolution so long as it's 4:3. In our example, we have a 720x480 DVD frame, and -vf expand makes that frame 720x641, which then gets hw-scaled to 854x641 which is our desired 4:3 aspect ratio. The OSD canvas is 640x480 -- that's what we as the canvas API user see -- which gets scaled by vf_overlay to 720x641, and then the frame+overlay subsequently scaled by the video card to 854x641. Jason. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel