-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot properly set SRT version patch above 10 #1397
Comments
The function that constructs the version integer (used in the handshake) is the following: inline ATR_CONSTEXPR uint32_t SrtVersion(int major, int minor, int patch)
{
return patch + minor*0x100 + major*0x10000;
}
A similar function is defined in version.h.in. #define SRT_MAKE_VERSION(major, minor, patch) \
((patch) + ((minor)*0x100) + ((major)*0x10000)) I agree we need a way to distinguish release version 1.4.1 from the further development prev v1.5.0 versions. Some ideas.
|
A combined idea, odd versions with letters: 1.4.0 release, 1.4.1a, 1.4.1b,...1.4.1f (various development levels to be defined), 1.4.2 release, release never have a letter (easier o remember than odd or even). While introducing features we can require a MINVERSION with letter and leave this requirement in released code since the increasing version order is respected. Or not for experimental features that can come and go. |
Something wrong in the previous comment, 1.4.2<1.4.1a<1.4.1f, unless we trick the version comparison rules. |
Would that mean that the particular number for the version is only allowed 0-9, or that it's a requirement only for the very minor number and the remaining combinations are reused for the in-development stage? Just the coding-decoding rules would get a little bit more complicated. Just if we theoretically reach the 1.9.5 version, then the new major release will still be 1.10.0 encoded as 0x00010a00. I don't think it should be a problem as long as we have some high level translation facility and the hex number is not to be used directly (or only if you know how the high level translation rules work). |
Maybe the formula has problem beyond the last digit: 10 * 0x100 shall be computed as 0x10 * 0x100 so 1.10.5 is 0x00011000. So the 32-bit hex "shows" the version. I only saw the problem on the last digit but exists on all. If we agree on the correspondence between the string and binary versions the development/release version scheme can be discussed in a separate issue. |
In CMakeList.txt set (SRT_VERSION 1.4.11) generates version 0x0001040b while 0x00010411 is desired.
The version string SRT_VERSION_STRING define is OK ("1.4.0"), so is the lib name "libsrt.so.1.4.10" but the numerical value SRT_VERSION_VALUE used in srt handshake and in application code to enable SRT features not present in all versions does not work as expected
When not using an official release of SRT in product and to "highlight" this difference in products I would like to "color" the SRT version: for example 1.4.21 would be a modified 1.4.2. Also using hex letters would be nice too but the path is not considered an hex number ex: set(SRT_VERSION 1.4.1a) or set(SRT_VERSION 1.4.a1).
For example when a close-to-be-released version is not yet released, it still report the previous release 1.4.1 for soon-to-be-released 1.5.0. I could then use 1.4.91 or 1.4.f1.
The text was updated successfully, but these errors were encountered: