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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGbJLXA9fEp2eRsU8RAlVTAKCmMzf9F/fAnPbMZ5dgTWVTg+MnvgCfXG6Q
XOfsoH0EHOziy0gCXT6KPPk=
=lcRK
-----END PGP SIGNATURE-----

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel

Reply via email to