[vlc-devel] wirting a codec to vlc using ffmpeg library

Dafna Hirschfeld dafna3 at gmail.com
Fri Jul 14 19:16:02 CEST 2017

I am not a vlc developer and have no past experience with the source code.

I have a video decoder code that has a constructor and a function that
receive an encoded frame and returns a decoded frame of yuv 420p format. I
have a tester that runs my decoder on ubuntu and produces a raw video file
using the decoder.

I want to add my decoder as a vlc plugin. I looked at the code of
*modules/codec/avcodec/video.c* and  *modules/codec/avcodec/avcodec.c*
files in version 2.2.3.

I have few questions and really appreciate some help:

1. In my execution the *p_context->thread_count* is equal 4. I think for a
start to use only one thread in my decoder . I see also that locks are
acquired before some calls to av such as *avcodec_close*. I wanted to ask
if I also need to acquire locks in my codec even if it uses only one
thread. Maybe there are other vlc threads that might use the ffmpeg library?

2. I noticed that *video.c *and* libmpeg2.c* are  the only codecs that calls
* decoder_LinkPicture*, I could not understand what does this call do and
if I also have to call it ?

3. I see that the variable *p_sys->b_has_b_frames* is only set and not
used. Is there any reason for it?

Thanks a lot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170714/19efc496/attachment.html>

More information about the vlc-devel mailing list