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
"A MediaStreamTrack ended due to a capture failure" when selecting bluetooth headphones as audio input device #5855
"A MediaStreamTrack ended due to a capture failure" when selecting bluetooth headphones as audio input device #5855
Conversation
EWS run on previous version of this PR (hash 1cf874b) |
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.
r=me
http/wpt/webcodecs [ Skip ] | ||
imported/w3c/web-platform-tests/webcodecs [ Skip ] | ||
|
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.
Did you mean to include this?
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.
Nope, will remove
await new Promise(resolve => setTimeout(resolve, 2000)); | ||
assert_equals(track.readyState, "live"); |
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.
Rather than always waiting for two seconds, when most of the time that is much too long and sometimes it will be too short, it might be better to poll the attribute and fail if it doesn't change after some longer time.
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.
Here, we need to wait for the verification timer to kick in, so we need to wait 1 second.
I put 2 seconds just in case.
After 2 seconds, if the track is still live, we have recovered properly.
1cf874b
to
76813f1
Compare
EWS run on previous version of this PR (hash 76813f1) |
76813f1
to
0525aa9
Compare
EWS run on current version of this PR (hash 0525aa9) |
β¦uetooth headphones as audio input device https://bugs.webkit.org/show_bug.cgi?id=247119 rdar://problem/101628857 Reviewed by Eric Carlson. Replace the boolean to update the sample buffer by a minimum buffer sample frames, which is set when render fails. This minimum buffer sample frames is used to compute a minimum buffer size when setting up the audio unit. Update Mock implementation to cover that case. We do this by triggering this code path when triggerMockMicrophoneConfigurationChange is called. We also update the capture verification timer so that timer for mock unit is reduced to 1 second. Update LayoutTests/fast/mediastream/mediastreamtrack-configurationchange.html to cover that case. * LayoutTests/fast/mediastream/mediastreamtrack-configurationchange.html: * Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp: (WebCore::CoreAudioSharedUnit::configureMicrophoneProc): (WebCore::CoreAudioSharedUnit::processMicrophoneSamples): (WebCore::CoreAudioSharedUnit::startInternal): (WebCore::CoreAudioSharedUnit::isProducingMicrophoneSamplesChanged): * Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h: * Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h: * Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm: (WebCore::MockAudioSharedUnit::singleton): (WebCore::MockAudioSharedUnit::increaseBufferSize): (WebCore::MockAudioSharedInternalUnit::emitSampleBuffers): (WebCore::MockAudioSharedInternalUnit::render): * Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp: (WebCore::MockRealtimeMediaSourceCenter::triggerMockMicrophoneConfigurationChange): Canonical link: https://commits.webkit.org/256091@main
0525aa9
to
b818b25
Compare
Committed 256091@main (b818b25): https://commits.webkit.org/256091@main Reviewed commits have been landed. Closing PR #5855 and removing active labels. |
b818b25
0525aa9
π wincairoπ§ͺ ios-wk2π§ͺ gtk-wk2π§ͺ api-macπ§ͺ api-gtkπ§ͺ mac-wk1π§ͺ mac-AS-debug-wk2