PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

OpenDisplay and CloseDisplay in GapiApplication

Hey guys,

could anyone say is it possible to close and open display in GapiApplication?
I need free display for a some time to show video direct on screen.

I tryed to call CloseDisplay, than show video, and than call OpenDisplay.
It worked, but after my OpenDisplay when next Flip called application crashed. :(
What I may forget? Should it work at all or not?

I will be grateful for any information.

Best regards,
AndreyT.
InexorableTash · 01 Nov 2002, 19:47 UTC
Related to this, a feature request -

I'd love to be able to flip between windowed and fullscreen mode with a CGapiApplication app running on a desktop PC.
Try suspending the display... It would probably also be a good idea to call Pause() on each frame when you show the video...
For my program I used SuspendDisplay() instead of CloseDisplay() and ResumeDisplay() instead of OpenDisplay().
Most probably I already tryed SuspendDisplay() and ResumeDisplay() functions before Close and Open...
and it doesn't help (I tryed so much things that couldn't remember it exactly ;)).
I'll retry at monday.
As I understand these functions just stopping output at display and locking it's surface, but dont closing GAPI screen, so other application or thread couldn't open GAPI screen exclusively

sbl, what's Pause() function to call each frame? I doesn't seen it anywhere...

BTW: I found slightly other solution. I hope it will fit my needs. I could show video :

1. directly to m_display, don't calling Flip().
Nothing will be updated except video, but it's Ok in my case. I tryed, speed is not bad.

2. to backbuffer after PrepareNextFrame() synchronizing Flips() with movie.
(dont tryed yet. speed should be almost as in 1, but all GapiDraw features should work)

3. to any CGapiSurface.
I tryed, speed is not enough, FPS not stable, probably I make mistake in sinchronization.

I'll continue my investigations at monday (or tomorrow), and inform you about progress here :)

If you are interesting, I'm trying to use MpegTV SDK (http://www.mpegtv.com/sdk/)

Best regards,
AndreyT.