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

docs(toxav): fix docs of toxav.h #2754

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Green-Sky
Copy link
Member

@Green-Sky Green-Sky commented Apr 27, 2024

  • fix units to be correct (Kb/sec -> kbit/sec and fix video being actually Mbit/sec!)
  • use width before height consistently
  • video -> audio typo

This change is Reviewable

@Green-Sky Green-Sky changed the title fix docs of toxav.h docs(toxav): fix docs of toxav.h Apr 27, 2024
- fix units to be correct
- use width before height consistently
- video -> audio typo
@Green-Sky Green-Sky added this to the v0.2.20 milestone Apr 27, 2024
@Green-Sky Green-Sky requested a review from zoff99 April 27, 2024 10:16
@Green-Sky Green-Sky marked this pull request as ready for review April 27, 2024 10:29
toxav/toxav.h Show resolved Hide resolved
@zoff99
Copy link

zoff99 commented Apr 27, 2024

acutally "b" (lowercase b) always means bits.
so Kb is always Kilobit(s).
versus KB and KiB

@zoff99
Copy link

zoff99 commented Apr 27, 2024

and video bitrate is correct as Kb/s (kilo bits per second).
its multiplied by 1000 later because vpx codec needs the value as b/s (bits per second)

well i am still checking this. its been a long time. hold on a bit ...

@nurupo
Copy link
Member

nurupo commented Apr 27, 2024

zoff is right, Kb and kbit are the same unit, so that particular unit is not really being fixed, just reworded. I do support the change though, being more explicit/clear in the documentation and spelling it out is probably a good thing.

@Green-Sky
Copy link
Member Author

@zoff99 yea we multiply both audio and video rates by 1000, BUT vpx_encoder.h:

  /*!\brief Target data rate
   *
   * Target bitrate to use for this stream, in kilobits per second.
   */
  unsigned int rc_target_bitrate;

@zoff99
Copy link

zoff99 commented Apr 27, 2024

@zoff99 yea we multiply both audio and video rates by 1000, BUT vpx_encoder.h:

  /*!\brief Target data rate
   *
   * Target bitrate to use for this stream, in kilobits per second.
   */
  unsigned int rc_target_bitrate;

yeah thats why i say im still checking. in my forks i think its correct but let me actually check ...

@zoff99
Copy link

zoff99 commented Apr 27, 2024

yeah its wrong in toktok:

cfg.rc_target_bitrate = bit_rate;

but fixed in mine:

https://github.com/zoff99/c-toxcore/blob/3511870af9928c7d09a47f0196ccb0ed3f0e0e9c/toxav/codecs/vpx/codec.c#L490

cfg2.rc_target_bitrate = (bit_rate / 1000);

@Green-Sky
Copy link
Member Author

sidenote: opus changed, and the new meaningful lower bound for the bitrate is 0.5 ...

@zoff99
Copy link

zoff99 commented Apr 27, 2024

but in any case the toxav PR needs to be merged first. fixes of old bugs come only afterwards.
we made a roadmap and agreed on it to my recollection

@Green-Sky
Copy link
Member Author

@zoff99 do we preserve behavoir and adjust the comments (this pr as-is) or do we fix it and change behavior?

@Green-Sky
Copy link
Member Author

but in any case the toxav PR needs to be merged first. fixes of old bugs come only afterwards. we made a roadmap and agreed on it to my recollection

This pr has no conflicts with your pr, so that does not really matter, only if we change the code.

Also, someone needs to fix circle ci first ...

@zoff99
Copy link

zoff99 commented Apr 27, 2024

i would imagine we rebase and tweak this PR after toxav pr is merged.
what are the blockers now that the toxav PR can't be merged now-ish ? then lets address those, if any.

and which one is "the one" ?
#1431
#2651
(shrug)

@Green-Sky
Copy link
Member Author

and which one is "the one" ? #1431 #2651 (shrug)

Oh I did not even see the other. the newer one has no conflicts, so...

@Green-Sky Green-Sky marked this pull request as draft April 27, 2024 12:54
@Green-Sky
Copy link
Member Author

back to draft, until either toxav prs is merged.

@nurupo nurupo force-pushed the toxav_docs_fix1 branch 2 times, most recently from 1c68998 to 85d1761 Compare April 27, 2024 13:41
toxav/toxav.h Show resolved Hide resolved
@pull-request-attention pull-request-attention bot assigned iphydf and Green-Sky and unassigned Green-Sky May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants