-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ogg writer #50
Ogg writer #50
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
==========================================
+ Coverage 87.21% 88.03% +0.81%
==========================================
Files 19 23 +4
Lines 829 894 +65
==========================================
+ Hits 723 787 +64
- Misses 106 107 +1
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🎉
@@ -161,7 +161,7 @@ defmodule Peer do | |||
Process.send_after(self(), :send_audio_packet, duration) | |||
# values set to 0 are handled by PeerConnection.set_rtp | |||
rtp_packet = OpusPayloader.payload(packet) | |||
rtp_packet = %{rtp_packet | timestamp: state.last_audio_timestamp} | |||
rtp_packet = %{rtp_packet | timestamp: trunc(state.last_audio_timestamp)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this ever be non-integer? We calculate last_audio_timestamp as: last_audio_timestamp: state.last_audio_timestamp + timestamp_delta
where timestamp_delta is timestamp_delta = trunc(duration * 48_000 / 1000)
(so integer) and initial last_audio_timestamp is also integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is just temporary (duration from OggReader.next_packet
is now a float), I'll make sure there's no unnecessary truncs in the examples PR.
@@ -1,6 +1,6 @@ | |||
defmodule ExWebRTC.Media.OggReader do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have Ogg.Header and Ogg.Packet, it might be resonable to make everything the same in this PR (including IVF modules)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about the same, but all of the Ogg submodules are @moduledoc false
so from API'a standpoint, it's still consistent.
Adds the
OggWriter
and its tests.Example will be updated in the following Pull Request.