[App] ScreenCap (OSDcap) - Screen capture

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

[App] ScreenCap (OSDcap) - Screen capture

Post by geo650 » Thu Oct 21, 2010 8:08 pm

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.
Last edited by moras86 on Thu Nov 17, 2011 5:05 pm, edited 2 times in total.
Reason: add Wiki page link

arris69
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

Post by arris69 » Thu Oct 21, 2010 8:45 pm

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. :(
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)

hth
arris

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

Re: OSDcap - Screen (OSD) capture application

Post by geo650 » Fri Oct 22, 2010 9:14 am

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...
Last edited by geo650 on Fri Oct 22, 2010 9:27 am, edited 1 time in total.

antapetr
Posts: 32
Joined: Fri Nov 13, 2009 12:52 pm
Location: Kaunas, Lithuania

Re: OSDcap - Screen (OSD) capture application

Post by antapetr » Fri Oct 22, 2010 9:27 am

geo650 wrote:Snapshots will be blank. :(
Hi,
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
directly in SDL_CreateRGBSurfaceFrom()

Happy hacking

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

Re: OSDcap - Screen (OSD) capture application

Post by geo650 » Fri Oct 22, 2010 4:17 pm

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):

Image

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.

antapetr
Posts: 32
Joined: Fri Nov 13, 2009 12:52 pm
Location: Kaunas, Lithuania

Re: OSDcap - Screen (OSD) capture application

Post by antapetr » Fri Oct 22, 2010 4:23 pm

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) */
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)

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

Re: OSDcap - Screen (OSD) capture application

Post by geo650 » Fri Oct 22, 2010 4:35 pm

antapetr wrote:
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) */
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)
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?

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

Re: OSDcap - Screen (OSD) capture application

Post by geo650 » Fri Oct 22, 2010 8:30 pm

Finally, I made an application that is working fine. That's what I wanted to do. :P
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.

User avatar
geo650
Official SamyGO Developer
Posts: 302
Joined: Wed Oct 07, 2009 12:03 pm

Re: OSDcap - Screen (OSD) capture application

Post by geo650 » Sat Oct 23, 2010 2:04 pm

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.
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.
Anyway, you can always use your still camera to make some snapshots :lol:

Post Reply

Return to “[B] Software”