Skip to content
Snippets Groups Projects
ffmpeg.c 107 KiB
Newer Older
  • Learn to ignore specific revisions
  • static void parse_cpuflags(int argc, char **argv, const OptionDef *options)
    {
        int idx = locate_option(argc, argv, options, "cpuflags");
        if (idx && argv[idx + 1])
            opt_cpuflags("cpuflags", argv[idx + 1]);
    }
    
    
    int main(int argc, char **argv)
    {
    
        OptionsContext o = { 0 };
    
        av_log_set_flags(AV_LOG_SKIP_REPEATED);
    
        parse_loglevel(argc, argv, options);
    
        if(argc>1 && !strcmp(argv[1], "-d")){
    
            av_log_set_callback(log_callback_null);
            argc--;
            argv++;
        }
    
    
    Luca Abeni's avatar
    Luca Abeni committed
        avcodec_register_all();
    
    Luca Abeni's avatar
    Luca Abeni committed
        avdevice_register_all();
    
    #endif
        avfilter_register_all();
    
        av_register_all();
    
        avformat_network_init();
    
        show_banner(argc, argv, options);
    
        parse_cpuflags(argc, argv, options);
    
    
        /* parse options */
    
        parse_options(&o, argc, argv, options, opt_output_file);
    
        if (nb_output_files <= 0 && nb_input_files == 0) {
    
            av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name);
    
            exit_program(1);
    
        /* file converter / grab */
        if (nb_output_files <= 0) {
    
            av_log(NULL, AV_LOG_FATAL, "At least one output file must be specified\n");
    
            exit_program(1);
    
        }
    
        if (nb_input_files == 0) {
    
            av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n");
    
            exit_program(1);
    
        current_time = ti = getutime();
    
            exit_program(1);
    
        ti = getutime() - ti;
        if (do_benchmark) {
    
            int maxrss = getmaxrss() / 1024;
            printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss);