Hello!
I want to make some screenshots of OSD graphics. Since there is no known method of doing this task, I decided to write a small application. Unfortunately, I cannot make any screenshot. Can you help me make this application working?
For reference, please take a look at this thread:
http://forum.samygo.tv/viewtopic.php?f=3&t=346
My application is attached below. Run once, and then press PAUSE key to save capxxx.bmp files. Restart may occur. Expect coredump. Snapshots will be blank.
Download last version - ScreenCap app.
[App] ScreenCap (OSDcap) - Screen capture
[App] ScreenCap (OSDcap) - Screen capture
Last edited by moras86 on Thu Nov 17, 2011 5:05 pm, edited 2 times in total.
Reason: add Wiki page link
Reason: add Wiki page link
-
- Official SamyGO Developer
- Posts: 1700
- Joined: Fri Oct 02, 2009 8:52 am
- Location: Austria/Vienna (no Kangaroos here)
- Contact:
Re: OSDcap - Screen (OSD) capture application
look at svn branch and search for StarterLib (savesurf.h) or may in SamyGO-Extensions too (there exist some native and some "game" version). its also possible to take osd screencap with vfb driver (search for framebuffer at http://www.lg-hack.info)geo650 wrote:Hello!
I want to make some screenshots of OSD graphics. Since there is no known method of doing this task, I decided to write a small application. Unfortunately, I cannot make any screenshot. Can you help me make this application working?
For reference, please take a look at this thread:
http://forum.samygo.tv/viewtopic.php?f=3&t=346
My application is attached below. Run once, and then press PAUSE key to save capxxx.bmp files. Restart may occur. Expect coredump. Snapshots will be blank.
hth
arris
Re: OSDcap - Screen (OSD) capture application
I have not found a solution yet.
For me, the problem lays in the source RAM area or in accessing method. Even if saved in raw binary file (using fwrite function), it contains only 0xFF's and nothing more. Actually, I don't care if it is BMP, PNG or JPEG file on this stage. I don't want to capture surface created by me but original OSD surface. Are these addresses (0x48291000, 0x48491000, 0x48891000, 0x48a91000) correct for this task?
EDIT:
In other file, I have found this:
#define P0_ADDR 0x79900000UL /* OSD , Mediaplayer (Decoration) SDL_Quit seems to be harmless */
#define P1_ADDR 0x79d00000UL /* Teletext, Youtube (Yahoo-Stuff) Flash (Gallery) */
I will try later...
For me, the problem lays in the source RAM area or in accessing method. Even if saved in raw binary file (using fwrite function), it contains only 0xFF's and nothing more. Actually, I don't care if it is BMP, PNG or JPEG file on this stage. I don't want to capture surface created by me but original OSD surface. Are these addresses (0x48291000, 0x48491000, 0x48891000, 0x48a91000) correct for this task?
EDIT:
In other file, I have found this:
#define P0_ADDR 0x79900000UL /* OSD , Mediaplayer (Decoration) SDL_Quit seems to be harmless */
#define P1_ADDR 0x79d00000UL /* Teletext, Youtube (Yahoo-Stuff) Flash (Gallery) */
I will try later...
Last edited by geo650 on Fri Oct 22, 2010 9:27 am, edited 1 time in total.
Re: OSDcap - Screen (OSD) capture application
Hi,geo650 wrote:Snapshots will be blank.
I think your fault is memory mapping. All video buffers is already mapped to exeDSP address space, just use addresses
Code: Select all
0x48291000 - overlay buffer1
0x48491000 - some working buffer (GetFrameBufferAddress() returns it)
0x48691000 - screen buffer1
0x48891000 - overlay buffer2
0x48a91000 - screen buffer2
Happy hacking
Re: OSDcap - Screen (OSD) capture application
Thank you very much for help. I removed these memory remapping procedures. Source code is much more simplified now.
The first success (file has been converted to JPG using GIMP before uploading to imageshack):
The only problem is that after writing BMP my TV restarts and coredump is created.
And..., I had to add 4096 bytes to the address to get right picture. Why?
Last changes: press one of [<<], [PAUSE], [>>], [PLAY], [STOP] buttons to capture selected memory space.
Here is updated source and executable:
EDIT: Attachment removed due to forum quota limits and new version launched.
The first success (file has been converted to JPG using GIMP before uploading to imageshack):
The only problem is that after writing BMP my TV restarts and coredump is created.
And..., I had to add 4096 bytes to the address to get right picture. Why?
Last changes: press one of [<<], [PAUSE], [>>], [PLAY], [STOP] buttons to capture selected memory space.
Here is updated source and executable:
EDIT: Attachment removed due to forum quota limits and new version launched.
Last edited by geo650 on Wed Oct 27, 2010 11:50 pm, edited 2 times in total.
Re: OSDcap - Screen (OSD) capture application
These are physical memory addresses of various video buffers (or planes). If you working with standalone application (run from Linux command line) then you need to map these to your process memory space, but if you writing Game library for loading to exeDSP all these physical addresses (0x79XXXXXX) are already mapped to exeDSP process address space (at addresses 0x48XXXXXX directly accessible from this process and its libraries)geo650 wrote:In other file, I have found this:
#define P0_ADDR 0x79900000UL /* OSD , Mediaplayer (Decoration) SDL_Quit seems to be harmless */
#define P1_ADDR 0x79d00000UL /* Teletext, Youtube (Yahoo-Stuff) Flash (Gallery) */
Re: OSDcap - Screen (OSD) capture application
I understand now. Thanks. I wonder if there is a memory space (framebuffer) with live video for analog or at least any digital source. Probably not..., but maybe?antapetr wrote:These are physical memory addresses of various video buffers (or planes). If you working with standalone application (run from Linux command line) then you need to map these to your process memory space, but if you writing Game library for loading to exeDSP all these physical addresses (0x79XXXXXX) are already mapped to exeDSP process address space (at addresses 0x48XXXXXX directly accessible from this process and its libraries)geo650 wrote:In other file, I have found this:
#define P0_ADDR 0x79900000UL /* OSD , Mediaplayer (Decoration) SDL_Quit seems to be harmless */
#define P1_ADDR 0x79d00000UL /* Teletext, Youtube (Yahoo-Stuff) Flash (Gallery) */
Re: OSDcap - Screen (OSD) capture application
Finally, I made an application that is working fine. That's what I wanted to do.
Reboot was caused by SDL_Quit() so I decided to try removing both SDL_Init() and SDL_Quit() functions. And it worked!
I made some snapshots from teletext and from main menu, too. BMP files are written slowly but it is not a big problem.
New version attached below. Feel free to expand this app, add other file formats or whatever.
EDIT: Attachment removed due to forum quota limits and new version launched.
Reboot was caused by SDL_Quit() so I decided to try removing both SDL_Init() and SDL_Quit() functions. And it worked!
I made some snapshots from teletext and from main menu, too. BMP files are written slowly but it is not a big problem.
New version attached below. Feel free to expand this app, add other file formats or whatever.
EDIT: Attachment removed due to forum quota limits and new version launched.
Last edited by geo650 on Wed Oct 27, 2010 11:50 pm, edited 1 time in total.
Re: OSDcap - Screen (OSD) capture application
It cannot be executed in the service menu because it must be run from Content Library first. I didn't try to run this app from my starting script. Maybe it would work.meinsource wrote:Is it supposed to work within the service menu too ? This would be great to capture all the setting in these many menus.
Anyway, you can always use your still camera to make some snapshots