This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit).
Unified · Split
| @@ -19,6 +19,8 @@ vpath %/fate_config.sh.template $(SRC_PATH) · 18 unmodified lines | |||
| 19 | TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch | 19 | TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch |
| 20 | HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options | 20 | HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options |
| 21 | 21 | ||
| 22 | ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample | ||
| 23 | |||
| 22 | # $(FFLIBS-yes) needs to be in linking order | 24 | # $(FFLIBS-yes) needs to be in linking order |
| 23 | FFLIBS-$(CONFIG_AVDEVICE) += avdevice | 25 | FFLIBS-$(CONFIG_AVDEVICE) += avdevice |
| 24 | FFLIBS-$(CONFIG_AVFILTER) += avfilter | 26 | FFLIBS-$(CONFIG_AVFILTER) += avfilter |
| @@ -113,7 +115,7 @@ include $(SRC_PATH)/fftools/Makefile · 88 unmodified lines | |||
| 113 | include $(SRC_PATH)/doc/Makefile | 115 | include $(SRC_PATH)/doc/Makefile |
| 114 | include $(SRC_PATH)/doc/examples/Makefile | 116 | include $(SRC_PATH)/doc/examples/Makefile |
| 115 | 117 | ||
| 116 | libavcodec/avcodec.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h | 118 | $(ALLFFLIBS:%=lib%/version.o): libavutil/ffversion.h |
| 117 | 119 | ||
| 118 | $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF) | 120 | $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF) |
| 119 | ifeq ($(STRIPTYPE),direct) | 121 | ifeq ($(STRIPTYPE),direct) |
| @@ -29,8 +29,6 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) · 28 unmodified lines | |||
| 29 | $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) | 29 | $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) |
| 30 | endif | 30 | endif |
| 31 | 31 | ||
| 32 | ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample | ||
| 33 | |||
| 34 | # NASM requires -I path terminated with / | 32 | # NASM requires -I path terminated with / |
| 35 | IFLAGS := -I. -I$(SRC_LINK)/ | 33 | IFLAGS := -I. -I$(SRC_LINK)/ |
| 36 | CPPFLAGS := $(IFLAGS) $(CPPFLAGS) | 34 | CPPFLAGS := $(IFLAGS) $(CPPFLAGS) |
| @@ -56,6 +56,7 @@ OBJS = ac3_parser.o \ · 55 unmodified lines | |||
| 56 | qsv_api.o \ | 56 | qsv_api.o \ |
| 57 | raw.o \ | 57 | raw.o \ |
| 58 | utils.o \ | 58 | utils.o \ |
| 59 | version.o \ | ||
| 59 | vlc.o \ | 60 | vlc.o \ |
| 60 | vorbis_parser.o \ | 61 | vorbis_parser.o \ |
| 61 | xiph.o \ | 62 | xiph.o \ |
| @@ -40,31 +40,6 @@ · 39 unmodified lines | |||
| 40 | #include "frame_thread_encoder.h" | 40 | #include "frame_thread_encoder.h" |
| 41 | #include "internal.h" | 41 | #include "internal.h" |
| 42 | #include "thread.h" | 42 | #include "thread.h" |
| 43 | #include "version.h" | ||
| 44 | |||
| 45 | #include "libavutil/ffversion.h" | ||
| 46 | const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 47 | |||
| 48 | unsigned avcodec_version(void) | ||
| 49 | { | ||
| 50 | av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563); | ||
| 51 | av_assert0(AV_CODEC_ID_ADPCM_G722==69660); | ||
| 52 | av_assert0(AV_CODEC_ID_SRT==94216); | ||
| 53 | av_assert0(LIBAVCODEC_VERSION_MICRO >= 100); | ||
| 54 | |||
| 55 | return LIBAVCODEC_VERSION_INT; | ||
| 56 | } | ||
| 57 | |||
| 58 | const char *avcodec_configuration(void) | ||
| 59 | { | ||
| 60 | return FFMPEG_CONFIGURATION; | ||
| 61 | } | ||
| 62 | |||
| 63 | const char *avcodec_license(void) | ||
| 64 | { | ||
| 65 | #define LICENSE_PREFIX "libavcodec license: " | ||
| 66 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 67 | } | ||
| 68 | 43 | ||
| 69 | int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) | 44 | int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) |
| 70 | { | 45 | { |
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | |||
| 23 | #include "libavutil/avassert.h" | ||
| 24 | #include "avcodec.h" | ||
| 25 | #include "codec_id.h" | ||
| 26 | #include "version.h" | ||
| 27 | |||
| 28 | #include "libavutil/ffversion.h" | ||
| 29 | const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 30 | |||
| 31 | unsigned avcodec_version(void) | ||
| 32 | { | ||
| 33 | av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563); | ||
| 34 | av_assert0(AV_CODEC_ID_ADPCM_G722==69660); | ||
| 35 | av_assert0(AV_CODEC_ID_SRT==94216); | ||
| 36 | av_assert0(LIBAVCODEC_VERSION_MICRO >= 100); | ||
| 37 | |||
| 38 | return LIBAVCODEC_VERSION_INT; | ||
| 39 | } | ||
| 40 | |||
| 41 | const char *avcodec_configuration(void) | ||
| 42 | { | ||
| 43 | return FFMPEG_CONFIGURATION; | ||
| 44 | } | ||
| 45 | |||
| 46 | const char *avcodec_license(void) | ||
| 47 | { | ||
| 48 | #define LICENSE_PREFIX "libavcodec license: " | ||
| 49 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 50 | } | ||
| @@ -8,6 +8,7 @@ HEADERS = avdevice.h \ · 7 unmodified lines | |||
| 8 | OBJS = alldevices.o \ | 8 | OBJS = alldevices.o \ |
| 9 | avdevice.o \ | 9 | avdevice.o \ |
| 10 | utils.o \ | 10 | utils.o \ |
| 11 | version.o \ | ||
| 11 | 12 | ||
| 12 | OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o | 13 | OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o |
| 13 | 14 | ||
| @@ -17,15 +17,8 @@ · 16 unmodified lines | |||
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include "libavutil/avassert.h" | 19 | #include "libavutil/avassert.h" |
| 20 | #include "libavutil/samplefmt.h" | ||
| 21 | #include "libavutil/pixfmt.h" | ||
| 22 | #include "avdevice.h" | 20 | #include "avdevice.h" |
| 23 | #include "internal.h" | 21 | #include "internal.h" |
| 24 | #include "config.h" | ||
| 25 | #include "version.h" | ||
| 26 | |||
| 27 | #include "libavutil/ffversion.h" | ||
| 28 | const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 29 | 22 | ||
| 30 | #if FF_API_DEVICE_CAPABILITIES | 23 | #if FF_API_DEVICE_CAPABILITIES |
| 31 | const AVOption av_device_capabilities[] = { | 24 | const AVOption av_device_capabilities[] = { |
| @@ -33,23 +26,6 @@ const AVOption av_device_capabilities[] = { · 1 unmodified line | |||
| 33 | }; | 26 | }; |
| 34 | #endif | 27 | #endif |
| 35 | 28 | ||
| 36 | unsigned avdevice_version(void) | ||
| 37 | { | ||
| 38 | av_assert0(LIBAVDEVICE_VERSION_MICRO >= 100); | ||
| 39 | return LIBAVDEVICE_VERSION_INT; | ||
| 40 | } | ||
| 41 | |||
| 42 | const char * avdevice_configuration(void) | ||
| 43 | { | ||
| 44 | return FFMPEG_CONFIGURATION; | ||
| 45 | } | ||
| 46 | |||
| 47 | const char * avdevice_license(void) | ||
| 48 | { | ||
| 49 | #define LICENSE_PREFIX "libavdevice license: " | ||
| 50 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 51 | } | ||
| 52 | |||
| 53 | int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type, | 29 | int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type, |
| 54 | void *data, size_t data_size) | 30 | void *data, size_t data_size) |
| 55 | { | 31 | { |
| @@ -0,0 +1,45 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | |||
| 23 | #include "libavutil/avassert.h" | ||
| 24 | #include "avdevice.h" | ||
| 25 | #include "version.h" | ||
| 26 | |||
| 27 | #include "libavutil/ffversion.h" | ||
| 28 | const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 29 | |||
| 30 | unsigned avdevice_version(void) | ||
| 31 | { | ||
| 32 | av_assert0(LIBAVDEVICE_VERSION_MICRO >= 100); | ||
| 33 | return LIBAVDEVICE_VERSION_INT; | ||
| 34 | } | ||
| 35 | |||
| 36 | const char * avdevice_configuration(void) | ||
| 37 | { | ||
| 38 | return FFMPEG_CONFIGURATION; | ||
| 39 | } | ||
| 40 | |||
| 41 | const char * avdevice_license(void) | ||
| 42 | { | ||
| 43 | #define LICENSE_PREFIX "libavdevice license: " | ||
| 44 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 45 | } | ||
| @@ -20,6 +20,7 @@ OBJS = allfilters.o \ · 19 unmodified lines | |||
| 20 | framequeue.o \ | 20 | framequeue.o \ |
| 21 | graphdump.o \ | 21 | graphdump.o \ |
| 22 | graphparser.o \ | 22 | graphparser.o \ |
| 23 | version.o \ | ||
| 23 | video.o \ | 24 | video.o \ |
| 24 | 25 | ||
| 25 | OBJS-$(HAVE_THREADS) += pthread.o | 26 | OBJS-$(HAVE_THREADS) += pthread.o |
| @@ -29,10 +29,8 @@ · 28 unmodified lines | |||
| 29 | #include "libavutil/hwcontext.h" | 29 | #include "libavutil/hwcontext.h" |
| 30 | #include "libavutil/internal.h" | 30 | #include "libavutil/internal.h" |
| 31 | #include "libavutil/opt.h" | 31 | #include "libavutil/opt.h" |
| 32 | #include "libavutil/pixdesc.h" | ||
| 33 | #include "libavutil/rational.h" | 32 | #include "libavutil/rational.h" |
| 34 | #include "libavutil/samplefmt.h" | 33 | #include "libavutil/samplefmt.h" |
| 35 | #include "libavutil/thread.h" | ||
| 36 | 34 | ||
| 37 | #define FF_INTERNAL_FIELDS 1 | 35 | #define FF_INTERNAL_FIELDS 1 |
| 38 | #include "framequeue.h" | 36 | #include "framequeue.h" |
| @@ -43,10 +41,6 @@ · 4 unmodified lines | |||
| 43 | #include "formats.h" | 41 | #include "formats.h" |
| 44 | #include "framepool.h" | 42 | #include "framepool.h" |
| 45 | #include "internal.h" | 43 | #include "internal.h" |
| 46 | #include "version.h" | ||
| 47 | |||
| 48 | #include "libavutil/ffversion.h" | ||
| 49 | const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 50 | 44 | ||
| 51 | static void tlog_ref(void *ctx, AVFrame *ref, int end) | 45 | static void tlog_ref(void *ctx, AVFrame *ref, int end) |
| 52 | { | 46 | { |
| @@ -75,23 +69,6 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end) · 22 unmodified lines | |||
| 75 | ff_tlog(ctx, "]%s", end ? "\n" : ""); | 69 | ff_tlog(ctx, "]%s", end ? "\n" : ""); |
| 76 | } | 70 | } |
| 77 | 71 | ||
| 78 | unsigned avfilter_version(void) | ||
| 79 | { | ||
| 80 | av_assert0(LIBAVFILTER_VERSION_MICRO >= 100); | ||
| 81 | return LIBAVFILTER_VERSION_INT; | ||
| 82 | } | ||
| 83 | |||
| 84 | const char *avfilter_configuration(void) | ||
| 85 | { | ||
| 86 | return FFMPEG_CONFIGURATION; | ||
| 87 | } | ||
| 88 | |||
| 89 | const char *avfilter_license(void) | ||
| 90 | { | ||
| 91 | #define LICENSE_PREFIX "libavfilter license: " | ||
| 92 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 93 | } | ||
| 94 | |||
| 95 | void ff_command_queue_pop(AVFilterContext *filter) | 72 | void ff_command_queue_pop(AVFilterContext *filter) |
| 96 | { | 73 | { |
| 97 | AVFilterCommand *c= filter->command_queue; | 74 | AVFilterCommand *c= filter->command_queue; |
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | #include "libavutil/avassert.h" | ||
| 23 | #include "avfilter.h" | ||
| 24 | #include "version.h" | ||
| 25 | |||
| 26 | #include "libavutil/ffversion.h" | ||
| 27 | const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 28 | |||
| 29 | unsigned avfilter_version(void) | ||
| 30 | { | ||
| 31 | av_assert0(LIBAVFILTER_VERSION_MICRO >= 100); | ||
| 32 | return LIBAVFILTER_VERSION_INT; | ||
| 33 | } | ||
| 34 | |||
| 35 | const char *avfilter_configuration(void) | ||
| 36 | { | ||
| 37 | return FFMPEG_CONFIGURATION; | ||
| 38 | } | ||
| 39 | |||
| 40 | const char *avfilter_license(void) | ||
| 41 | { | ||
| 42 | #define LICENSE_PREFIX "libavfilter license: " | ||
| 43 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 44 | } | ||
| @@ -25,6 +25,7 @@ OBJS = allformats.o \ · 24 unmodified lines | |||
| 25 | seek.o \ | 25 | seek.o \ |
| 26 | url.o \ | 26 | url.o \ |
| 27 | utils.o \ | 27 | utils.o \ |
| 28 | version.o \ | ||
| 28 | 29 | ||
| 29 | OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o | 30 | OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o |
| 30 | 31 | ||
| @@ -46,10 +46,6 @@ · 45 unmodified lines | |||
| 46 | #if CONFIG_NETWORK | 46 | #if CONFIG_NETWORK |
| 47 | #include "network.h" | 47 | #include "network.h" |
| 48 | #endif | 48 | #endif |
| 49 | #include "version.h" | ||
| 50 | |||
| 51 | #include "libavutil/ffversion.h" | ||
| 52 | const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 53 | 49 | ||
| 54 | static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER; | 50 | static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER; |
| 55 | 51 | ||
| @@ -58,23 +54,6 @@ static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER; · 2 unmodified lines | |||
| 58 | * various utility functions for use within FFmpeg | 54 | * various utility functions for use within FFmpeg |
| 59 | */ | 55 | */ |
| 60 | 56 | ||
| 61 | unsigned avformat_version(void) | ||
| 62 | { | ||
| 63 | av_assert0(LIBAVFORMAT_VERSION_MICRO >= 100); | ||
| 64 | return LIBAVFORMAT_VERSION_INT; | ||
| 65 | } | ||
| 66 | |||
| 67 | const char *avformat_configuration(void) | ||
| 68 | { | ||
| 69 | return FFMPEG_CONFIGURATION; | ||
| 70 | } | ||
| 71 | |||
| 72 | const char *avformat_license(void) | ||
| 73 | { | ||
| 74 | #define LICENSE_PREFIX "libavformat license: " | ||
| 75 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 76 | } | ||
| 77 | |||
| 78 | int ff_lock_avformat(void) | 57 | int ff_lock_avformat(void) |
| 79 | { | 58 | { |
| 80 | return ff_mutex_lock(&avformat_mutex) ? -1 : 0; | 59 | return ff_mutex_lock(&avformat_mutex) ? -1 : 0; |
| @@ -0,0 +1,45 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | |||
| 23 | #include "libavutil/avassert.h" | ||
| 24 | #include "avformat.h" | ||
| 25 | #include "version.h" | ||
| 26 | |||
| 27 | #include "libavutil/ffversion.h" | ||
| 28 | const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 29 | |||
| 30 | unsigned avformat_version(void) | ||
| 31 | { | ||
| 32 | av_assert0(LIBAVFORMAT_VERSION_MICRO >= 100); | ||
| 33 | return LIBAVFORMAT_VERSION_INT; | ||
| 34 | } | ||
| 35 | |||
| 36 | const char *avformat_configuration(void) | ||
| 37 | { | ||
| 38 | return FFMPEG_CONFIGURATION; | ||
| 39 | } | ||
| 40 | |||
| 41 | const char *avformat_license(void) | ||
| 42 | { | ||
| 43 | #define LICENSE_PREFIX "libavformat license: " | ||
| 44 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 45 | } | ||
| @@ -174,6 +174,7 @@ OBJS = adler32.o \ · 173 unmodified lines | |||
| 174 | tx_float.o \ | 174 | tx_float.o \ |
| 175 | tx_double.o \ | 175 | tx_double.o \ |
| 176 | tx_int32.o \ | 176 | tx_int32.o \ |
| 177 | version.o \ | ||
| 177 | video_enc_params.o \ | 178 | video_enc_params.o \ |
| 178 | film_grain_params.o \ | 179 | film_grain_params.o \ |
| 179 | 180 | ||
| @@ -19,55 +19,12 @@ · 18 unmodified lines | |||
| 19 | #include "config.h" | 19 | #include "config.h" |
| 20 | #include "avutil.h" | 20 | #include "avutil.h" |
| 21 | #include "avassert.h" | 21 | #include "avassert.h" |
| 22 | #include "samplefmt.h" | ||
| 23 | #include "internal.h" | ||
| 24 | 22 | ||
| 25 | /** | 23 | /** |
| 26 | * @file | 24 | * @file |
| 27 | * various utility functions | 25 | * various utility functions |
| 28 | */ | 26 | */ |
| 29 | 27 | ||
| 30 | #include "libavutil/ffversion.h" | ||
| 31 | const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 32 | |||
| 33 | const char *av_version_info(void) | ||
| 34 | { | ||
| 35 | return FFMPEG_VERSION; | ||
| 36 | } | ||
| 37 | |||
| 38 | unsigned avutil_version(void) | ||
| 39 | { | ||
| 40 | av_assert0(AV_SAMPLE_FMT_DBLP == 9); | ||
| 41 | av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4); | ||
| 42 | av_assert0(AV_PICTURE_TYPE_BI == 7); | ||
| 43 | av_assert0(LIBAVUTIL_VERSION_MICRO >= 100); | ||
| 44 | av_assert0(HAVE_MMX2 == HAVE_MMXEXT); | ||
| 45 | |||
| 46 | av_assert0(((size_t)-1) > 0); // C guarantees this but if false on a platform we care about revert at least b284e1ffe343d6697fb950d1ee517bafda8a9844 | ||
| 47 | |||
| 48 | if (av_sat_dadd32(1, 2) != 5) { | ||
| 49 | av_log(NULL, AV_LOG_FATAL, "Libavutil has been built with a broken binutils, please upgrade binutils and rebuild\n"); | ||
| 50 | abort(); | ||
| 51 | } | ||
| 52 | |||
| 53 | if (llrint(1LL<<60) != 1LL<<60) { | ||
| 54 | av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n"); | ||
| 55 | } | ||
| 56 | |||
| 57 | return LIBAVUTIL_VERSION_INT; | ||
| 58 | } | ||
| 59 | |||
| 60 | const char *avutil_configuration(void) | ||
| 61 | { | ||
| 62 | return FFMPEG_CONFIGURATION; | ||
| 63 | } | ||
| 64 | |||
| 65 | const char *avutil_license(void) | ||
| 66 | { | ||
| 67 | #define LICENSE_PREFIX "libavutil license: " | ||
| 68 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 69 | } | ||
| 70 | |||
| 71 | const char *av_get_media_type_string(enum AVMediaType media_type) | 28 | const char *av_get_media_type_string(enum AVMediaType media_type) |
| 72 | { | 29 | { |
| 73 | switch (media_type) { | 30 | switch (media_type) { |
| @@ -0,0 +1,71 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <stdlib.h> | ||
| 22 | |||
| 23 | #include "config.h" | ||
| 24 | #include "avassert.h" | ||
| 25 | #include "avutil.h" | ||
| 26 | #include "common.h" | ||
| 27 | #include "libm.h" | ||
| 28 | #include "log.h" | ||
| 29 | #include "samplefmt.h" | ||
| 30 | #include "version.h" | ||
| 31 | |||
| 32 | #include "libavutil/ffversion.h" | ||
| 33 | const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 34 | |||
| 35 | const char *av_version_info(void) | ||
| 36 | { | ||
| 37 | return FFMPEG_VERSION; | ||
| 38 | } | ||
| 39 | |||
| 40 | unsigned avutil_version(void) | ||
| 41 | { | ||
| 42 | av_assert0(AV_SAMPLE_FMT_DBLP == 9); | ||
| 43 | av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4); | ||
| 44 | av_assert0(AV_PICTURE_TYPE_BI == 7); | ||
| 45 | av_assert0(LIBAVUTIL_VERSION_MICRO >= 100); | ||
| 46 | av_assert0(HAVE_MMX2 == HAVE_MMXEXT); | ||
| 47 | |||
| 48 | av_assert0(((size_t)-1) > 0); // C guarantees this but if false on a platform we care about revert at least b284e1ffe343d6697fb950d1ee517bafda8a9844 | ||
| 49 | |||
| 50 | if (av_sat_dadd32(1, 2) != 5) { | ||
| 51 | av_log(NULL, AV_LOG_FATAL, "Libavutil has been built with a broken binutils, please upgrade binutils and rebuild\n"); | ||
| 52 | abort(); | ||
| 53 | } | ||
| 54 | |||
| 55 | if (llrint(1LL<<60) != 1LL<<60) { | ||
| 56 | av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n"); | ||
| 57 | } | ||
| 58 | |||
| 59 | return LIBAVUTIL_VERSION_INT; | ||
| 60 | } | ||
| 61 | |||
| 62 | const char *avutil_configuration(void) | ||
| 63 | { | ||
| 64 | return FFMPEG_CONFIGURATION; | ||
| 65 | } | ||
| 66 | |||
| 67 | const char *avutil_license(void) | ||
| 68 | { | ||
| 69 | #define LICENSE_PREFIX "libavutil license: " | ||
| 70 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 71 | } | ||
| @@ -6,7 +6,8 @@ HEADERS = postprocess.h \ · 5 unmodified lines | |||
| 6 | version.h \ | 6 | version.h \ |
| 7 | version_major.h \ | 7 | version_major.h \ |
| 8 | 8 | ||
| 9 | OBJS = postprocess.o | 9 | OBJS = postprocess.o \ |
| 10 | version.o \ | ||
| 10 | 11 | ||
| 11 | # Windows resource file | 12 | # Windows resource file |
| 12 | SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o | 13 | SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o |
| @@ -89,30 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks · 88 unmodified lines | |||
| 89 | //#define DEBUG_BRIGHTNESS | 89 | //#define DEBUG_BRIGHTNESS |
| 90 | #include "postprocess.h" | 90 | #include "postprocess.h" |
| 91 | #include "postprocess_internal.h" | 91 | #include "postprocess_internal.h" |
| 92 | #include "version.h" | ||
| 93 | #include "libavutil/avstring.h" | 92 | #include "libavutil/avstring.h" |
| 94 | #include "libavutil/ppc/util_altivec.h" | 93 | #include "libavutil/ppc/util_altivec.h" |
| 95 | 94 | ||
| 96 | #include "libavutil/ffversion.h" | ||
| 97 | const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 98 | |||
| 99 | unsigned postproc_version(void) | ||
| 100 | { | ||
| 101 | av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100); | ||
| 102 | return LIBPOSTPROC_VERSION_INT; | ||
| 103 | } | ||
| 104 | |||
| 105 | const char *postproc_configuration(void) | ||
| 106 | { | ||
| 107 | return FFMPEG_CONFIGURATION; | ||
| 108 | } | ||
| 109 | |||
| 110 | const char *postproc_license(void) | ||
| 111 | { | ||
| 112 | #define LICENSE_PREFIX "libpostproc license: " | ||
| 113 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 114 | } | ||
| 115 | |||
| 116 | #define GET_MODE_BUFFER_SIZE 500 | 95 | #define GET_MODE_BUFFER_SIZE 500 |
| 117 | #define OPTIONS_ARRAY_SIZE 10 | 96 | #define OPTIONS_ARRAY_SIZE 10 |
| 118 | #define BLOCK_SIZE 8 | 97 | #define BLOCK_SIZE 8 |
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | #include "libavutil/avassert.h" | ||
| 23 | #include "postprocess.h" | ||
| 24 | #include "version.h" | ||
| 25 | |||
| 26 | #include "libavutil/ffversion.h" | ||
| 27 | const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 28 | |||
| 29 | unsigned postproc_version(void) | ||
| 30 | { | ||
| 31 | av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100); | ||
| 32 | return LIBPOSTPROC_VERSION_INT; | ||
| 33 | } | ||
| 34 | |||
| 35 | const char *postproc_configuration(void) | ||
| 36 | { | ||
| 37 | return FFMPEG_CONFIGURATION; | ||
| 38 | } | ||
| 39 | |||
| 40 | const char *postproc_license(void) | ||
| 41 | { | ||
| 42 | #define LICENSE_PREFIX "libpostproc license: " | ||
| 43 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 44 | } | ||
| @@ -14,6 +14,7 @@ OBJS = audioconvert.o \ · 13 unmodified lines | |||
| 14 | resample_dsp.o \ | 14 | resample_dsp.o \ |
| 15 | swresample.o \ | 15 | swresample.o \ |
| 16 | swresample_frame.o \ | 16 | swresample_frame.o \ |
| 17 | version.o \ | ||
| 17 | 18 | ||
| 18 | OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o | 19 | OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o |
| 19 | 20 | ||
| @@ -24,32 +24,11 @@ · 23 unmodified lines | |||
| 24 | #include "libavutil/avassert.h" | 24 | #include "libavutil/avassert.h" |
| 25 | #include "libavutil/channel_layout.h" | 25 | #include "libavutil/channel_layout.h" |
| 26 | #include "libavutil/internal.h" | 26 | #include "libavutil/internal.h" |
| 27 | #include "version.h" | ||
| 28 | 27 | ||
| 29 | #include <float.h> | 28 | #include <float.h> |
| 30 | 29 | ||
| 31 | #define ALIGN 32 | 30 | #define ALIGN 32 |
| 32 | 31 | ||
| 33 | #include "libavutil/ffversion.h" | ||
| 34 | const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 35 | |||
| 36 | unsigned swresample_version(void) | ||
| 37 | { | ||
| 38 | av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100); | ||
| 39 | return LIBSWRESAMPLE_VERSION_INT; | ||
| 40 | } | ||
| 41 | |||
| 42 | const char *swresample_configuration(void) | ||
| 43 | { | ||
| 44 | return FFMPEG_CONFIGURATION; | ||
| 45 | } | ||
| 46 | |||
| 47 | const char *swresample_license(void) | ||
| 48 | { | ||
| 49 | #define LICENSE_PREFIX "libswresample license: " | ||
| 50 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 51 | } | ||
| 52 | |||
| 53 | int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){ | 32 | int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){ |
| 54 | if(!s || s->in_convert) // s needs to be allocated but not initialized | 33 | if(!s || s->in_convert) // s needs to be allocated but not initialized |
| 55 | return AVERROR(EINVAL); | 34 | return AVERROR(EINVAL); |
| @@ -0,0 +1,45 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | #include "libavutil/avassert.h" | ||
| 23 | #include "swresample.h" | ||
| 24 | #include "version.h" | ||
| 25 | |||
| 26 | #include "libavutil/ffversion.h" | ||
| 27 | const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION; | ||
| 28 | |||
| 29 | unsigned swresample_version(void) | ||
| 30 | { | ||
| 31 | av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100); | ||
| 32 | return LIBSWRESAMPLE_VERSION_INT; | ||
| 33 | } | ||
| 34 | |||
| 35 | const char *swresample_configuration(void) | ||
| 36 | { | ||
| 37 | return FFMPEG_CONFIGURATION; | ||
| 38 | } | ||
| 39 | |||
| 40 | const char *swresample_license(void) | ||
| 41 | { | ||
| 42 | #define LICENSE_PREFIX "libswresample license: " | ||
| 43 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 44 | } | ||
| 45 | |||
| @@ -17,6 +17,7 @@ OBJS = alphablend.o \ · 16 unmodified lines | |||
| 17 | swscale.o \ | 17 | swscale.o \ |
| 18 | swscale_unscaled.o \ | 18 | swscale_unscaled.o \ |
| 19 | utils.o \ | 19 | utils.o \ |
| 20 | version.o \ | ||
| 20 | yuv2rgb.o \ | 21 | yuv2rgb.o \ |
| 21 | vscale.o \ | 22 | vscale.o \ |
| 22 | 23 | ||
| @@ -40,8 +40,6 @@ · 39 unmodified lines | |||
| 40 | 40 | ||
| 41 | #include "libavutil/attributes.h" | 41 | #include "libavutil/attributes.h" |
| 42 | #include "libavutil/avassert.h" | 42 | #include "libavutil/avassert.h" |
| 43 | #include "libavutil/avutil.h" | ||
| 44 | #include "libavutil/bswap.h" | ||
| 45 | #include "libavutil/cpu.h" | 43 | #include "libavutil/cpu.h" |
| 46 | #include "libavutil/imgutils.h" | 44 | #include "libavutil/imgutils.h" |
| 47 | #include "libavutil/intreadwrite.h" | 45 | #include "libavutil/intreadwrite.h" |
| @@ -59,7 +57,6 @@ · 11 unmodified lines | |||
| 59 | #include "rgb2rgb.h" | 57 | #include "rgb2rgb.h" |
| 60 | #include "swscale.h" | 58 | #include "swscale.h" |
| 61 | #include "swscale_internal.h" | 59 | #include "swscale_internal.h" |
| 62 | #include "version.h" | ||
| 63 | 60 | ||
| 64 | static SwsVector *sws_getIdentityVec(void); | 61 | static SwsVector *sws_getIdentityVec(void); |
| 65 | static void sws_addVec(SwsVector *a, SwsVector *b); | 62 | static void sws_addVec(SwsVector *a, SwsVector *b); |
| @@ -68,23 +65,6 @@ static void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); · 2 unmodified lines | |||
| 68 | 65 | ||
| 69 | static void handle_formats(SwsContext *c); | 66 | static void handle_formats(SwsContext *c); |
| 70 | 67 | ||
| 71 | unsigned swscale_version(void) | ||
| 72 | { | ||
| 73 | av_assert0(LIBSWSCALE_VERSION_MICRO >= 100); | ||
| 74 | return LIBSWSCALE_VERSION_INT; | ||
| 75 | } | ||
| 76 | |||
| 77 | const char *swscale_configuration(void) | ||
| 78 | { | ||
| 79 | return FFMPEG_CONFIGURATION; | ||
| 80 | } | ||
| 81 | |||
| 82 | const char *swscale_license(void) | ||
| 83 | { | ||
| 84 | #define LICENSE_PREFIX "libswscale license: " | ||
| 85 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 86 | } | ||
| 87 | |||
| 88 | typedef struct FormatEntry { | 68 | typedef struct FormatEntry { |
| 89 | uint8_t is_supported_in :1; | 69 | uint8_t is_supported_in :1; |
| 90 | uint8_t is_supported_out :1; | 70 | uint8_t is_supported_out :1; |
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | * Version functions. | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "config.h" | ||
| 22 | #include "libavutil/avassert.h" | ||
| 23 | #include "swscale.h" | ||
| 24 | #include "version.h" | ||
| 25 | |||
| 26 | unsigned swscale_version(void) | ||
| 27 | { | ||
| 28 | av_assert0(LIBSWSCALE_VERSION_MICRO >= 100); | ||
| 29 | return LIBSWSCALE_VERSION_INT; | ||
| 30 | } | ||
| 31 | |||
| 32 | const char *swscale_configuration(void) | ||
| 33 | { | ||
| 34 | return FFMPEG_CONFIGURATION; | ||
| 35 | } | ||
| 36 | |||
| 37 | const char *swscale_license(void) | ||
| 38 | { | ||
| 39 | #define LICENSE_PREFIX "libswscale license: " | ||
| 40 | return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; | ||
| 41 | } | ||