DG_GetSurfaceDesc (m_hSurface, &surfDesc);
DG_Lock(m_hSurface, 0, 0, unitRect.width, unitRect.height, 0);
x = horizonal value from 0 - 1920 (for 1080I)
y = vertical value from 0 - 1080 (for 1080I)
*((uint16_t *)((uint8_t *)surfDesc.lpsurface + (y*surfDesc.lPitch)) + x) = 0xffff;
// format is r5, g6, b5
DG_Unlock(m_hSurface);
edit: It was quite easy to switch it to a higher color format by just changing it from Format_16 to Format_32 when the surface was being created. It does not affect the video, it only applies to the overlay surfaces. But the SDK has Format_16 as the default, possibly inserted there by Ellion.
Thanks Joman100
ReplyDeleteIt seems that we are close to have a open source firmware.
Thanks again for your great work.
Hi,
ReplyDeleteGood news , for your success story....but I have a RTD1262 player .... do you think that code will run on 'all' realtek boards ?
Is your idea to create a 'driver' or firmware in order to have video out usable for all linux application ?
Did you try to 'chroot' and run a 'normal' distro ?
Everything I have done so far should work on other RTD 1262/1282 players. There will need to be some customization to get it working. For example, the GPIO numbers may have to change. I know I have at least one wrong on mine because the recording light comes on and stays on. Also, when I add in the remote control capabilities, the specific codes will need to be adjusted to work for other players.
ReplyDeleteCreating a display driver is not my goal. That's an area I am totally unfamiliar with.
I figure out this stuff and include samples of it in the HelloWorld-JC source that anybody can "git" from the opensphd sourceforge project. So if somebody else wants to create a display driver and try to get the entire environment installed, that's fine and dandy with me. But my efforts are focused on getting all the information so I can create a simple media player running that shows CD/movie posters for selecting and playing movies, and can still record from the audio/video-in ports on the ScreenPlay.
Ok Joman100,
ReplyDelete( my name is gigirock)
I'm interesting in the way to use and compile standard and wellknow players with our devices as vlc for example....
So what I need is how to interface video and audio to the system in other hand a driver....
I will start from your work and we will see
Bye and thank you
R5G6B5 means only 16 bit color. Is that all for available colors?
ReplyDeleteFor the graphical overlay it appears to be using 16 bit color. The video undereath obviously goes higher.
ReplyDeleteThere appears to be options for higher colors. There is a enum for PIXEL_FORMAT that gives other formats, including 888A. The GetSurfaceHandle that is defined for the Ellion (and likely for the Iomega) defaults to Color_Format, which comes from DirectGraphics.h. it has a #define COLOR_FORMAT_16 embedded and appears to allow other formats. So this could probably be changed to COLOR_FORMAT_32. I'll experiment around with that tonight and see what happens.
Hi Joman, ltns...
ReplyDeleteI'm interested to see how your investigation into increasing the pixel format goes - I notice the Xtreamer pro (which is using 1283 same as original xtreamer) is apparently abel to use a higher colour depth so there must be something to it (unless this is SDK3 based).
Hope to see you over in #xtreamer again sometime soon.
'CaP
I was able to switch over to 24 bit color by just changing the default used in GetSurfaceHandle. I switched it to Format_32 and that puts it in A/8/8/8 format. But the alpha did not appear to make it transparent. It's possible that it will blend with some of the other layers if I use more than one overlay layer, but it did not blend with the video background.
ReplyDeleteCaP - I'm not gone from the discussion in xtreamer, I actually check it every day. I just don't have anything for the xtreamer folks to test yet, but I do plan on having something soon.
ReplyDeleteGreat news - Very impressed with the progress already. Thanks for keeping us in mind and let me know if you need anything testing.
ReplyDelete'CaP
Not sure if it has any relevance by tghe way, but all of these realtek devices use #ff00ff for a transparency mask. - Just in case it has any bearing.
ReplyDelete'CaP