Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2324 else | 2324 else |
| 2325 pause(); | 2325 pause(); |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 AudioTrackList& HTMLMediaElement::audioTracks() | 2328 AudioTrackList& HTMLMediaElement::audioTracks() |
| 2329 { | 2329 { |
| 2330 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 2330 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
| 2331 return *m_audioTracks; | 2331 return *m_audioTracks; |
| 2332 } | 2332 } |
| 2333 | 2333 |
| 2334 void HTMLMediaElement::audioTrackChanged() | 2334 void HTMLMediaElement::audioTrackChanged(WebMediaPlayer::TrackId trackId, bool e nabled) |
| 2335 { | 2335 { |
| 2336 WTF_LOG(Media, "HTMLMediaElement::audioTrackChanged(%p)", this); | 2336 WTF_LOG(Media, "HTMLMediaElement::audioTrackChanged(%p) trackId=%u enabled=% d", this, trackId, enabled ? 1 : 0); |
|
philipj_slow
2016/04/08 09:28:15
Just enabled without ternary expression does the s
servolk
2016/04/08 16:56:13
Done.
| |
| 2337 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 2337 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
| 2338 | 2338 |
| 2339 audioTracks().scheduleChangeEvent(); | 2339 audioTracks().scheduleChangeEvent(); |
| 2340 | 2340 |
| 2341 // FIXME: Add call on m_mediaSource to notify it of track changes once the S ourceBuffer.audioTracks attribute is added. | 2341 // FIXME: Add call on m_mediaSource to notify it of track changes once the S ourceBuffer.audioTracks attribute is added. |
| 2342 | 2342 |
| 2343 if (!m_audioTracksTimer.isActive()) | 2343 if (!m_audioTracksTimer.isActive()) |
| 2344 m_audioTracksTimer.startOneShot(0, BLINK_FROM_HERE); | 2344 m_audioTracksTimer.startOneShot(0, BLINK_FROM_HERE); |
| 2345 } | 2345 } |
| 2346 | 2346 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2382 } | 2382 } |
| 2383 | 2383 |
| 2384 VideoTrackList& HTMLMediaElement::videoTracks() | 2384 VideoTrackList& HTMLMediaElement::videoTracks() |
| 2385 { | 2385 { |
| 2386 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 2386 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
| 2387 return *m_videoTracks; | 2387 return *m_videoTracks; |
| 2388 } | 2388 } |
| 2389 | 2389 |
| 2390 void HTMLMediaElement::selectedVideoTrackChanged(WebMediaPlayer::TrackId* select edTrackId) | 2390 void HTMLMediaElement::selectedVideoTrackChanged(WebMediaPlayer::TrackId* select edTrackId) |
| 2391 { | 2391 { |
| 2392 WTF_LOG(Media, "HTMLMediaElement::selectedVideoTrackChanged(%p)", this); | 2392 WTF_LOG(Media, "HTMLMediaElement::selectedVideoTrackChanged(%p) selectedTrac kId=%s", this, (selectedTrackId ? String::format("%u", *selectedTrackId).ascii() .data() : "none")); |
|
philipj_slow
2016/04/08 09:28:15
Don't need the parenthesis around the last argumen
servolk
2016/04/08 16:56:13
Done.
| |
| 2393 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 2393 ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); |
| 2394 | 2394 |
| 2395 if (selectedTrackId) | 2395 if (selectedTrackId) |
| 2396 videoTracks().trackSelected(*selectedTrackId); | 2396 videoTracks().trackSelected(*selectedTrackId); |
| 2397 | 2397 |
| 2398 // FIXME: Add call on m_mediaSource to notify it of track changes once the S ourceBuffer.videoTracks attribute is added. | 2398 // FIXME: Add call on m_mediaSource to notify it of track changes once the S ourceBuffer.videoTracks attribute is added. |
| 2399 | 2399 |
| 2400 webMediaPlayer()->selectedVideoTrackChanged(selectedTrackId); | 2400 webMediaPlayer()->selectedVideoTrackChanged(selectedTrackId); |
| 2401 } | 2401 } |
| 2402 | 2402 |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3882 } | 3882 } |
| 3883 | 3883 |
| 3884 #if !ENABLE(OILPAN) | 3884 #if !ENABLE(OILPAN) |
| 3885 WeakPtr<HTMLMediaElement> HTMLMediaElement::createWeakPtr() | 3885 WeakPtr<HTMLMediaElement> HTMLMediaElement::createWeakPtr() |
| 3886 { | 3886 { |
| 3887 return m_weakPtrFactory.createWeakPtr(); | 3887 return m_weakPtrFactory.createWeakPtr(); |
| 3888 } | 3888 } |
| 3889 #endif | 3889 #endif |
| 3890 | 3890 |
| 3891 } // namespace blink | 3891 } // namespace blink |
| OLD | NEW |