diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-24 01:58:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-24 01:58:56 +0100 |
| commit | 3fc9a435a720d8b2abd78c1bdc7b34bc635ad797 (patch) | |
| tree | 2b666a8aadcdf6d657af02c64f188af6ba2e5789 /src/lib/util.cc | |
| parent | 5c887bc8105d92b4b8e9380e62e655ac6691b439 (diff) | |
Some doxygen documentation improvements.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index d12bd3e77..73222083a 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -369,6 +369,9 @@ md5_data (string title, void const * data, int size) } #endif +/** @param file File name. + * @return MD5 digest of file's contents. + */ string md5_digest (string file) { @@ -404,6 +407,9 @@ md5_digest (string file) return s.str (); } +/** @param An arbitrary sampling rate. + * @return The appropriate DCP-approved sampling rate (48kHz or 96kHz). + */ int dcp_audio_sample_rate (int fs) { @@ -424,6 +430,9 @@ bool operator!= (Crop const & a, Crop const & b) return !(a == b); } +/** @param index Colour LUT index. + * @return Human-readable name. + */ string colour_lut_index_to_name (int index) { @@ -458,6 +467,10 @@ Socket::check () _deadline.async_wait (boost::bind (&Socket::check, this)); } +/** Blocking connect with timeout. + * @param endpoint End-point to connect to. + * @param timeout Time-out in seconds. + */ void Socket::connect (asio::ip::basic_resolver_entry<asio::ip::tcp> const & endpoint, int timeout) { @@ -472,6 +485,11 @@ Socket::connect (asio::ip::basic_resolver_entry<asio::ip::tcp> const & endpoint, } } +/** Blocking write with timeout. + * @param data Buffer to write. + * @param size Number of bytes to write. + * @param timeout Time-out, in seconds. + */ void Socket::write (uint8_t const * data, int size, int timeout) { @@ -488,6 +506,11 @@ Socket::write (uint8_t const * data, int size, int timeout) } } +/** Blocking read with timeout. + * @param data Buffer to read to. + * @param size Number of bytes to read. + * @param timeout Time-out, in seconds. + */ int Socket::read (uint8_t* data, int size, int timeout) { |
