Hi !
Is there some way to get a 'snapshot' from a videosource (pix_video or pix_film) without using pix_snap ? This does't seem to work with pix_buf since its "only effective if it is storing a static image".
Basicly what I'm trying to do is take a freeze frame of a video stream, do some processing to it, apply an alpha mask and composite it as a freeze over the continued original stream.
I guess I could do this with pix_snap, but then the problem seems to be that the size of the gemwin often differs a lot from the size of the video source wich doesn't work in pix_composite.
Any suggestions ?
cheers /
Martin M
Zitiere lists@martinmalm.com:
Hi !
Is there some way to get a 'snapshot' from a videosource (pix_video or pix_film) without using pix_snap ? This does't seem to work with pix_buf since its "only effective if it is storing a static image".
the hint, that [pix_buf] is only effective with static images is a bit confusing. it means, that copying a whole image each frame from one position in memory to another is "ineffective". (therefore pix-operations are done in-place if possible) [pix_snap] does transfer the pixel-data from grafix-card to main-memory, which is even less effective - a) because you have to do the copying as in [pix_buf],
transfers client2server (eg. setting the state of the rendering engine) but quite slow transfers server2client (eg. obtaining the rendering-buffer) thus [pix_snap] is certainly not what you want.
[pix_buf] might be alright, but Ãt buffers all the new images that arrive, so you won't be able to get a still-image of a video. (as far as i remember)
the solution might be [pix_buffer]+[pix_buffer_read]+[pix_buffer_write] (ok, looks a bit clumsy -- shooting with canons at sparrows, as we say in austria) basically it works like [table]+[tabread]+[tabwrite]. it is only available with the CVS-version and there should be a basic help-file somewhere (either in the examples/04.pix (i guess so) or in the reference- patches)
since processing is done inline, you will probably have to use an additional [pix_buf], to be able to process the same image differently...
mfg.a.srd IOhannes
Hi IOhannes,
Thankyou very much for your explanation on this topic :)
cheers /
martin
Zitiere lists@martinmalm.com:
Hi !
Is there some way to get a 'snapshot' from a videosource (pix_video or pix_film) without using pix_snap ? This does't seem to work with pix_buf since its "only effective if it is storing a static image".
the hint, that [pix_buf] is only effective with static images is a bit confusing. it means, that copying a whole image each frame from one position in memory to another is "ineffective". (therefore pix-operations are done in-place if possible) [pix_snap] does transfer the pixel-data from grafix-card to main-memory, which is even less effective - a) because you have to do the copying as in [pix_buf],
- b) (more important) because openGL is a client-server machine, that has
fast transfers client2server (eg. setting the state of the rendering engine) but quite slow transfers server2client (eg. obtaining the rendering-buffer) thus [pix_snap] is certainly not what you want.
[pix_buf] might be alright, but Ãt buffers all the new images that arrive, so you won't be able to get a still-image of a video. (as far as i remember)
the solution might be [pix_buffer]+[pix_buffer_read]+[pix_buffer_write] (ok, looks a bit clumsy -- shooting with canons at sparrows, as we say in austria) basically it works like [table]+[tabread]+[tabwrite]. it is only available with the CVS-version and there should be a basic help-file somewhere (either in the examples/04.pix (i guess so) or in the reference- patches)
since processing is done inline, you will probably have to use an additional [pix_buf], to be able to process the same image differently...
mfg.a.srd IOhannes