Re: RFC: [PATCH] camera: encode in a seperate thread



On Tue, Aug 24, 2010 at 3:31 AM, Brandon Philips <brandon ifup org> wrote:
> What do you think of this patch? There are probably bugs since I am not
> extremely familiar with gtk or gstreamer.
>
> On slow machines it is often not possible to record and encode in real
> time particularly at high framerates.
>
> So, instead record to the disk with no compression and then after
> recoding has stopped start encoding to vorbis/theora and remove the
> temporary uncompressed version.

Don't have the time to do a proper review right now but I believe this
could be the definitive solution to this annoying bug.
It poses some new issue though and it's a lot harder to get right:
- keeping track of current encoding jobs
- what to do if cheese exits while recording
- disk usage monitoring: with some rough estimate I'd say 30 seconds
of raw rgb data is around 500 GB, if the user records several
subsequent videos and encoding is slow you could very much fill the
whole disk, especially if almost full.

I'd also like to see this implemented as some sort of disk queue, so
that you can start encoding (maybe with some low priority so it
doesn't block everything else) immediately instead of waiting for the
whole raw file to be written to disk.

The underrun patch instead is a fine workaround that can be applied
easily and soon with current code base and allows us to not fail badly
as we do now.

I'll try to review everything as soon as I can.

Regards,

Filippo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]