# Custom output & preview



## Shader (Oct 9, 2013)

*Hi*


I wanted to have custom preview of the global sources. For that, I've modified/implemented :
void GlobalSource::Tick(float fSeconds)  {
....
}

I want to save a BMP/JPG of the global source each second, so far I've only managed to create an empty file at the data directory with the name of the source.
How can I access the latest frame?
I've tried globalSource->GetMatrix("??", myFrame);
but I wasn't able to receive any data.


thanks in advance.


----------



## Jim (Oct 9, 2013)

I don't know if saving a file every second is a good idea.

Anyway, this sort of functionality is not currently possible.  It will be possible in the rewrite but not in the current version.


----------



## Shader (Oct 9, 2013)

Hi Jim:

Saving into a file is a temporary solution, i was thinking on creating a memory mapped file. I want to make a plugin to 'see' the global source before switching the scene.
I know I have to modify the source code, in the process I'm learning a lot about the project so I can collaborate in future development. 
The other solution that I was evaluating was to extend DeviceSource::ReceiveMediaSample so I can put a handler there but I guess the solution of GlobalSource::Tick will be enough (if I learn how to access the last frame).


----------



## zurkan (Apr 15, 2015)

I use post-build commands or the batch files provided to copy the build files. Though I'm confused about noisegate - I've never particularly had a problem with it


----------

