| 4730 | } |
| 4731 | |
| 4732 | int exec(int argc, char **argv) |
| 4733 | { |
| 4734 | int i, ret; |
| 4735 | int64_t ti; |
| 4736 | |
| 4737 | init_dynload(); |
| 4738 | |
| 4739 | register_exit(ffmpeg_cleanup); |
| 4740 | |
| 4741 | setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */ |
| 4742 | |
| 4743 | av_log_set_flags(AV_LOG_SKIP_REPEATED); |
| 4744 | parse_loglevel(argc, argv, options); |
| 4745 | |
| 4746 | if(argc>1 && !strcmp(argv[1], "-d")){ |
| 4747 | run_as_daemon=1; |
| 4748 | av_log_set_callback(log_callback_null); |
| 4749 | argc--; |
| 4750 | argv++; |
| 4751 | } |
| 4752 | |
| 4753 | avcodec_register_all(); |
| 4754 | #if CONFIG_AVDEVICE |
| 4755 | avdevice_register_all(); |
| 4756 | #endif |
| 4757 | avfilter_register_all(); |
| 4758 | av_register_all(); |
| 4759 | avformat_network_init(); |
| 4760 | |
| 4761 | show_banner(argc, argv, options); |
| 4762 | |
| 4763 | /* parse options and open all input/output files */ |
| 4764 | ret = ffmpeg_parse_options(argc, argv); |
| 4765 | if (ret < 0) |
| 4766 | exit_program(1); |
| 4767 | |
| 4768 | if (nb_output_files <= 0 && nb_input_files == 0) { |
| 4769 | show_usage(); |
| 4770 | av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name); |
| 4771 | exit_program(1); |
| 4772 | } |
| 4773 | |
| 4774 | /* file converter / grab */ |
| 4775 | if (nb_output_files <= 0) { |
| 4776 | av_log(NULL, AV_LOG_FATAL, "At least one output file must be specified\n"); |
| 4777 | exit_program(1); |
| 4778 | } |
| 4779 | |
| 4780 | // if (nb_input_files == 0) { |
| 4781 | // av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n"); |
| 4782 | // exit_program(1); |
| 4783 | // } |
| 4784 | |
| 4785 | for (i = 0; i < nb_output_files; i++) { |
| 4786 | if (strcmp(output_files[i]->ctx->oformat->name, "rtp")) |
| 4787 | want_sdp = 0; |
| 4788 | } |
| 4789 |
no test coverage detected