[FFmpeg-user] Where are the definitions of choose_sample_fmts, choose_sample_rates, choose_channel_layouts?

JIA Pei jp4work at gmail.com
Wed Aug 8 23:32:52 CEST 2012


Hi, Thanks Carl Eugen Hoyos:


I just downloaded ffmpeg source code from http://ffmpeg.org/download.html ,
by using git:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

Well, I can't see anything related to
choose_sample_fmts()
choose_sample_rates()
choose_channel_layouts()


Lines from 660 to 709 are:

/* end of sub2video hack */
> static void reset_options(OptionsContext *o, int is_input)
> {
>     const OptionDef *po = options;
>     OptionsContext bak= *o;
>     int i;
>     /* all OPT_SPEC and OPT_STRING can be freed in generic way */
>     while (po->name) {
>         void *dst = (uint8_t*)o + po->u.off;
>         if (po->flags & OPT_SPEC) {
>             SpecifierOpt **so = dst;
>             int i, *count = (int*)(so + 1);
>             for (i = 0; i < *count; i++) {
>                 av_freep(&(*so)[i].specifier);
>                 if (po->flags & OPT_STRING)
>                     av_freep(&(*so)[i].u.str);
>             }
>             av_freep(so);
>             *count = 0;
>         } else if (po->flags & OPT_OFFSET && po->flags & OPT_STRING)
>             av_freep(dst);
>         po++;
>     }
>     for (i = 0; i < o->nb_stream_maps; i++)
>         av_freep(&o->stream_maps[i].linklabel);
>     av_freep(&o->stream_maps);
>     av_freep(&o->audio_channel_maps);
>     av_freep(&o->streamid_map);
>     memset(o, 0, sizeof(*o));
>     if (is_input) {
>         o->recording_time = bak.recording_time;
>         if (o->recording_time != INT64_MAX)
>             av_log(NULL, AV_LOG_WARNING,
>                    "-t is not an input option, keeping it for the next
> output;"
>                    " consider fixing your command line.\n");
>     } else
>         o->recording_time = INT64_MAX;
>     o->mux_max_delay  = 0.7;
>     o->limit_filesize = UINT64_MAX;
>     o->chapters_input_file = INT_MAX;
>     uninit_opts();
>     init_opts();
> }



I also checked libav from http://libav.org/download.html , there is no
definition of these 3 functions as well. So, since there are only tens of
lines of these functions in your download, can you please just attached
your definitions of these 3 functions from line 666 to after 680 ???



Thank you very much...


Best Regards
Pei








On Sun, Jul 15, 2012 at 10:51 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> JIA Pei <jp4work <at> gmail.com> writes:
>
> > choose_sample_fmts()
>
> ffmpeg.c: line 666
>
> > choose_sample_rates()
>
> ffmpeg.c: line 673
>
> > choose_channel_layouts()
>
> ffmpeg.c: line 680
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 

Pei JIA

Email: jp4work at gmail.com
cell:    +1 604-362-5816

Welcome to Vision Open
http://www.visionopen.com


More information about the ffmpeg-user mailing list