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 #if ENABLE(VIDEO) | 8 #if ENABLE(VIDEO) |
9 | 9 |
10 #include "TemporaryGlue.h" | 10 #include "TemporaryGlue.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 | 370 |
371 void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes) | 371 void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes) |
372 { | 372 { |
373 // FIXME: integrate this list with WebMediaPlayerClientImpl::supportsType. | 373 // FIXME: integrate this list with WebMediaPlayerClientImpl::supportsType. |
374 notImplemented(); | 374 notImplemented(); |
375 } | 375 } |
376 | 376 |
377 MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type, | 377 MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type, |
378 const String& codecs) | 378 const String& codecs) |
379 { | 379 { |
380 // FIXME: respect codecs, now we only check for mime-type. | 380 WebMimeRegistry::SupportsType supportsType = |
381 if (webKitClient()->mimeRegistry()->supportsMediaMIMEType(type)) | 381 webKitClient()->mimeRegistry()->supportsMediaMIMEType(type, codecs); |
382 return MediaPlayer::IsSupported; | 382 |
383 return MediaPlayer::IsNotSupported; | 383 switch (supportsType) { |
| 384 case WebMimeRegistry::IsNotSupported: |
| 385 return MediaPlayer::IsNotSupported; |
| 386 case WebMimeRegistry::IsSupported: |
| 387 return MediaPlayer::IsSupported; |
| 388 case WebMimeRegistry::MayBeSupported: |
| 389 return MediaPlayer::MayBeSupported; |
| 390 } |
384 } | 391 } |
385 | 392 |
386 WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() | 393 WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() |
387 : m_mediaPlayer(0) | 394 : m_mediaPlayer(0) |
388 { | 395 { |
389 } | 396 } |
390 | 397 |
391 } // namespace WebKit | 398 } // namespace WebKit |
392 | 399 |
393 #endif // ENABLE(VIDEO) | 400 #endif // ENABLE(VIDEO) |
OLD | NEW |