ref: 754487c05d0a7ee18669a6e7e7355b0ae1d4e4a8
parent: d67e3476c91d408cab8e5d7fb3f29120dadb15ed
author: Janne Grunau <[email protected]>
date: Tue Mar 5 13:43:39 EST 2019
let dav1d_version() return the project version Increments the soname revision number for this behavior change. Removes the DAV1D_VERSION and DAV1D_VERSION_INT defines and dav1d_version_vcs() and dav1d_version_int(). Also cleans up the version usage in dav1d CLI. Refs #241, #255.
--- a/include/dav1d/dav1d.h
+++ b/include/dav1d/dav1d.h
@@ -74,16 +74,6 @@
DAV1D_API const char *dav1d_version(void);
/**
- * Get library version based on version control system.
- */
-DAV1D_API const char *dav1d_version_vcs(void);
-
-/**
- * Get library version as unsigned int.
- */
-DAV1D_API unsigned int dav1d_version_int(void);
-
-/**
* Initialize settings to default values.
*
* @param s Input settings context.
--- a/include/dav1d/version.h.in
+++ b/include/dav1d/version.h.in
@@ -31,8 +31,4 @@
#define DAV1D_VERSION_MINOR @DAV1D_VERSION_MINOR@
#define DAV1D_VERSION_PATCH @DAV1D_VERSION_PATCH@
-#define DAV1D_VERSION "@DAV1D_VERSION_MAJOR@.@DAV1D_VERSION_MINOR@.@DAV1D_VERSION_PATCH@"
-
-#define DAV1D_VERSION_INT (@DAV1D_VERSION_MAJOR@ << 16 | @DAV1D_VERSION_MINOR@ << 8 | @DAV1D_VERSION_PATCH@)
-
#endif /* DAV1D_VERSION_H */
--- a/include/vcs_version.h.in
+++ b/include/vcs_version.h.in
@@ -1,2 +1,2 @@
/* auto-generated, do not edit */
-#define DAV1D_VERSION_VCS "@VCS_TAG@"
+#define DAV1D_VERSION "@VCS_TAG@"
--- a/meson.build
+++ b/meson.build
@@ -30,7 +30,7 @@
'b_ndebug=if-release'],
meson_version: '>= 0.47.0')
-dav1d_soname_version = '1.0.0'
+dav1d_soname_version = '1.0.1'
dav1d_version_array = dav1d_soname_version.split('.')
dav1d_version_major = dav1d_version_array[0]
dav1d_version_minor = dav1d_version_array[1]
--- a/src/lib.c
+++ b/src/lib.c
@@ -56,14 +56,6 @@
return DAV1D_VERSION;
}
-const char *dav1d_version_vcs(void) {
- return DAV1D_VERSION_VCS;
-}
-
-unsigned int dav1d_version_int(void) {
- return DAV1D_VERSION_INT;
-}
-
void dav1d_default_settings(Dav1dSettings *const s) {
s->n_frame_threads = 1;
s->n_tile_threads = 1;
--- a/tools/dav1d.c
+++ b/tools/dav1d.c
@@ -73,11 +73,11 @@
Dav1dContext *c;
Dav1dData data;
unsigned n_out = 0, total, fps[2];
- const char *version = dav1d_version_vcs();
+ const char *version = dav1d_version();
- if (strcmp(version, DAV1D_VERSION_VCS)) {
+ if (strcmp(version, DAV1D_VERSION)) {
fprintf(stderr, "Version mismatch (library: %s, executable: %s)\n",
- version, DAV1D_VERSION_VCS);
+ version, DAV1D_VERSION);
return -1;
}
@@ -100,7 +100,7 @@
}
if (!cli_settings.quiet)
- fprintf(stderr, "dav1d %s - by VideoLAN\n", dav1d_version_vcs());
+ fprintf(stderr, "dav1d %s - by VideoLAN\n", dav1d_version());
// skip frames until a sequence header is found
if (cli_settings.skip) {
--- a/tools/dav1d_cli_parse.c
+++ b/tools/dav1d_cli_parse.c
@@ -263,7 +263,7 @@
!!parse_unsigned(optarg, ARG_ALL_LAYERS, argv[0]);
break;
case 'v':
- fprintf(stderr, "%s\n", dav1d_version_vcs());
+ fprintf(stderr, "%s\n", dav1d_version());
exit(0);
case ARG_CPU_MASK:
dav1d_set_cpu_flags_mask(parse_enum(optarg, cpu_mask_tbl,