|
|
Created:
5 years, 11 months ago by hubbe Modified:
5 years, 11 months ago CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse audio shifter instead of a fifo for local mediastream playback.
There are two reasons for this change:
1. The current code path doesn't work correctly if the media stream and the output devices clocks don't match up *exactly*. Underruns/lipsync issues can occur.
2. This allows for audio to be explicitly buffered for some period of time, which I plan to utilize in the cast_streaming receiver code.
Currently this code path is not often used, since it only happens when you get a media stream from getUserMedia and plug it into a media player without going through webrtc.
Committed: https://crrev.com/0650f24c76ebe1e30552f655c417668a1ba32518
Cr-Commit-Position: refs/heads/master@{#313193}
Patch Set 1 #
Total comments: 4
Patch Set 2 : comment added #
Messages
Total messages: 24 (9 generated)
hubbe@chromium.org changed reviewers: + hclam@google.com
hclam@chromium.org changed reviewers: + hclam@chromium.org - hclam@google.com
hclam@chromium.org changed reviewers: + henrika@chromium.org, perkj@chromium.org
I don't think I'm the best person to review this. Someone from WebRTC is a much better fit. Adding henrika@ and perkj@ to help. I have one comment about the CL description though. It should mention what project / area / class that it is changing. Also the rationale of making this change.
hubbe@chromium.org changed reviewers: + dalecurtis@chromium.org
Thanks hubbe. As you say, this code is not essential for the WebRTC stack today but we have one demo that you can try out: http://googlechrome.github.io/webrtc/samples/web/content/getusermedia/audio/. It all looks good to me but I would like to understand some more about what the audio shifter does and how it was tuned here. I am OK as is and can say LGTM but would still appreciate some more details to learn and understand better.
https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... File content/renderer/media/webrtc_local_audio_renderer.cc (right): https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... content/renderer/media/webrtc_local_audio_renderer.cc:44: audio_shifter_->Pull( What effect does the provided time value have here? https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... content/renderer/media/webrtc_local_audio_renderer.cc:285: media::AudioShifter* const new_shifter = new media::AudioShifter( It is not clear to me why you use 2 and 20 here. Care to comment about who they were selected?
https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... File content/renderer/media/webrtc_local_audio_renderer.cc (right): https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... content/renderer/media/webrtc_local_audio_renderer.cc:44: audio_shifter_->Pull( On 2015/01/21 08:54:38, henrika wrote: > What effect does the provided time value have here? The audio shifter tries to provide audio for the given timestamp. There is a fair amount of comments in audio_shifter.h, but the gist of it is that Push() can specify exactly when a piece of audio should be played, and Pull() can specify when it intends to play the pulled audio and audio shifter will take care of doing the right amount of buffering/stretching. If Push() uses timestamps that are int he past, audio shifter tries to use the smallest amount of buffering it can that will still result in smooth playout. https://codereview.chromium.org/856843002/diff/1/content/renderer/media/webrt... content/renderer/media/webrtc_local_audio_renderer.cc:285: media::AudioShifter* const new_shifter = new media::AudioShifter( On 2015/01/21 08:54:38, henrika wrote: > It is not clear to me why you use 2 and 20 here. Care to comment about who they > were selected? 2 was selected because we need at least 1 second for cast. Note that if push timestamps are in the past, a minimal buffer will be used regardless of this argument The 20 millseconds comes from the fact that windows clocks tend to have a 15 millsecond accuracy. (Comment added)
Should have checked the AudioShifter header. Looks like great work, thanks!
The CQ bit was checked by hubbe@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/856843002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
On 2015/01/23 08:37:37, henrika wrote: > Should have checked the AudioShifter header. Looks like great work, thanks! Still needs OWNER approval, dale?
rs lgtm
The CQ bit was checked by hubbe@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/856843002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by hubbe@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/856843002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/0650f24c76ebe1e30552f655c417668a1ba32518 Cr-Commit-Position: refs/heads/master@{#313193} |