| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "WebMediaPlayerClientImpl.h" | 6 #include "WebMediaPlayerClientImpl.h" |
| 7 | 7 |
| 8 #include "InbandTextTrackPrivateImpl.h" | 8 #include "InbandTextTrackPrivateImpl.h" |
| 9 #include "WebAudioSourceProvider.h" | 9 #include "WebAudioSourceProvider.h" |
| 10 #include "WebDocument.h" | 10 #include "WebDocument.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlay
er's WebAudioSourceProvider. | 233 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlay
er's WebAudioSourceProvider. |
| 234 #endif | 234 #endif |
| 235 m_webMediaPlayer.clear(); | 235 m_webMediaPlayer.clear(); |
| 236 m_delayingLoad = true; | 236 m_delayingLoad = true; |
| 237 } else | 237 } else |
| 238 loadInternal(); | 238 loadInternal(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void WebMediaPlayerClientImpl::loadInternal() | 241 void WebMediaPlayerClientImpl::loadInternal() |
| 242 { | 242 { |
| 243 m_isMediaStream = !(WebCore::MediaStreamRegistry::registry().lookupWebMediaS
tream(m_url.string()).isNull()); | 243 m_isMediaStream = WebCore::MediaStreamRegistry::registry().lookupMediaStream
Descriptor(m_url.string()); |
| 244 | 244 |
| 245 #if ENABLE(WEB_AUDIO) | 245 #if ENABLE(WEB_AUDIO) |
| 246 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's
WebAudioSourceProvider. | 246 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's
WebAudioSourceProvider. |
| 247 #endif | 247 #endif |
| 248 | 248 |
| 249 // FIXME: Remove this cast | 249 // FIXME: Remove this cast |
| 250 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document()->frame()
; | 250 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document()->frame()
; |
| 251 | 251 |
| 252 // This does not actually check whether the hardware can support accelerated | 252 // This does not actually check whether the hardware can support accelerated |
| 253 // compositing, but only if the flag is set. However, this is checked lazily | 253 // compositing, but only if the flag is set. However, this is checked lazily |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 730 |
| 731 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) | 731 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) |
| 732 { | 732 { |
| 733 if (m_client) | 733 if (m_client) |
| 734 m_client->setFormat(numberOfChannels, sampleRate); | 734 m_client->setFormat(numberOfChannels, sampleRate); |
| 735 } | 735 } |
| 736 | 736 |
| 737 #endif | 737 #endif |
| 738 | 738 |
| 739 } // namespace WebKit | 739 } // namespace WebKit |
| OLD | NEW |