mirror of
https://code.videolan.org/videolan/dav1d
synced 2026-06-11 04:03:05 +00:00
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.
This commit is contained in:
committed by
Jean-Baptiste Kempf
co-authored by
Jean-Baptiste Kempf
parent
d67e3476c9
commit
754487c05d
@@ -73,16 +73,6 @@ typedef struct Dav1dSettings {
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/* auto-generated, do not edit */
|
||||
#define DAV1D_VERSION_VCS "@VCS_TAG@"
|
||||
#define DAV1D_VERSION "@VCS_TAG@"
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ project('dav1d', ['c'],
|
||||
'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]
|
||||
|
||||
@@ -56,14 +56,6 @@ const char *dav1d_version(void) {
|
||||
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;
|
||||
|
||||
+4
-4
@@ -73,11 +73,11 @@ int main(const int argc, char *const *const argv) {
|
||||
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 @@ int main(const int argc, char *const *const argv) {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -263,7 +263,7 @@ void parse(const int argc, char *const *const argv,
|
||||
!!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,
|
||||
|
||||
Reference in New Issue
Block a user