[gst-devel] how to process pngenc's snapshots

Thomas Vander Stichele thomas at urgent.rug.ac.be
Mon Jan 20 05:31:03 CET 2003

Hey gang,

I was going through apoc's code for pngenc from scratch and cleaned up 
small bits here and there.  I have two simple questions one of you will be 
able to answer.

a) What is the right way to handle the case where you want to "encode one 
frame into png and be done with it" ?
Currently, pngenc (on my disk) will open and close the png file for each 
_chain iteration, which doesn't really do well for the frames 
after the first one (the png grows, though it can still be read and shows 
the first encoded frame).

I seem to think that the correct way would be for pngenc to send a 
NEW_MEDIA event after each full frame, which makes the most sense to me.  
It is effectively as if you were loading a different file into the rest of 
the pipeline.

In that case, filesink probably catches this and would then open a new 
file with the next number.  (I've seen code for it in filesink but not 
tested it yet).  Is that the right way ?

If that is the right way, how does the app "catch" this NEW_MEDIA event, 
so that it realizes that the pipeline can be turned off ?

Alternatively, we can do it like snapshot did; ie generate a g_signal to 
which the app can connect when pngenc has encoded a full frame.

Which is the best option ? This is a feature I want in for 0.6.0 since 
it's pretty critical to nautilus-media.



The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*- thomas (dot) apestaart (dot) org -*->
Surprise sometimes
will come around
I will surprise you sometime
I'll come around
<-*- thomas  (at) apestaart (dot) org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/

More information about the gstreamer-devel mailing list