1 /* 2 * ffmpegdrv.h - Movie driver using FFMPEG library and screenshot API. 3 * 4 * Written by 5 * Andreas Matthies <andreas.matthies@gmx.net> 6 * 7 * This file is part of VICE, the Versatile Commodore Emulator. 8 * See README for copyright notice. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 23 * 02111-1307 USA. 24 * 25 */ 26 27 #ifndef VICE_FFMPEGDRV_H 28 #define VICE_FFMPEGDRV_H 29 30 #include "screenshot.h" 31 #include "gfxoutput.h" 32 33 extern void gfxoutput_init_ffmpeg(int help); 34 35 /* deprecated access for UIs that do not use the gfxoutputdrv->formatlist yet: */ 36 extern gfxoutputdrv_format_t *ffmpegdrv_formatlist; 37 38 #ifdef STATIC_FFMPEG 39 #define VICE_P_AV_PACKET_RESCALE_TS av_packet_rescale_ts 40 #define VICE_P_AV_INTERLEAVED_WRITE_FRAME av_interleaved_write_frame 41 #define VICE_P_AVCODEC_CLOSE avcodec_close 42 #define VICE_P_AV_FRAME_FREE av_frame_free 43 #define VICE_P_AV_FRAME_ALLOC av_frame_alloc 44 #define VICE_P_AV_FRAME_GET_BUFFER av_frame_get_buffer 45 #define VICE_P_AV_DICT_SET av_dict_set 46 #define VICE_P_AVCODEC_OPEN2 avcodec_open2 47 #define VICE_P_AV_DICT_FREE av_dict_free 48 #define VICE_P_AVFORMAT_NEW_STREAM avformat_new_stream 49 #define VICE_P_AV_GET_CHANNEL_LAYOUT_NB_CHANNELS av_get_channel_layout_nb_channels 50 #define VICE_P_AV_OPT_SET_INT av_opt_set_int 51 #define VICE_P_AV_OPT_SET_SAMPLE_FMT av_opt_set_sample_fmt 52 #define VICE_P_AV_INIT_PACKET av_init_packet 53 #define VICE_P_AV_RESCALE_RND av_rescale_rnd 54 #define VICE_P_AV_FRAME_MAKE_WRITABLE av_frame_make_writable 55 #define VICE_P_AV_RESCALE_Q av_rescale_q 56 #define VICE_P_AV_D2Q av_d2q 57 #define VICE_P_AVCODEC_ENCODE_AUDIO2 avcodec_encode_audio2 58 #define VICE_P_SWS_FREECONTEXT sws_freeContext 59 #define VICE_P_SWS_GETCONTEXT sws_getContext 60 #define VICE_P_AV_DUMP_FORMAT av_dump_format 61 #define VICE_P_AVIO_OPEN avio_open 62 #define VICE_P_AVFORMAT_WRITE_HEADER avformat_write_header 63 #define VICE_P_AV_GUESS_FORMAT av_guess_format 64 #define VICE_P_AVCODEC_FIND_ENCODER avcodec_find_encoder 65 #define VICE_P_AVFORMAT_ALLOC_CONTEXT avformat_alloc_context 66 #define VICE_P_AV_WRITE_TRAILER av_write_trailer 67 #define VICE_P_AVIO_CLOSE avio_close 68 #define VICE_P_AV_FREE av_free 69 #define VICE_P_SWS_SCALE sws_scale 70 #define VICE_P_AVCODEC_ENCODE_VIDEO2 avcodec_encode_video2 71 #define VICE_P_AV_REGISTER_ALL av_register_all 72 #define VICE_P_SWR_FREE swr_free 73 #define VICE_P_SWR_ALLOC swr_alloc 74 #define VICE_P_SWR_INIT swr_init 75 #define VICE_P_SWR_GET_DELAY swr_get_delay 76 #define VICE_P_SWR_CONVERT swr_convert 77 #define VICE_P_AVRESAMPLE_ALLOC_CONTEXT avresample_alloc_context 78 #define VICE_P_AVRESAMPLE_OPEN avresample_alloc_open 79 #define VICE_P_AVRESAMPLE_CONVERT avresample_convert 80 #define VICE_P_AVRESAMPLE_FREE avresample_free 81 #define VICE_P_AVRESAMPLE_GET_DELAY avresample_get_delay 82 #else 83 #define VICE_P_AV_PACKET_RESCALE_TS (*ffmpeglib.p_av_packet_rescale_ts) 84 #define VICE_P_AV_INTERLEAVED_WRITE_FRAME (*ffmpeglib.p_av_interleaved_write_frame) 85 #define VICE_P_AVCODEC_CLOSE (*ffmpeglib.p_avcodec_close) 86 #define VICE_P_AV_FRAME_FREE (*ffmpeglib.p_av_frame_free) 87 #define VICE_P_AV_FRAME_ALLOC (*ffmpeglib.p_av_frame_alloc) 88 #define VICE_P_AV_FRAME_GET_BUFFER (*ffmpeglib.p_av_frame_get_buffer) 89 #define VICE_P_AV_DICT_SET (*ffmpeglib.p_av_dict_set) 90 #define VICE_P_AVCODEC_OPEN2 (*ffmpeglib.p_avcodec_open2) 91 #define VICE_P_AV_DICT_FREE (*ffmpeglib.p_av_dict_free) 92 #define VICE_P_AVFORMAT_NEW_STREAM (*ffmpeglib.p_avformat_new_stream) 93 #define VICE_P_AV_GET_CHANNEL_LAYOUT_NB_CHANNELS (*ffmpeglib.p_av_get_channel_layout_nb_channels) 94 #define VICE_P_AV_OPT_SET_INT (*ffmpeglib.p_av_opt_set_int) 95 #define VICE_P_AV_OPT_SET_SAMPLE_FMT (*ffmpeglib.p_av_opt_set_sample_fmt) 96 #define VICE_P_AV_INIT_PACKET (*ffmpeglib.p_av_init_packet) 97 #define VICE_P_AV_RESCALE_RND (*ffmpeglib.p_av_rescale_rnd) 98 #define VICE_P_AV_FRAME_MAKE_WRITABLE (*ffmpeglib.p_av_frame_make_writable) 99 #define VICE_P_AV_RESCALE_Q (*ffmpeglib.p_av_rescale_q) 100 #define VICE_P_AV_D2Q (*ffmpeglib.p_av_d2q) 101 #define VICE_P_AVCODEC_ENCODE_AUDIO2 (*ffmpeglib.p_avcodec_encode_audio2) 102 #define VICE_P_SWS_FREECONTEXT (*ffmpeglib.p_sws_freeContext) 103 #define VICE_P_SWS_GETCONTEXT (*ffmpeglib.p_sws_getContext) 104 #define VICE_P_AV_DUMP_FORMAT (*ffmpeglib.p_av_dump_format) 105 #define VICE_P_AVIO_OPEN (*ffmpeglib.p_avio_open) 106 #define VICE_P_AVFORMAT_WRITE_HEADER (*ffmpeglib.p_avformat_write_header) 107 #define VICE_P_AV_GUESS_FORMAT (*ffmpeglib.p_av_guess_format) 108 #define VICE_P_AVCODEC_FIND_ENCODER (*ffmpeglib.p_avcodec_find_encoder) 109 #define VICE_P_AVFORMAT_ALLOC_CONTEXT (*ffmpeglib.p_avformat_alloc_context) 110 #define VICE_P_AV_WRITE_TRAILER (*ffmpeglib.p_av_write_trailer) 111 #define VICE_P_AVIO_CLOSE (*ffmpeglib.p_avio_close) 112 #define VICE_P_AV_FREE (*ffmpeglib.p_av_free) 113 #define VICE_P_SWS_SCALE (*ffmpeglib.p_sws_scale) 114 #define VICE_P_AVCODEC_ENCODE_VIDEO2 (*ffmpeglib.p_avcodec_encode_video2) 115 #define VICE_P_AV_REGISTER_ALL (*ffmpeglib.p_av_register_all) 116 #define VICE_P_SWR_GET_DELAY (*ffmpeglib.p_swr_get_delay) 117 #define VICE_P_SWR_INIT (*ffmpeglib.p_swr_init) 118 #define VICE_P_SWR_FREE (*ffmpeglib.p_swr_free) 119 #define VICE_P_SWR_ALLOC (*ffmpeglib.p_swr_alloc) 120 #define VICE_P_SWR_CONVERT (*ffmpeglib.p_swr_convert) 121 #define VICE_P_AVRESAMPLE_ALLOC_CONTEXT (*ffmpeglib.p_avresample_alloc_context) 122 #define VICE_P_AVRESAMPLE_OPEN (*ffmpeglib.p_avresample_open) 123 #define VICE_P_AVRESAMPLE_CONVERT (*ffmpeglib.p_avresample_convert) 124 #define VICE_P_AVRESAMPLE_FREE (*ffmpeglib.p_avresample_free) 125 #define VICE_P_AVRESAMPLE_GET_DELAY (*ffmpeglib.p_avresample_get_delay) 126 #endif 127 128 #endif 129