History

lib*/version: Move library version functions into files of their own

This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit).

Andreas Rheinhardt committed 4 years ago

Commit f2b79c51 parent 341737926 files · +397 −202Browse files

Unified · Split

26 files
  1. Makefile +3 −1
  2. ffbuild/common.mak +0 −2
  3. libavcodec/Makefile +1 −0
  4. libavcodec/avcodec.c +0 −25
  5. libavcodec/version.c +50 −0
  6. libavdevice/Makefile +1 −0
  7. libavdevice/avdevice.c +0 −24
  8. libavdevice/version.c +45 −0
  9. libavfilter/Makefile +1 −0
  10. libavfilter/avfilter.c +0 −23
  11. libavfilter/version.c +44 −0
  12. libavformat/Makefile +1 −0
  13. libavformat/utils.c +0 −21
  14. libavformat/version.c +45 −0
  15. libavutil/Makefile +1 −0
  16. libavutil/utils.c +0 −43
  17. libavutil/version.c +71 −0
  18. libpostproc/Makefile +2 −1
  19. libpostproc/postprocess.c +0 −21
  20. libpostproc/version.c +44 −0
  21. libswresample/Makefile +1 −0
  22. libswresample/swresample.c +0 −21
  23. libswresample/version.c +45 −0
  24. libswscale/Makefile +1 −0
  25. libswscale/utils.c +0 −20
  26. libswscale/version.c +41 −0
Makefile+3−1
@@ -19,6 +19,8 @@ vpath %/fate_config.sh.template $(SRC_PATH) · 18 unmodified lines
1919 TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
2020 HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
2121
22+ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
23+
2224 # $(FFLIBS-yes) needs to be in linking order
2325 FFLIBS-$(CONFIG_AVDEVICE) += avdevice
2426 FFLIBS-$(CONFIG_AVFILTER) += avfilter
@@ -113,7 +115,7 @@ include $(SRC_PATH)/fftools/Makefile · 88 unmodified lines
113115 include $(SRC_PATH)/doc/Makefile
114116 include $(SRC_PATH)/doc/examples/Makefile
115117
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
117119
118120 $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
119121 ifeq ($(STRIPTYPE),direct)
ffbuild/common.mak+0−2
@@ -29,8 +29,6 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) · 28 unmodified lines
2929 $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
3030 endif
3131
32−ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
33−
3432 # NASM requires -I path terminated with /
3533 IFLAGS := -I. -I$(SRC_LINK)/
3634 CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
libavcodec/Makefile+1−0
@@ -56,6 +56,7 @@ OBJS = ac3_parser.o \ · 55 unmodified lines
5656 qsv_api.o \
5757 raw.o \
5858 utils.o \
59+ version.o \
5960 vlc.o \
6061 vorbis_parser.o \
6162 xiph.o \
libavcodec/avcodec.c+0−25
@@ -40,31 +40,6 @@ · 39 unmodified lines
4040 #include "frame_thread_encoder.h"
4141 #include "internal.h"
4242 #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−}
6843
6944 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
7045 {
libavcodec/version.c+50−0
@@ -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+}
libavdevice/Makefile+1−0
@@ -8,6 +8,7 @@ HEADERS = avdevice.h \ · 7 unmodified lines
88 OBJS = alldevices.o \
99 avdevice.o \
1010 utils.o \
11+ version.o \
1112
1213 OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
1314
libavdevice/avdevice.c+0−24
@@ -17,15 +17,8 @@ · 16 unmodified lines
1717 */
1818
1919 #include "libavutil/avassert.h"
20−#include "libavutil/samplefmt.h"
21−#include "libavutil/pixfmt.h"
2220 #include "avdevice.h"
2321 #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;
2922
3023 #if FF_API_DEVICE_CAPABILITIES
3124 const AVOption av_device_capabilities[] = {
@@ -33,23 +26,6 @@ const AVOption av_device_capabilities[] = { · 1 unmodified line
3326 };
3427 #endif
3528
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−
5329 int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,
5430 void *data, size_t data_size)
5531 {
libavdevice/version.c+45−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 "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+}
libavfilter/Makefile+1−0
@@ -20,6 +20,7 @@ OBJS = allfilters.o \ · 19 unmodified lines
2020 framequeue.o \
2121 graphdump.o \
2222 graphparser.o \
23+ version.o \
2324 video.o \
2425
2526 OBJS-$(HAVE_THREADS) += pthread.o
libavfilter/avfilter.c+0−23
@@ -29,10 +29,8 @@ · 28 unmodified lines
2929 #include "libavutil/hwcontext.h"
3030 #include "libavutil/internal.h"
3131 #include "libavutil/opt.h"
32−#include "libavutil/pixdesc.h"
3332 #include "libavutil/rational.h"
3433 #include "libavutil/samplefmt.h"
35−#include "libavutil/thread.h"
3634
3735 #define FF_INTERNAL_FIELDS 1
3836 #include "framequeue.h"
@@ -43,10 +41,6 @@ · 4 unmodified lines
4341 #include "formats.h"
4442 #include "framepool.h"
4543 #include "internal.h"
46−#include "version.h"
47−
48−#include "libavutil/ffversion.h"
49−const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
5044
5145 static void tlog_ref(void *ctx, AVFrame *ref, int end)
5246 {
@@ -75,23 +69,6 @@ static void tlog_ref(void *ctx, AVFrame *ref, int end) · 22 unmodified lines
7569 ff_tlog(ctx, "]%s", end ? "\n" : "");
7670 }
7771
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−
9572 void ff_command_queue_pop(AVFilterContext *filter)
9673 {
9774 AVFilterCommand *c= filter->command_queue;
libavfilter/version.c+44−0
@@ -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+}
libavformat/Makefile+1−0
@@ -25,6 +25,7 @@ OBJS = allformats.o \ · 24 unmodified lines
2525 seek.o \
2626 url.o \
2727 utils.o \
28+ version.o \
2829
2930 OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
3031
libavformat/utils.c+0−21
@@ -46,10 +46,6 @@ · 45 unmodified lines
4646 #if CONFIG_NETWORK
4747 #include "network.h"
4848 #endif
49−#include "version.h"
50−
51−#include "libavutil/ffversion.h"
52−const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
5349
5450 static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER;
5551
@@ -58,23 +54,6 @@ static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER; · 2 unmodified lines
5854 * various utility functions for use within FFmpeg
5955 */
6056
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−
7857 int ff_lock_avformat(void)
7958 {
8059 return ff_mutex_lock(&avformat_mutex) ? -1 : 0;
libavformat/version.c+45−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+}
libavutil/Makefile+1−0
@@ -174,6 +174,7 @@ OBJS = adler32.o \ · 173 unmodified lines
174174 tx_float.o \
175175 tx_double.o \
176176 tx_int32.o \
177+ version.o \
177178 video_enc_params.o \
178179 film_grain_params.o \
179180
libavutil/utils.c+0−43
@@ -19,55 +19,12 @@ · 18 unmodified lines
1919 #include "config.h"
2020 #include "avutil.h"
2121 #include "avassert.h"
22−#include "samplefmt.h"
23−#include "internal.h"
2422
2523 /**
2624 * @file
2725 * various utility functions
2826 */
2927
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−
7128 const char *av_get_media_type_string(enum AVMediaType media_type)
7229 {
7330 switch (media_type) {
libavutil/version.c+71−0
@@ -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+}
libpostproc/Makefile+2−1
@@ -6,7 +6,8 @@ HEADERS = postprocess.h \ · 5 unmodified lines
66 version.h \
77 version_major.h \
88
9−OBJS = postprocess.o
9+OBJS = postprocess.o \
10+ version.o \
1011
1112 # Windows resource file
1213 SLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o
libpostproc/postprocess.c+0−21
@@ -89,30 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks · 88 unmodified lines
8989 //#define DEBUG_BRIGHTNESS
9090 #include "postprocess.h"
9191 #include "postprocess_internal.h"
92−#include "version.h"
9392 #include "libavutil/avstring.h"
9493 #include "libavutil/ppc/util_altivec.h"
9594
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−
11695 #define GET_MODE_BUFFER_SIZE 500
11796 #define OPTIONS_ARRAY_SIZE 10
11897 #define BLOCK_SIZE 8
libpostproc/version.c+44−0
@@ -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+}
libswresample/Makefile+1−0
@@ -14,6 +14,7 @@ OBJS = audioconvert.o \ · 13 unmodified lines
1414 resample_dsp.o \
1515 swresample.o \
1616 swresample_frame.o \
17+ version.o \
1718
1819 OBJS-$(CONFIG_LIBSOXR) += soxr_resample.o
1920
libswresample/swresample.c+0−21
@@ -24,32 +24,11 @@ · 23 unmodified lines
2424 #include "libavutil/avassert.h"
2525 #include "libavutil/channel_layout.h"
2626 #include "libavutil/internal.h"
27−#include "version.h"
2827
2928 #include <float.h>
3029
3130 #define ALIGN 32
3231
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−
5332 int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){
5433 if(!s || s->in_convert) // s needs to be allocated but not initialized
5534 return AVERROR(EINVAL);
libswresample/version.c+45−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+#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+
libswscale/Makefile+1−0
@@ -17,6 +17,7 @@ OBJS = alphablend.o \ · 16 unmodified lines
1717 swscale.o \
1818 swscale_unscaled.o \
1919 utils.o \
20+ version.o \
2021 yuv2rgb.o \
2122 vscale.o \
2223
libswscale/utils.c+0−20
@@ -40,8 +40,6 @@ · 39 unmodified lines
4040
4141 #include "libavutil/attributes.h"
4242 #include "libavutil/avassert.h"
43−#include "libavutil/avutil.h"
44−#include "libavutil/bswap.h"
4543 #include "libavutil/cpu.h"
4644 #include "libavutil/imgutils.h"
4745 #include "libavutil/intreadwrite.h"
@@ -59,7 +57,6 @@ · 11 unmodified lines
5957 #include "rgb2rgb.h"
6058 #include "swscale.h"
6159 #include "swscale_internal.h"
62−#include "version.h"
6360
6461 static SwsVector *sws_getIdentityVec(void);
6562 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
6865
6966 static void handle_formats(SwsContext *c);
7067
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−
8868 typedef struct FormatEntry {
8969 uint8_t is_supported_in :1;
9070 uint8_t is_supported_out :1;
libswscale/version.c+41−0
@@ -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+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t