static int load_avutil(ffmpeglib_t *lib) { if (!avutil_so) { avutil_so = vice_dynlib_open(AVUTIL_SO_NAME); if (!avutil_so) { log_debug("opening dynamic library " AVUTIL_SO_NAME " failed! error: %s", vice_dynlib_error()); return -1; } GET_SYMBOL_AND_TEST_AVUTIL(av_free); GET_SYMBOL_AND_TEST_AVUTIL(av_frame_alloc); GET_SYMBOL_AND_TEST_AVUTIL(av_frame_get_buffer); GET_SYMBOL_AND_TEST_AVUTIL(av_compare_ts); GET_SYMBOL_AND_TEST_AVUTIL(av_get_channel_layout_nb_channels); GET_SYMBOL_AND_TEST_AVUTIL(av_opt_set_int); #ifndef HAVE_FFMPEG_AVRESAMPLE GET_SYMBOL_AND_TEST_AVUTIL(av_opt_set_sample_fmt); #endif GET_SYMBOL_AND_TEST_AVUTIL(av_rescale_rnd); GET_SYMBOL_AND_TEST_AVUTIL(av_rescale_q); GET_SYMBOL_AND_TEST_AVUTIL(av_d2q); GET_SYMBOL_AND_TEST_AVUTIL(av_frame_make_writable); GET_SYMBOL_AND_TEST_AVUTIL(av_frame_free); GET_SYMBOL_AND_TEST_AVUTIL(av_dict_set); GET_SYMBOL_AND_TEST_AVUTIL(av_dict_free); } #ifdef NO_AVUTIL_CHECK return 0; #else return check_version("avutil", avutil_so, "avutil_version", LIBAVUTIL_VERSION_INT); #endif }
static int load_avformat(ffmpeglib_t *lib) { if (!avformat_so) { avformat_so = vice_dynlib_open(AVFORMAT_SO_NAME); if (!avformat_so) { log_debug("opening dynamic library " AVFORMAT_SO_NAME " failed! error: %s", vice_dynlib_error()); return -1; } GET_SYMBOL_AND_TEST_AVFORMAT(av_register_all); GET_SYMBOL_AND_TEST_AVFORMAT(avformat_alloc_context); GET_SYMBOL_AND_TEST_AVFORMAT(avformat_new_stream); GET_SYMBOL_AND_TEST_AVFORMAT(avformat_write_header); GET_SYMBOL_AND_TEST_AVFORMAT(av_interleaved_write_frame); GET_SYMBOL_AND_TEST_AVFORMAT(av_write_trailer); GET_SYMBOL_AND_TEST_AVFORMAT(avio_open); GET_SYMBOL_AND_TEST_AVFORMAT(avio_close); GET_SYMBOL_AND_TEST_AVFORMAT(av_dump_format); GET_SYMBOL_AND_TEST_AVFORMAT(av_guess_format); } #ifdef NO_AVFORMAT_CHECK return 0; #else return check_version("avformat", avformat_so, "avformat_version", LIBAVFORMAT_VERSION_INT); #endif }
static int load_avformat(ffmpeglib_t *lib) { if (!avformat_so) { avformat_so = vice_dynlib_open(AVFORMAT_SO_NAME); if (!avformat_so) { log_debug("opening dynamic library " AVFORMAT_SO_NAME " failed!"); return -1; } GET_SYMBOL_AND_TEST_AVFORMAT(av_init_packet); GET_SYMBOL_AND_TEST_AVFORMAT(av_register_all); GET_SYMBOL_AND_TEST_AVFORMAT(av_new_stream); GET_SYMBOL_AND_TEST_AVFORMAT(av_set_parameters); GET_SYMBOL_AND_TEST_AVFORMAT(av_write_header); GET_SYMBOL_AND_TEST_AVFORMAT(av_write_frame); GET_SYMBOL_AND_TEST_AVFORMAT(av_write_trailer); GET_SYMBOL_AND_TEST_AVFORMAT(url_fopen); GET_SYMBOL_AND_TEST_AVFORMAT(url_fclose); GET_SYMBOL_AND_TEST_AVFORMAT(dump_format); GET_SYMBOL_AND_TEST_AVFORMAT(av_guess_format); #ifndef HAVE_FFMPEG_SWSCALE GET_SYMBOL_AND_TEST_AVFORMAT(img_convert); #endif } #ifdef NO_AVFORMAT_CHECK return 0; #else return check_version("avformat",avformat_so,"avformat_version",LIBAVFORMAT_VERSION_INT); #endif }
static int load_swscale(ffmpeglib_t *lib) { if (!swscale_so) { swscale_so = vice_dynlib_open(SWSCALE_SO_NAME); if (!swscale_so) { log_debug("opening dynamic library " SWSCALE_SO_NAME " failed! error: %s", vice_dynlib_error()); return -1; } GET_SYMBOL_AND_TEST_SWSCALE(sws_getContext); GET_SYMBOL_AND_TEST_SWSCALE(sws_freeContext); GET_SYMBOL_AND_TEST_SWSCALE(sws_scale); } return check_version("swscale", swscale_so, "swscale_version", LIBSWSCALE_VERSION_INT); }
static int load_avresample(ffmpeglib_t *lib) { if (!avresample_so) { avresample_so = vice_dynlib_open(AVRESAMPLE_SO_NAME); if (!avresample_so) { log_debug("opening dynamic library " AVRESAMPLE_SO_NAME " failed! error: %s", vice_dynlib_error()); return -1; } GET_SYMBOL_AND_TEST_AVRESAMPLE(avresample_alloc_context); GET_SYMBOL_AND_TEST_AVRESAMPLE(avresample_open); GET_SYMBOL_AND_TEST_AVRESAMPLE(avresample_convert); GET_SYMBOL_AND_TEST_AVRESAMPLE(avresample_get_delay); GET_SYMBOL_AND_TEST_AVRESAMPLE(avresample_free); } return check_version("avresample", avresample_so, "avresample_version", LIBAVRESAMPLE_VERSION_INT); }
static int load_swresample(ffmpeglib_t *lib) { if (!swresample_so) { swresample_so = vice_dynlib_open(SWRESAMPLE_SO_NAME); if (!swresample_so) { log_debug("opening dynamic library " SWRESAMPLE_SO_NAME " failed! error: %s", vice_dynlib_error()); return -1; } GET_SYMBOL_AND_TEST_SWRESAMPLE(swr_alloc); GET_SYMBOL_AND_TEST_SWRESAMPLE(swr_init); GET_SYMBOL_AND_TEST_SWRESAMPLE(swr_convert); GET_SYMBOL_AND_TEST_SWRESAMPLE(swr_get_delay); GET_SYMBOL_AND_TEST_SWRESAMPLE(swr_free); } return check_version("swresample", swresample_so, "swresample_version", LIBSWRESAMPLE_VERSION_INT); }
static int load_avutil(ffmpeglib_t *lib) { if (!avutil_so) { avutil_so = vice_dynlib_open(AVUTIL_SO_NAME); if (!avutil_so) { log_debug("opening dynamic library " AVUTIL_SO_NAME " failed!"); return -1; } GET_SYMBOL_AND_TEST_AVUTIL(av_free); } #ifdef NO_AVUTIL_CHECK return 0; #else return check_version("avutil",avutil_so,"avutil_version",LIBAVUTIL_VERSION_INT); #endif }
static int load_avcodec(ffmpeglib_t *lib) { if (!avcodec_so) { avcodec_so = vice_dynlib_open(AVCODEC_SO_NAME); if (!avcodec_so) { log_debug("opening dynamic library " AVCODEC_SO_NAME " failed!"); return -1; } GET_SYMBOL_AND_TEST_AVCODEC(avcodec_open); GET_SYMBOL_AND_TEST_AVCODEC(avcodec_close); GET_SYMBOL_AND_TEST_AVCODEC(avcodec_find_encoder); GET_SYMBOL_AND_TEST_AVCODEC(avcodec_encode_audio); GET_SYMBOL_AND_TEST_AVCODEC(avcodec_encode_video); GET_SYMBOL_AND_TEST_AVCODEC(avpicture_fill); GET_SYMBOL_AND_TEST_AVCODEC(avpicture_get_size); } return check_version("avcodec",avcodec_so,"avcodec_version",LIBAVCODEC_VERSION_INT); }
static int load_lib(void) { if (!lib_so) { lib_so = vice_dynlib_open(SO_NAME); if (!lib_so) { log_debug("opening dynamic library " SO_NAME " failed!"); return -1; } GET_SYMBOL_AND_TEST(lame_init); GET_SYMBOL_AND_TEST(lame_close); GET_SYMBOL_AND_TEST(lame_set_num_channels); GET_SYMBOL_AND_TEST(lame_set_in_samplerate); GET_SYMBOL_AND_TEST(lame_set_quality); GET_SYMBOL_AND_TEST(lame_set_brate); GET_SYMBOL_AND_TEST(lame_init_params); GET_SYMBOL_AND_TEST(lame_encode_buffer_interleaved); GET_SYMBOL_AND_TEST(lame_encode_flush); } return 0; }