GStreamer issues

Noah Kantrowitz kantrn at rpi.edu
Sun Jun 10 22:51:08 EDT 2007


Dan Williams wrote:
> On Sun, 2007-06-10 at 04:24 -0400, Noah Kantrowitz wrote:
>   
>> So I am working with the camera, trying to get it to dump to a PNG (or
>> anything else for that matter). My current problem is that I can't
>> reliably determine when it has finished the capture and has written to a
>> file. My gst pipeline is 'v4l2src ! ffmpegcolorspace ! pngenc ! filesink
>> location="/tmp/snap.png"'. I would think that MESSAGE_EOS would mean it
>> is done, but dumping the filesize at that point shows it is still 0
>> bytes. Anyone have any ideas (other than shell out to gst-launch for
>> every capture)?
>>     
>
> Take a look at the "Camera" activity included on the machines.  It has
> the ability to take snapshots.
>
>   

https://coderanger.net/browser/projects/olpc/games/olpcgames/camera.py#L26
is where I am right now. I would have though a bus.poll(gst.MESSAGE_EOS)
would have been enough, but it wasn't. I need to know when it is done
writing the file so I can read it back in. Currently I haven't found The
Right Way to reliably find that, other than something like
time.sleep(30), which seems like a poor way to do it.

--Noah


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: signature.asc
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070610/49fefdd9/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070610/49fefdd9/attachment.sig>


More information about the Devel mailing list