Skip to content
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

Added description for build options. #886

Merged
merged 11 commits into from Nov 7, 2019

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Sep 24, 2019

Fixes #885

Added build options description: BuildOptions.md.

Added entry info in README.

Removed unnecessary description in CMakeLists.txt in comments; the new file is a more appropriate place for this description.

Fixed duplicated enable-unittests in configure-data.tcl.

…unnecessary descr in cmake. Fixed duplicated enable-unittests
README.md Outdated
@@ -41,6 +41,8 @@ As audio/video packets are streamed from a source to a destination device, SRT d
* OpenSSL
* Pthreads (for POSIX systems it's builtin, for Windows there's a library)

For detailed description of the build system and options, please [read here](BuildOptions.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For detailed description of the build system and options, please [read here](BuildOptions.md).
For detailed description of the build system and options, please [read](BuildOptions.md).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "read this"?

source IP address exactly the same as the one, which the peer is trying to
connect to.

When this is OFF, the source IP address in such outgoing UDP packet will
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethouris Shouldn't this be "ON"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this exactly describes what happens by default. But as you are mistaken here, users will be as well, so it likely needs to be said explicitly.

@ethouris ethouris added [docs] Area: Improvements or additions to documentation Status: Review Needed labels Sep 25, 2019
Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review of BuildOptions.md

BuildOptions_reviewSM_2019-09-24.md.zip

@ethouris
Copy link
Collaborator Author

ethouris commented Sep 26, 2019

I made fixes mostly in the form you provided; here is my extra description of places where my checked-in version differs. @stevomatthews Please review, serveral things may still need fixing because of that.

BuildOption_fix_comments.md.zip

time, instead of `gettimeofday`. This function forces the use of a monotonic
clock that is independent of the currently set time in the system.
The condition variables, for which the `*_timedwait()` functions are used
with time specification basing on the time obtained from `clock_gettime`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with time specification based on the time obtained from clock_gettime,

`clock_gettime()` function, which is not available on every SDK, or extra
time, instead of `gettimeofday`. This function forces the use of a monotonic
clock that is independent of the currently set time in the system.
The condition variables, for which the `*_timedwait()` functions are used
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition variables (CV), for which the *_timedwait() functions are used

must be appropriately configured. For now, this is only done for the
GarbageCollector controlling CV, not every CV used in SRT. The consequence
of enabling this option, however, may be portability issues resulting from
the fact that `clock_gettime` function may be unavailable in some SDKs or an extra
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fact that clock_gettime function may be unavailable in some SDKs, or that an extra

must be appropriately configured. For now, this is only done for the
GarbageCollector controlling CV, not every CV used in SRT. The consequence
of enabling this option, however, may be portability issues resulting from
the fact that `clock_gettime` function may be unavailable in some SDKs or an extra
`-lrt` option is sometimes required (this requirement will be autodetected).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding this (edited) paragraph from your comments:

What is important here is that the clock_gettime function is used to obtain
the current time, and then the *_timedwait functions need to be passed the
time specification from the same domain. The time must be specified to the
*_timedwait functions as the absolute time up to which they have to wait.
This means that usually you first obtain the current time from clock_gettime,
add the "waiting time" to it, and then pass the result to the *_timedwait function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll try to provide the description a little bit more concise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this:

The problem is based on the fact that POSIX functions that use timeout
specification (all of *_timedwait) expect the absolute time value.
A relative timeout value can be then only specified by adding it to
the current time, which can be specified as either system or monotonic
clock (which one, is configured in the resources used in the operation).
However the current time of the monotonic clock can only be obtained by
the clock_gettime function.

directory, provided that the library and applications are installed in POSIX/GNU
style directories. This might be useful when installing SRT and applications
in a directory, in which the library subdirectory is not explicitly defined
among the global library paths (such as `/opt/srt-1.4/lib`, for example).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

among the global library paths. Consider, for example, this application and its
required library:

  • /opt/srt/bin/srt-live-transmit
  • /opt/srt/lib64/libsrt.so

By using the --enable-relative-libpath option, the srt-live-transmit
application has a relative library path defined inside as ../lib64. A dynamic
linker will find the required libsrt.so file by this path: ../lib64/libsrt.so.
This way the dynamic linkage will work even if /opt/srt/lib64 path isn't added
to the system paths in /etc/ld.so.conf or in the LD_LIBRARY_PATH environment
variable.

`--enable-testing` (default: OFF)
---------------------------------
Enables building SRT as a shared and/or static library, as required for your
application. The only practical use is by disabling one of them
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

application. In practice, you would only disable one or the other


Enables `#include <threadcheck.h>`, which implements `THREAD_*` macros" to
support better thread debugging. This is used by one of dependent projects.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support better thread debugging. Included to support an existing project.


When ON, this option enables unit tests, possibly with the download
and installation of the Google test library in the build directory. The tests
will be run as part of the build process. This is predicted for developers only.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be run as part of the build process. This is intended for developers only.

directory layout will be used for particular parts. As on all
known build systems, this defaults to `/usr/local` on POSIX
compatible systems.
This is an alias to `--cmake-install-prefix`. This is the root directory for
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an alias to the --cmake-install-prefix variable that establishes the
root directory for installation, inside of which a GNU/POSIX compatible directory layout will be used. As on all known build systems, this defaults to /usr/local
on GNU/POSIX compatible systems, with lower level GNU/POSIX directories
created inside: /usr/local/bin,/usr/local/lib, etc.

may give more chance to switch to the right thread at the time
when it is expected to be revived.
This option will cause more empty loop running, which may cause more CPU usage.
Although when processing high bitrate streams the share of empty loop runs will decrease
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind, however, that when processing high bitrate streams . . .


Instead of `--with-compiler-prefix` you can use as well `--cmake-c-compiler`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of --with-compiler-prefix you can use --cmake-c-compiler


Instead of `--with-compiler-prefix` you can use as well `--cmake-c-compiler`
and `--cmake-c++-compiler` options. This can be then thought of as a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and --cmake-c++-compiler options. This can be thought of as a

@ethouris ethouris added this to Needs review in Development via automation Sep 27, 2019
@ethouris ethouris added this to the v1.4.1 milestone Sep 27, 2019
README.md Outdated
@@ -41,6 +41,8 @@ As audio/video packets are streamed from a source to a destination device, SRT d
* OpenSSL
* Pthreads (for POSIX systems it's builtin, for Windows there's a library)

For detailed description of the build system and options, please [read](docs/BuildOptions.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For detailed description of the build system and options, please read BuildOptions.md.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Much better.

Comment on lines 150 to 151
availabe on some version of Windows, in which case you can turn this OFF,
however at the expense of not being able to resolve IP address by name,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

available on some versions of Windows, in which case you can turn this OFF.
When this option is OFF, however, IP addresses cannot be resolved by name,

specification (all of `*_timedwait`) expect the absolute time value.
A relative timeout value can be then only specified by adding it to
the current time, which can be specified as either system or monotonic
clock (which one, is configured in the resources used in the operation).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clock (as configured in the resources used in the operation).

Comment on lines 237 to 240
IP address in such a response packet to 10.0.1.20 in the above example,
as well as this address is first extracted from the incoming packet as the
target address. This fixes the problem, as this will be interpreted by
the caller peer correctly.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IP address in such a response packet (e.g. to 10.0.1.20 in the above example).
This address is first extracted from the incoming packet as the target address,
which fixes the problem, as that address will be interpreted by the caller peer correctly.
Commenting on lines +237 to +240


Encryption library to be used. Possible options for `<name>`:

* openssl(default)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • openssl (default)

Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minior edits.

Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've finished my review pass. No other comments at this time.

@rndi rndi merged commit 325dc3f into Haivision:master Nov 7, 2019
Development automation moved this from Needs review to Done Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[docs] Area: Improvements or additions to documentation
Projects
No open projects
Development
  
Done
Development

Successfully merging this pull request may close these issues.

Provide documentation for build options
3 participants