-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[janus-pp-rec] Enhance timestamp assignment and add payload-type option to CLI. #2345
Conversation
Pinging @tgabi333 as I know he uses mjr files a lot. |
Seems ok for me, thanks for letting me know |
What about JANUS_PPREC_IGNOREFIRST? |
That part is unchanged. |
I don't think the "ignore first" stuff is needed anymore with this fix. |
@atoppi do you think that "ignore first" could be dropped out as well with this pull request? |
@tgabi333 not in this PR. |
Merging. |
In
janus-pp-rec
the timestamp assigned to each packet is auint64
that is used to monotonically order the packets in a recording.This PR introduces a new algorithm in
janus-pp-rec
to assign packet timestamps in order to avoid erratic re-orderings that might lead to wrongly generated media files.Since today that part of
janus-pp-rec
has relied on the "post reset trigger" mechanism to avoid messing media files (e.g. huge files) when particular orderings of timestamps were present.This approach worked quite well so far but still it does not solve all corner cases. Furthermore it is in my opinion difficult to read, confusing to use and over-engineered.
This patch makes that mechanism more straightforward:
postreset-trigger
(you can not use it anymore in the CLI)It has been tested with some mjrs containing special cases (timestamp reset in the first packets, out of order packets near the wrap around etc.) and it seemed to work as expected.
UPDATE: this PR also includes the changes proposed in #2412.