Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: WebWorks BB10 screenshot extension

@John: do you mean capture _other_ apps screens? I don't think device security would allow us to do that. That's what the "desktop camera" is for.
Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: WebWorks BB10 screenshot extension

@peardox: not really the use case for this extension. As the bitmaps have to be individually compressed and (in the case of data url's) wrangled through an AJAX response, I doubt whether you would achieve a usable framerate. But you could adapt the extension to encode frames to an h264 file...
Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: WebWorks BB10 screenshot extension

Think ScreenCam where you can create a video of your app in action

 

This is the reason why 15FPS is desired

 

The output needs to be numbered along the lines of GRAB00nn.ext but then lend itself perfectly to constructing into a video with FOSS SW




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: WebWorks BB10 screenshot extension

@John

 

Its a good idea though :smileyhappy:

 

I've got libFFMpeg working so it is (potentially) poss to buffer the output I world guess

 

I;m thinking of RAW (maybe) os a quick compress for later processing

 

I'm not saying this is easy, in fact just the opposite but defo with thinging about




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: WebWorks BB10 screenshot extension

In answer to an earier one is seems perfectly possible to grab another App

 

I'm not positive how it would be achieved but PreventSleep from Tim shows the basics




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: WebWorks BB10 screenshot extension

There is another API for Screenshots in 10.2 that can take shots of other app screens, but it requires a special permission (as far as I know), and prompts the user I think.

 

Capturing a video stream is possible apparently, and it's the desktop camera like Innovatology mentioned. I don't know the API myself.

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: WebWorks BB10 screenshot extension

Tim - I see this as being a zero issue

 

Youd use it to capture stuff from product




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: WebWorks BB10 screenshot extension

Rats

 

Jons recent stuff fills all the blanks in

 

This is perfectly do-able




Click the like button if you find my posts useful!
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: WebWorks BB10 screenshot extension

[ Edited ]

I expect the framerate depends on the device you're using - a Z30 would perform quite a bit better than a Z10. But capturing/encoding/saving the smaller image of the Q10's screen should be faster. There would also be a difference between saving to device memory and SD card.

 

As for saving to disk:

  • it would probably be quicker to open the file once and write multipleframes to it.
  • Writingr aw bitmaps is trade-off: more to write, less to copy, encode & compress.
  • Writing to a .bmp should work.
  • don't know whether the BB10 ports of libpng and libjpeg do any kind of hardware acceleration.

 

Remember that currently the screenshot is performed on the main thread. Updates to the DOM and even CSS3 transitions are often delayed (queued) for repaint, and certainly happen on other threads. That might cause tearing/shearing in your video. There will also be considerable delays due to the AJAX events used by the WebWorks extension framework.

 

The use-case for this extension is (was) easy grabbing of images to save or share via the Invoke Framework. Not really recording movies ;-)

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
New Contributor
elvishew
Posts: 4
Registered: ‎11-02-2012
My Device: PlayBook

Re: WebWorks BB10 screenshot extension

Hi, I'm sorry that I can't find the "framework\ext" path in my webworks sdk install path, so I create it by hand, as "D:\Program Files\BlackBerry\BB10 WebWorks SDK 2.0.0.71\Framework\ext\net.jonwebb.screenshot", but it does work at all, so I wonder what is wrong?

Please use plain text.