diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 20:50:44 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 20:50:44 +0000 |
commit | 0ac64c98bc6f6015a833ce9297bd57138ce9eb2d (patch) | |
tree | e51ba399c4ab5a06dde0368826de529ff68f8cac /chrome | |
parent | 842ffc55330e73a0a33ec9ea8facced86b348de5 (diff) | |
download | chromium_src-0ac64c98bc6f6015a833ce9297bd57138ce9eb2d.zip chromium_src-0ac64c98bc6f6015a833ce9297bd57138ce9eb2d.tar.gz chromium_src-0ac64c98bc6f6015a833ce9297bd57138ce9eb2d.tar.bz2 |
Ignore errors about creating audio output stream
Instead of failing the media playback pipeline
completely, this change will ignores all errors
reported by the browser about audio output streams.
This is the first step towards handling audio hardware
errors.
TEST=MediaTest.VideoBearTheora
Review URL: http://codereview.chromium.org/159205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/media_uitest.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.cc | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/media_uitest.cc b/chrome/browser/media_uitest.cc index 41b949c..60360e6 100644 --- a/chrome/browser/media_uitest.cc +++ b/chrome/browser/media_uitest.cc @@ -50,10 +50,8 @@ class MediaTest : public UITest { // <video> and <audio> only works stably on Windows. #if defined(OS_WIN) -// TODO(hclam): The following test is disabled because it contains audio and -// this test doesn't work with audio device. -TEST_F(MediaTest, DISABLED_VideoBearH264) { - PlayVideo("bear.mp4"); +TEST_F(MediaTest, VideoBearTheora) { + PlayVideo("bear.ogv"); } TEST_F(MediaTest, VideoBearSilentTheora) { diff --git a/chrome/renderer/media/audio_renderer_impl.cc b/chrome/renderer/media/audio_renderer_impl.cc index c64c432..6af48a0 100644 --- a/chrome/renderer/media/audio_renderer_impl.cc +++ b/chrome/renderer/media/audio_renderer_impl.cc @@ -194,7 +194,11 @@ void AudioRendererImpl::OnStateChanged(AudioOutputStream::State state, switch (state) { case AudioOutputStream::STATE_ERROR: - host()->SetError(media::PIPELINE_ERROR_AUDIO_HARDWARE); + // We receive this error if we counter an hardware error on the browser + // side. We can proceed with ignoring the audio stream. + // TODO(hclam): We need more handling of these kind of error. For example + // re-try creating the audio output stream on the browser side or fail + // nicely and report to demuxer that the whole audio stream is discarded. break; // TODO(hclam): handle these events. case AudioOutputStream::STATE_STARTED: |