diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-03-14 02:22:39 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-03-14 13:28:42 +0000 |
commit | cb22b3df5f0b7509a37e091360ecbb4d8a9f2873 (patch) | |
tree | dd12e81f5f61e6ec268bd03d2e6951a7abee9506 /toxav | |
parent | 11ad5471b91dc1b36552ba4e5a3ea434c8a30f5f (diff) |
Fix up comments a bit to start being more uniform.
Tokstyle (check-cimple) will start enforcing comment formats at some
point. It will not support arbitrary stuff in comments, and will parse
them. The result can then be semantically analysed.
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/audio.c | 8 | ||||
-rw-r--r-- | toxav/msi.c | 2 | ||||
-rw-r--r-- | toxav/msi.h | 2 | ||||
-rw-r--r-- | toxav/rtp.c | 2 | ||||
-rw-r--r-- | toxav/rtp.h | 2 | ||||
-rw-r--r-- | toxav/toxav_old.c | 18 | ||||
-rw-r--r-- | toxav/video.c | 17 |
7 files changed, 27 insertions, 24 deletions
diff --git a/toxav/audio.c b/toxav/audio.c index d4618aaf..b936f7a4 100644 --- a/toxav/audio.c +++ b/toxav/audio.c | |||
@@ -378,7 +378,7 @@ OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t s | |||
378 | * controlling the rate by adjusting the output buffer size. | 378 | * controlling the rate by adjusting the output buffer size. |
379 | * | 379 | * |
380 | * Parameters: | 380 | * Parameters: |
381 | * [in] x opus_int32: bitrate in bits per second. | 381 | * `[in]` `x` `opus_int32`: bitrate in bits per second. |
382 | */ | 382 | */ |
383 | status = opus_encoder_ctl(rc, OPUS_SET_BITRATE(bit_rate)); | 383 | status = opus_encoder_ctl(rc, OPUS_SET_BITRATE(bit_rate)); |
384 | 384 | ||
@@ -393,7 +393,7 @@ OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t s | |||
393 | * Note: | 393 | * Note: |
394 | * This is only applicable to the LPC layer | 394 | * This is only applicable to the LPC layer |
395 | * Parameters: | 395 | * Parameters: |
396 | * [in] x int: FEC flag, 0 (disabled) is default | 396 | * `[in]` `x` `int`: FEC flag, 0 (disabled) is default |
397 | */ | 397 | */ |
398 | /* Enable in-band forward error correction in codec */ | 398 | /* Enable in-band forward error correction in codec */ |
399 | status = opus_encoder_ctl(rc, OPUS_SET_INBAND_FEC(1)); | 399 | status = opus_encoder_ctl(rc, OPUS_SET_INBAND_FEC(1)); |
@@ -410,7 +410,7 @@ OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t s | |||
410 | * the encoder at the expense of quality at a given bitrate in the lossless case, | 410 | * the encoder at the expense of quality at a given bitrate in the lossless case, |
411 | * but greater quality under loss. | 411 | * but greater quality under loss. |
412 | * Parameters: | 412 | * Parameters: |
413 | * [in] x int: Loss percentage in the range 0-100, inclusive. | 413 | * `[in]` `x` `int`: Loss percentage in the range 0-100, inclusive. |
414 | */ | 414 | */ |
415 | /* Make codec resistant to up to 10% packet loss | 415 | /* Make codec resistant to up to 10% packet loss |
416 | * NOTE This could also be adjusted on the fly, rather than hard-coded, | 416 | * NOTE This could also be adjusted on the fly, rather than hard-coded, |
@@ -431,7 +431,7 @@ OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t s | |||
431 | * The default value is 10. | 431 | * The default value is 10. |
432 | * | 432 | * |
433 | * Parameters: | 433 | * Parameters: |
434 | * [in] x int: 0-10, inclusive | 434 | * `[in]` `x` `int`: 0-10, inclusive |
435 | */ | 435 | */ |
436 | /* Set algorithm to the highest complexity, maximizing compression */ | 436 | /* Set algorithm to the highest complexity, maximizing compression */ |
437 | status = opus_encoder_ctl(rc, OPUS_SET_COMPLEXITY(AUDIO_OPUS_COMPLEXITY)); | 437 | status = opus_encoder_ctl(rc, OPUS_SET_COMPLEXITY(AUDIO_OPUS_COMPLEXITY)); |
diff --git a/toxav/msi.c b/toxav/msi.c index 84a18f36..69046079 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /** | 21 | /** |
22 | * Protocol: | 22 | * Protocol: |
23 | * | 23 | * |
24 | * |id [1 byte]| |size [1 byte]| |data [$size bytes]| |...{repeat}| |0 {end byte}| | 24 | * `|id [1 byte]| |size [1 byte]| |data [$size bytes]| |...{repeat}| |0 {end byte}|` |
25 | */ | 25 | */ |
26 | 26 | ||
27 | typedef enum MSIHeaderID { | 27 | typedef enum MSIHeaderID { |
diff --git a/toxav/msi.h b/toxav/msi.h index e50171e5..5809228d 100644 --- a/toxav/msi.h +++ b/toxav/msi.h | |||
@@ -121,7 +121,7 @@ void msi_register_callback(MSISession *session, msi_action_cb *callback, MSICall | |||
121 | */ | 121 | */ |
122 | int msi_invite(MSISession *session, MSICall **call, uint32_t friend_number, uint8_t capabilities); | 122 | int msi_invite(MSISession *session, MSICall **call, uint32_t friend_number, uint8_t capabilities); |
123 | /** | 123 | /** |
124 | * Hangup call. NOTE: 'call' will be freed | 124 | * Hangup call. NOTE: `call` will be freed |
125 | */ | 125 | */ |
126 | int msi_hangup(MSICall *call); | 126 | int msi_hangup(MSICall *call); |
127 | /** | 127 | /** |
diff --git a/toxav/rtp.c b/toxav/rtp.c index 35898b68..aed9523b 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -319,9 +319,11 @@ static void update_bwc_values(const Logger *log, RTPSession *session, const stru | |||
319 | * find out and handle it appropriately. | 319 | * find out and handle it appropriately. |
320 | * | 320 | * |
321 | * @param session The current RTP session with: | 321 | * @param session The current RTP session with: |
322 | * <code> | ||
322 | * session->mcb == vc_queue_message() // this function is called from here | 323 | * session->mcb == vc_queue_message() // this function is called from here |
323 | * session->mp == struct RTPMessage * | 324 | * session->mp == struct RTPMessage * |
324 | * session->cs == call->video.second // == VCSession created by vc_new() call | 325 | * session->cs == call->video.second // == VCSession created by vc_new() call |
326 | * </code> | ||
325 | * @param header The RTP header deserialised from the packet. | 327 | * @param header The RTP header deserialised from the packet. |
326 | * @param incoming_data The packet data *not* header, i.e. this is the actual | 328 | * @param incoming_data The packet data *not* header, i.e. this is the actual |
327 | * payload. | 329 | * payload. |
diff --git a/toxav/rtp.h b/toxav/rtp.h index b6217d95..46cd6b86 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h | |||
@@ -122,7 +122,7 @@ struct RTPMessage { | |||
122 | struct RTPWorkBuffer { | 122 | struct RTPWorkBuffer { |
123 | /** | 123 | /** |
124 | * Whether this slot contains a key frame. This is true iff | 124 | * Whether this slot contains a key frame. This is true iff |
125 | * buf->header.flags & RTP_KEY_FRAME. | 125 | * `buf->header.flags & RTP_KEY_FRAME`. |
126 | */ | 126 | */ |
127 | bool is_keyframe; | 127 | bool is_keyframe; |
128 | /** | 128 | /** |
diff --git a/toxav/toxav_old.c b/toxav/toxav_old.c index 9ecc7969..e5cfbadc 100644 --- a/toxav/toxav_old.c +++ b/toxav/toxav_old.c | |||
@@ -17,9 +17,9 @@ | |||
17 | * return -1 on failure. | 17 | * return -1 on failure. |
18 | * | 18 | * |
19 | * Audio data callback format: | 19 | * Audio data callback format: |
20 | * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata) | 20 | * `audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)` |
21 | * | 21 | * |
22 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 22 | * Note that total size of pcm in bytes is equal to `(samples * channels * sizeof(int16_t))`. |
23 | */ | 23 | */ |
24 | int toxav_add_av_groupchat(Tox *tox, audio_data_cb *audio_callback, void *userdata) | 24 | int toxav_add_av_groupchat(Tox *tox, audio_data_cb *audio_callback, void *userdata) |
25 | { | 25 | { |
@@ -33,10 +33,10 @@ int toxav_add_av_groupchat(Tox *tox, audio_data_cb *audio_callback, void *userda | |||
33 | * returns group number on success | 33 | * returns group number on success |
34 | * returns -1 on failure. | 34 | * returns -1 on failure. |
35 | * | 35 | * |
36 | * Audio data callback format (same as the one for toxav_add_av_groupchat()): | 36 | * Audio data callback format (same as the one for `toxav_add_av_groupchat()`): |
37 | * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata) | 37 | * `audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)` |
38 | * | 38 | * |
39 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 39 | * Note that total size of pcm in bytes is equal to `(samples * channels * sizeof(int16_t))`. |
40 | */ | 40 | */ |
41 | int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data, uint16_t length, | 41 | int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data, uint16_t length, |
42 | audio_data_cb *audio_callback, void *userdata) | 42 | audio_data_cb *audio_callback, void *userdata) |
@@ -51,9 +51,9 @@ int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data | |||
51 | * return 0 on success. | 51 | * return 0 on success. |
52 | * return -1 on failure. | 52 | * return -1 on failure. |
53 | * | 53 | * |
54 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 54 | * Note that total size of pcm in bytes is equal to `(samples * channels * sizeof(int16_t))`. |
55 | * | 55 | * |
56 | * Valid number of samples are ((sample rate) * (audio length (Valid ones are: 2.5, 5, 10, 20, 40 or 60 ms)) / 1000) | 56 | * Valid number of samples are `((sample rate) * (audio length) / 1000)` (Valid values for audio length: 2.5, 5, 10, 20, 40 or 60 ms) |
57 | * Valid number of channels are 1 or 2. | 57 | * Valid number of channels are 1 or 2. |
58 | * Valid sample rates are 8000, 12000, 16000, 24000, or 48000. | 58 | * Valid sample rates are 8000, 12000, 16000, 24000, or 48000. |
59 | * | 59 | * |
@@ -81,9 +81,9 @@ int toxav_group_send_audio(Tox *tox, uint32_t groupnumber, const int16_t *pcm, u | |||
81 | * return -1 on failure. | 81 | * return -1 on failure. |
82 | * | 82 | * |
83 | * Audio data callback format (same as the one for toxav_add_av_groupchat()): | 83 | * Audio data callback format (same as the one for toxav_add_av_groupchat()): |
84 | * audio_callback(Tox *tox, uint32_t groupnumber, uint32_t peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, uint32_t sample_rate, void *userdata) | 84 | * `audio_callback(Tox *tox, uint32_t groupnumber, uint32_t peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, uint32_t sample_rate, void *userdata)` |
85 | * | 85 | * |
86 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 86 | * Note that total size of pcm in bytes is equal to `(samples * channels * sizeof(int16_t))`. |
87 | */ | 87 | */ |
88 | int toxav_groupchat_enable_av(Tox *tox, uint32_t groupnumber, audio_data_cb *audio_callback, void *userdata) | 88 | int toxav_groupchat_enable_av(Tox *tox, uint32_t groupnumber, audio_data_cb *audio_callback, void *userdata) |
89 | { | 89 | { |
diff --git a/toxav/video.c b/toxav/video.c index c6206bbf..7855f142 100644 --- a/toxav/video.c +++ b/toxav/video.c | |||
@@ -241,15 +241,16 @@ VCSession *vc_new(Mono_Time *mono_time, const Logger *log, ToxAV *av, uint32_t f | |||
241 | control function to set noise sensitivity | 241 | control function to set noise sensitivity |
242 | 0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive | 242 | 0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive |
243 | */ | 243 | */ |
244 | /* | 244 | #if 0 |
245 | rc = vpx_codec_control(vc->encoder, VP8E_SET_NOISE_SENSITIVITY, 2); | 245 | rc = vpx_codec_control(vc->encoder, VP8E_SET_NOISE_SENSITIVITY, 2); |
246 | 246 | ||
247 | if (rc != VPX_CODEC_OK) { | 247 | if (rc != VPX_CODEC_OK) { |
248 | LOGGER_ERROR(log, "Failed to set encoder control setting: %s", vpx_codec_err_to_string(rc)); | 248 | LOGGER_ERROR(log, "Failed to set encoder control setting: %s", vpx_codec_err_to_string(rc)); |
249 | vpx_codec_destroy(vc->encoder); | 249 | vpx_codec_destroy(vc->encoder); |
250 | goto BASE_CLEANUP_1; | 250 | goto BASE_CLEANUP_1; |
251 | } | 251 | } |
252 | */ | 252 | |
253 | #endif | ||
253 | vc->linfts = current_time_monotonic(mono_time); | 254 | vc->linfts = current_time_monotonic(mono_time); |
254 | vc->lcfd = 60; | 255 | vc->lcfd = 60; |
255 | vc->vcb = cb; | 256 | vc->vcb = cb; |