[vlc-devel] [PATCH] transcode: Fix multithreaded encoding

Steinar H. Gunderson sgunderson at bigfoot.com
Tue Nov 9 10:55:27 CET 2010


On Mon, Nov 08, 2010 at 03:59:44PM +0100, Rafaël Carré wrote:
>      id->p_encoder->i_threads = p_sys->i_threads;
> +    /* We pass down the number of desired threads to the encoder (avcodec/x264)
> +     * But why would we want to run encoder asynchronously to the decoder ?? */
> +    p_sys->i_threads = 0;
>      id->p_encoder->p_cfg = p_sys->p_video_cfg;

IIRC there's magic deep down here; the question is whether you'd want to run
the _video_ encoder asynchronously to the _audio_ encoder, and due to some
lock (perhaps on one of the FIFOs, I can't recall) this isn't possible with
threads=0.

Now, in my case I needed low-latency anyway and threads > 0 sticks the video
frames in a ring buffer which automatically adds a frame of latency, so it
was out of the question, but...

/* Steinar */
-- 
Homepage: http://www.sesse.net/



More information about the vlc-devel mailing list