[FFmpeg-user] Which function calls libvorbis.c::oggvorbis_encode_frame()?

Journeyer Jeonghum journeyerhum at gmail.com
Sun Feb 19 14:26:22 CET 2012


Hi,

I am now studying ffmpeg source code expecially about vorbis encoder part.

When I try a command below,

ffmpeg -i "winlogon.wav" -t 60 -ar 44100 -ab 128k -ac 2 -acodec
libvorbis winlogon.ogg

I can see that oggvorbis_encode_frame() in libvorbis.c is executed!

Now I want to know which function calls oggvorbis_encode_frame().

The C source code level analysis about this call link is somewhat
difficult for me. This is related function pointer and yasm I guess.

The structure below is the very end I can figure out...

AVCodec ff_libvorbis_encoder = {
        .name           = "libvorbis",
        .type           = AVMEDIA_TYPE_AUDIO,
        .id             = CODEC_ID_VORBIS,
        .priv_data_size = sizeof(OggVorbisContext),
        .init           = oggvorbis_encode_init,
        .encode         = oggvorbis_encode_frame,
        .close          = oggvorbis_encode_close,
        .capabilities   = CODEC_CAP_DELAY,
        .sample_fmts    = (const enum
AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
        .long_name      = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
        .priv_class     = &class,
};

"ff_libvorbis_encoder" is maybe used via some macro functions so that
I can't find places that uses it...


Have a good day all of you..

Best regards
-- 
----------------------------------------
Journeyer Jeonghum Joh
journeyerhum at gmail.com
----------------------------------------


More information about the ffmpeg-user mailing list