<div dir="ltr">I guess gif.c functionality is exposed as a 'muxer' with the following standard interface that all muxers have in ffmpeg:<div><br></div><div><div>static const AVClass gif_muxer_class = {</div><div>    .class_name = "GIF muxer",</div><div>    .item_name  = av_default_item_name,</div><div>    .version    = LIBAVUTIL_VERSION_INT,</div><div>    .option     = options,</div><div>};</div><div><br></div><div>AVOutputFormat ff_gif_muxer = {</div><div>    .name           = "gif",</div><div>    .long_name      = NULL_IF_CONFIG_SMALL("GIF Animation"),</div><div>    .mime_type      = "image/gif",</div><div>    .extensions     = "gif",</div><div>    .priv_data_size = sizeof(GIFContext),</div><div>    .audio_codec    = AV_CODEC_ID_NONE,</div><div>    .video_codec    = AV_CODEC_ID_GIF,</div><div>    .write_header   = gif_write_header,</div><div>    .write_packet   = gif_write_packet,</div><div>    .write_trailer  = gif_write_trailer,</div><div>    .priv_class     = &gif_muxer_class,</div><div>    .flags          = AVFMT_VARIABLE_FPS,</div><div>};</div></div><div><br></div><div>You need to find out how to use a muxer in your program. Challenge is that ffmpeg samples are few, very high level and work at a file level. I wished there was a sample program to just demonstrate how to use a muxer or demuxer etc.</div><div><br></div><div>I needed a different muxer for my program but I couldn't find an example to follow. I ended up surgically adding code snippets into my program.</div><div><br></div><div>Thanks,</div><div>Malik</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 14, 2017 at 1:08 PM, Gustav González <span dir="ltr"><<a href="mailto:xtingray@gmail.com" target="_blank">xtingray@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I wonder if using Libav as dependency allows me to call the functions defined in the file libavformat/gif.c<br><br></div>Functions like these:<br><div><br>static int gif_image_write_header(<wbr>AVIOContext *pb, int width, int height,<br>                              <wbr>    int loop_count, uint32_t *palette)<br><br>static int gif_write_packet(<wbr>AVFormatContext *s, AVPacket *pkt)<br><br>static int gif_write_trailer(<wbr>AVFormatContext *s)<br><br></div><div>As the avconv binary allows me to create animated GIF examples from sequences of PNG files, I guess it is accessing the GIF API, but I was unable to trace all the route to find the top level functions I could use to create animated GIFs from my own code.<br><br></div><div>Any sugestion? Any handy example to watch? I am still studying avconv.c but it's a little complex to follow.<br><br></div><div>Thanks.<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br><div><div>-- <br><div class="m_-9090740200748007282gmail-m_3414871734519471972gmail_signature">============================<br>  Gustav Gonzalez<br>  <a href="mailto:xtingray@gmail.com" target="_blank">xtingray@gmail.com</a><br>============================</div>
</div></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div>