Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: Source/WebCore/html/HTMLMediaElement.cpp

Issue 13674022: Remove MEDIA_SOURCE feature define. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@blink-master
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/HTMLMediaElement.h ('k') | Source/WebCore/html/PublicURLManager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "MediaController.h" 57 #include "MediaController.h"
58 #include "MediaControls.h" 58 #include "MediaControls.h"
59 #include "MediaDocument.h" 59 #include "MediaDocument.h"
60 #include "MediaError.h" 60 #include "MediaError.h"
61 #include "MediaFragmentURIParser.h" 61 #include "MediaFragmentURIParser.h"
62 #include "MediaKeyError.h" 62 #include "MediaKeyError.h"
63 #include "MediaKeyEvent.h" 63 #include "MediaKeyEvent.h"
64 #include "MediaList.h" 64 #include "MediaList.h"
65 #include "MediaPlayer.h" 65 #include "MediaPlayer.h"
66 #include "MediaQueryEvaluator.h" 66 #include "MediaQueryEvaluator.h"
67 #include "MediaSource.h"
68 #include "MediaSourceRegistry.h"
67 #include "MouseEvent.h" 69 #include "MouseEvent.h"
68 #include "MIMETypeRegistry.h" 70 #include "MIMETypeRegistry.h"
69 #include "NodeRenderingContext.h" 71 #include "NodeRenderingContext.h"
70 #include "Page.h" 72 #include "Page.h"
71 #include "PageGroup.h" 73 #include "PageGroup.h"
72 #include "RenderVideo.h" 74 #include "RenderVideo.h"
73 #include "RenderView.h" 75 #include "RenderView.h"
74 #include "ScriptController.h" 76 #include "ScriptController.h"
75 #include "ScriptEventListener.h" 77 #include "ScriptEventListener.h"
76 #include "SecurityOrigin.h" 78 #include "SecurityOrigin.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 110
109 #if ENABLE(WEB_AUDIO) 111 #if ENABLE(WEB_AUDIO)
110 #include "AudioSourceProvider.h" 112 #include "AudioSourceProvider.h"
111 #include "MediaElementAudioSourceNode.h" 113 #include "MediaElementAudioSourceNode.h"
112 #endif 114 #endif
113 115
114 #if PLATFORM(MAC) 116 #if PLATFORM(MAC)
115 #include "DisplaySleepDisabler.h" 117 #include "DisplaySleepDisabler.h"
116 #endif 118 #endif
117 119
118 #if ENABLE(MEDIA_SOURCE)
119 #include "MediaSource.h"
120 #include "MediaSourceRegistry.h"
121 #endif
122
123 #if ENABLE(MEDIA_STREAM) 120 #if ENABLE(MEDIA_STREAM)
124 #include "MediaStreamRegistry.h" 121 #include "MediaStreamRegistry.h"
125 #endif 122 #endif
126 123
127 #if ENABLE(ENCRYPTED_MEDIA_V2) 124 #if ENABLE(ENCRYPTED_MEDIA_V2)
128 #include "MediaKeyNeededEvent.h" 125 #include "MediaKeyNeededEvent.h"
129 #include "MediaKeys.h" 126 #include "MediaKeys.h"
130 #endif 127 #endif
131 128
132 #if USE(PLATFORM_TEXT_TRACK_MENU) 129 #if USE(PLATFORM_TEXT_TRACK_MENU)
(...skipping 25 matching lines...) Expand all
158 // the logging. 155 // the logging.
159 #define LOG_MEDIA_EVENTS 0 156 #define LOG_MEDIA_EVENTS 0
160 #endif 157 #endif
161 158
162 #ifndef LOG_CACHED_TIME_WARNINGS 159 #ifndef LOG_CACHED_TIME_WARNINGS
163 // Default to not logging warnings about excessive drift in the cached media tim e because it adds a 160 // Default to not logging warnings about excessive drift in the cached media tim e because it adds a
164 // fair amount of overhead and logging. 161 // fair amount of overhead and logging.
165 #define LOG_CACHED_TIME_WARNINGS 0 162 #define LOG_CACHED_TIME_WARNINGS 0
166 #endif 163 #endif
167 164
168 #if ENABLE(MEDIA_SOURCE)
169 // URL protocol used to signal that the media source API is being used. 165 // URL protocol used to signal that the media source API is being used.
170 static const char* mediaSourceBlobProtocol = "blob"; 166 static const char* mediaSourceBlobProtocol = "blob";
171 #endif
172 167
173 using namespace HTMLNames; 168 using namespace HTMLNames;
174 using namespace std; 169 using namespace std;
175 170
176 typedef HashMap<Document*, HashSet<HTMLMediaElement*> > DocumentElementSetMap; 171 typedef HashMap<Document*, HashSet<HTMLMediaElement*> > DocumentElementSetMap;
177 static DocumentElementSetMap& documentToElementSetMap() 172 static DocumentElementSetMap& documentToElementSetMap()
178 { 173 {
179 DEFINE_STATIC_LOCAL(DocumentElementSetMap, map, ()); 174 DEFINE_STATIC_LOCAL(DocumentElementSetMap, map, ());
180 return map; 175 return map;
181 } 176 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 m_textTracks->clearOwner(); 327 m_textTracks->clearOwner();
333 if (m_textTracks) { 328 if (m_textTracks) {
334 for (unsigned i = 0; i < m_textTracks->length(); ++i) 329 for (unsigned i = 0; i < m_textTracks->length(); ++i)
335 m_textTracks->item(i)->clearClient(); 330 m_textTracks->item(i)->clearClient();
336 } 331 }
337 #endif 332 #endif
338 333
339 if (m_mediaController) 334 if (m_mediaController)
340 m_mediaController->removeMediaElement(this); 335 m_mediaController->removeMediaElement(this);
341 336
342 #if ENABLE(MEDIA_SOURCE)
343 setSourceState(MediaSource::closedKeyword()); 337 setSourceState(MediaSource::closedKeyword());
344 #endif
345 338
346 #if ENABLE(ENCRYPTED_MEDIA_V2) 339 #if ENABLE(ENCRYPTED_MEDIA_V2)
347 setMediaKeys(0); 340 setMediaKeys(0);
348 #endif 341 #endif
349 342
350 removeElementFromDocumentMap(this, document()); 343 removeElementFromDocumentMap(this, document());
351 344
352 m_completelyLoaded = true; 345 m_completelyLoaded = true;
353 clearMediaPlayer(-1); 346 clearMediaPlayer(-1);
354 } 347 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 736
744 // 2 - If there are any tasks from the media element's media element event t ask source in 737 // 2 - If there are any tasks from the media element's media element event t ask source in
745 // one of the task queues, then remove those tasks. 738 // one of the task queues, then remove those tasks.
746 cancelPendingEventsAndCallbacks(); 739 cancelPendingEventsAndCallbacks();
747 740
748 // 3 - If the media element's networkState is set to NETWORK_LOADING or NETW ORK_IDLE, queue 741 // 3 - If the media element's networkState is set to NETWORK_LOADING or NETW ORK_IDLE, queue
749 // a task to fire a simple event named abort at the media element. 742 // a task to fire a simple event named abort at the media element.
750 if (m_networkState == NETWORK_LOADING || m_networkState == NETWORK_IDLE) 743 if (m_networkState == NETWORK_LOADING || m_networkState == NETWORK_IDLE)
751 scheduleEvent(eventNames().abortEvent); 744 scheduleEvent(eventNames().abortEvent);
752 745
753 #if ENABLE(MEDIA_SOURCE)
754 setSourceState(MediaSource::closedKeyword()); 746 setSourceState(MediaSource::closedKeyword());
755 #endif
756 747
757 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO) 748 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
758 createMediaPlayer(); 749 createMediaPlayer();
759 #else 750 #else
760 if (m_player) 751 if (m_player)
761 m_player->cancelLoad(); 752 m_player->cancelLoad();
762 else 753 else
763 createMediaPlayerProxy(); 754 createMediaPlayerProxy();
764 #endif 755 #endif
765 756
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 setDisplayMode(Unknown); 975 setDisplayMode(Unknown);
985 976
986 if (!autoplay()) 977 if (!autoplay())
987 m_player->setPreload(m_preload); 978 m_player->setPreload(m_preload);
988 m_player->setPreservesPitch(m_webkitPreservesPitch); 979 m_player->setPreservesPitch(m_webkitPreservesPitch);
989 980
990 if (fastHasAttribute(mutedAttr)) 981 if (fastHasAttribute(mutedAttr))
991 m_muted = true; 982 m_muted = true;
992 updateVolume(); 983 updateVolume();
993 984
994 #if ENABLE(MEDIA_SOURCE)
995 ASSERT(!m_mediaSource); 985 ASSERT(!m_mediaSource);
996 986
997 if (url.protocolIs(mediaSourceBlobProtocol)) 987 if (url.protocolIs(mediaSourceBlobProtocol))
998 m_mediaSource = MediaSourceRegistry::registry().lookupMediaSource(url.st ring()); 988 m_mediaSource = MediaSourceRegistry::registry().lookupMediaSource(url.st ring());
999 989
1000 if (m_mediaSource) { 990 if (m_mediaSource) {
1001 if (!m_player->load(url, m_mediaSource)) 991 if (!m_player->load(url, m_mediaSource))
1002 mediaLoadingFailed(MediaPlayer::FormatError); 992 mediaLoadingFailed(MediaPlayer::FormatError);
1003 } else 993 } else if (!m_player->load(url, contentType, keySystem)) {
1004 #endif
1005 if (!m_player->load(url, contentType, keySystem))
1006 mediaLoadingFailed(MediaPlayer::FormatError); 994 mediaLoadingFailed(MediaPlayer::FormatError);
995 }
1007 996
1008 // If there is no poster to display, allow the media engine to render video frames as soon as 997 // If there is no poster to display, allow the media engine to render video frames as soon as
1009 // they are available. 998 // they are available.
1010 updateDisplayState(); 999 updateDisplayState();
1011 1000
1012 if (renderer()) 1001 if (renderer())
1013 renderer()->updateFromElement(); 1002 renderer()->updateFromElement();
1014 } 1003 }
1015 1004
1016 #if ENABLE(VIDEO_TRACK) 1005 #if ENABLE(VIDEO_TRACK)
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED); 1472 m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
1484 1473
1485 // 6.2 - Forget the media element's media-resource-specific text tracks. 1474 // 6.2 - Forget the media element's media-resource-specific text tracks.
1486 1475
1487 // 6.3 - Set the element's networkState attribute to the NETWORK_NO_SOURCE v alue. 1476 // 6.3 - Set the element's networkState attribute to the NETWORK_NO_SOURCE v alue.
1488 m_networkState = NETWORK_NO_SOURCE; 1477 m_networkState = NETWORK_NO_SOURCE;
1489 1478
1490 // 7 - Queue a task to fire a simple event named error at the media element. 1479 // 7 - Queue a task to fire a simple event named error at the media element.
1491 scheduleEvent(eventNames().errorEvent); 1480 scheduleEvent(eventNames().errorEvent);
1492 1481
1493 #if ENABLE(MEDIA_SOURCE)
1494 setSourceState(MediaSource::closedKeyword()); 1482 setSourceState(MediaSource::closedKeyword());
1495 #endif
1496 1483
1497 // 8 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event. 1484 // 8 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event.
1498 setShouldDelayLoadEvent(false); 1485 setShouldDelayLoadEvent(false);
1499 1486
1500 // 9 - Abort these steps. Until the load() method is invoked or the src attr ibute is changed, 1487 // 9 - Abort these steps. Until the load() method is invoked or the src attr ibute is changed,
1501 // the element won't attempt to load another resource. 1488 // the element won't attempt to load another resource.
1502 1489
1503 updateDisplayState(); 1490 updateDisplayState();
1504 1491
1505 if (renderer()) 1492 if (renderer())
1506 renderer()->updateFromElement(); 1493 renderer()->updateFromElement();
1507 } 1494 }
1508 1495
1509 void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err) 1496 void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err)
1510 { 1497 {
1511 LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(err->c ode())); 1498 LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(err->c ode()));
1512 1499
1513 // 1 - The user agent should cancel the fetching process. 1500 // 1 - The user agent should cancel the fetching process.
1514 stopPeriodicTimers(); 1501 stopPeriodicTimers();
1515 m_loadState = WaitingForSource; 1502 m_loadState = WaitingForSource;
1516 1503
1517 // 2 - Set the error attribute to a new MediaError object whose code attribu te is 1504 // 2 - Set the error attribute to a new MediaError object whose code attribu te is
1518 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. 1505 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE.
1519 m_error = err; 1506 m_error = err;
1520 1507
1521 // 3 - Queue a task to fire a simple event named error at the media element. 1508 // 3 - Queue a task to fire a simple event named error at the media element.
1522 scheduleEvent(eventNames().errorEvent); 1509 scheduleEvent(eventNames().errorEvent);
1523 1510
1524 #if ENABLE(MEDIA_SOURCE)
1525 setSourceState(MediaSource::closedKeyword()); 1511 setSourceState(MediaSource::closedKeyword());
1526 #endif
1527 1512
1528 // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value a nd queue a 1513 // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value a nd queue a
1529 // task to fire a simple event called emptied at the element. 1514 // task to fire a simple event called emptied at the element.
1530 m_networkState = NETWORK_EMPTY; 1515 m_networkState = NETWORK_EMPTY;
1531 scheduleEvent(eventNames().emptiedEvent); 1516 scheduleEvent(eventNames().emptiedEvent);
1532 1517
1533 // 5 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event. 1518 // 5 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event.
1534 setShouldDelayLoadEvent(false); 1519 setShouldDelayLoadEvent(false);
1535 1520
1536 // 6 - Abort the overall resource selection algorithm. 1521 // 6 - Abort the overall resource selection algorithm.
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 // seekable attribute, then let it be the position in one of the ranges give n in the seekable attribute 2007 // seekable attribute, then let it be the position in one of the ranges give n in the seekable attribute
2023 // that is the nearest to the new playback position. ... If there are no ran ges given in the seekable 2008 // that is the nearest to the new playback position. ... If there are no ran ges given in the seekable
2024 // attribute then set the seeking IDL attribute to false and abort these ste ps. 2009 // attribute then set the seeking IDL attribute to false and abort these ste ps.
2025 RefPtr<TimeRanges> seekableRanges = seekable(); 2010 RefPtr<TimeRanges> seekableRanges = seekable();
2026 2011
2027 // Short circuit seeking to the current time by just firing the events if no seek is required. 2012 // Short circuit seeking to the current time by just firing the events if no seek is required.
2028 // Don't skip calling the media engine if we are in poster mode because a se ek should always 2013 // Don't skip calling the media engine if we are in poster mode because a se ek should always
2029 // cancel poster display. 2014 // cancel poster display.
2030 bool noSeekRequired = !seekableRanges->length() || (time == now && displayMo de() != Poster); 2015 bool noSeekRequired = !seekableRanges->length() || (time == now && displayMo de() != Poster);
2031 2016
2032 #if ENABLE(MEDIA_SOURCE)
2033 // Always notify the media engine of a seek if the source is not closed. Thi s ensures that the source is 2017 // Always notify the media engine of a seek if the source is not closed. Thi s ensures that the source is
2034 // always in a flushed state when the 'seeking' event fires. 2018 // always in a flushed state when the 'seeking' event fires.
2035 if (m_mediaSource && m_mediaSource->readyState() != MediaSource::closedKeywo rd()) 2019 if (m_mediaSource && m_mediaSource->readyState() != MediaSource::closedKeywo rd())
2036 noSeekRequired = false; 2020 noSeekRequired = false;
2037 #endif
2038 2021
2039 if (noSeekRequired) { 2022 if (noSeekRequired) {
2040 if (time == now) { 2023 if (time == now) {
2041 scheduleEvent(eventNames().seekingEvent); 2024 scheduleEvent(eventNames().seekingEvent);
2042 scheduleTimeupdateEvent(false); 2025 scheduleTimeupdateEvent(false);
2043 scheduleEvent(eventNames().seekedEvent); 2026 scheduleEvent(eventNames().seekedEvent);
2044 } 2027 }
2045 m_seeking = false; 2028 m_seeking = false;
2046 return; 2029 return;
2047 } 2030 }
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 2372
2390 if (!m_paused) { 2373 if (!m_paused) {
2391 m_paused = true; 2374 m_paused = true;
2392 scheduleTimeupdateEvent(false); 2375 scheduleTimeupdateEvent(false);
2393 scheduleEvent(eventNames().pauseEvent); 2376 scheduleEvent(eventNames().pauseEvent);
2394 } 2377 }
2395 2378
2396 updatePlayState(); 2379 updatePlayState();
2397 } 2380 }
2398 2381
2399 #if ENABLE(MEDIA_SOURCE)
2400 void HTMLMediaElement::setSourceState(const String& state) 2382 void HTMLMediaElement::setSourceState(const String& state)
2401 { 2383 {
2402 if (!m_mediaSource) 2384 if (!m_mediaSource)
2403 return; 2385 return;
2404 2386
2405 m_mediaSource->setReadyState(state); 2387 m_mediaSource->setReadyState(state);
2406 if (state == MediaSource::closedKeyword()) 2388 if (state == MediaSource::closedKeyword())
2407 m_mediaSource = 0; 2389 m_mediaSource = 0;
2408 } 2390 }
2409 #endif
2410 2391
2411 #if ENABLE(ENCRYPTED_MEDIA) 2392 #if ENABLE(ENCRYPTED_MEDIA)
2412 void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, PassRef Ptr<Uint8Array> initData, ExceptionCode& ec) 2393 void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, PassRef Ptr<Uint8Array> initData, ExceptionCode& ec)
2413 { 2394 {
2414 #if ENABLE(ENCRYPTED_MEDIA_V2) 2395 #if ENABLE(ENCRYPTED_MEDIA_V2)
2415 static bool firstTime = true; 2396 static bool firstTime = true;
2416 if (firstTime && scriptExecutionContext()) { 2397 if (firstTime && scriptExecutionContext()) {
2417 scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMess ageLevel, "'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Use 'Me diaKeys.createSession()' instead."); 2398 scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMess ageLevel, "'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Use 'Me diaKeys.createSession()' instead.");
2418 firstTime = false; 2399 firstTime = false;
2419 } 2400 }
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3801 3782
3802 // 1 - The user agent should cancel the fetching process. 3783 // 1 - The user agent should cancel the fetching process.
3803 clearMediaPlayer(-1); 3784 clearMediaPlayer(-1);
3804 3785
3805 // 2 - Set the error attribute to a new MediaError object whose code attribu te is set to MEDIA_ERR_ABORTED. 3786 // 2 - Set the error attribute to a new MediaError object whose code attribu te is set to MEDIA_ERR_ABORTED.
3806 m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED); 3787 m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
3807 3788
3808 // 3 - Queue a task to fire a simple event named error at the media element. 3789 // 3 - Queue a task to fire a simple event named error at the media element.
3809 scheduleEvent(eventNames().abortEvent); 3790 scheduleEvent(eventNames().abortEvent);
3810 3791
3811 #if ENABLE(MEDIA_SOURCE)
3812 setSourceState(MediaSource::closedKeyword()); 3792 setSourceState(MediaSource::closedKeyword());
3813 #endif
3814 3793
3815 // 4 - If the media element's readyState attribute has a value equal to HAVE _NOTHING, set the 3794 // 4 - If the media element's readyState attribute has a value equal to HAVE _NOTHING, set the
3816 // element's networkState attribute to the NETWORK_EMPTY value and queue a t ask to fire a 3795 // element's networkState attribute to the NETWORK_EMPTY value and queue a t ask to fire a
3817 // simple event named emptied at the element. Otherwise, set the element's n etworkState 3796 // simple event named emptied at the element. Otherwise, set the element's n etworkState
3818 // attribute to the NETWORK_IDLE value. 3797 // attribute to the NETWORK_IDLE value.
3819 if (m_readyState == HAVE_NOTHING) { 3798 if (m_readyState == HAVE_NOTHING) {
3820 m_networkState = NETWORK_EMPTY; 3799 m_networkState = NETWORK_EMPTY;
3821 scheduleEvent(eventNames().emptiedEvent); 3800 scheduleEvent(eventNames().emptiedEvent);
3822 } 3801 }
3823 else 3802 else
(...skipping 22 matching lines...) Expand all
3846 m_platformMenu = 0; 3825 m_platformMenu = 0;
3847 } 3826 }
3848 #endif 3827 #endif
3849 3828
3850 #if ENABLE(VIDEO_TRACK) 3829 #if ENABLE(VIDEO_TRACK)
3851 removeAllInbandTracks(); 3830 removeAllInbandTracks();
3852 #endif 3831 #endif
3853 3832
3854 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO) 3833 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
3855 3834
3856 #if ENABLE(MEDIA_SOURCE)
3857 setSourceState(MediaSource::closedKeyword()); 3835 setSourceState(MediaSource::closedKeyword());
3858 #endif
3859 3836
3860 m_player.clear(); 3837 m_player.clear();
3861 #endif 3838 #endif
3862 stopPeriodicTimers(); 3839 stopPeriodicTimers();
3863 m_loadTimer.stop(); 3840 m_loadTimer.stop();
3864 3841
3865 m_pendingActionFlags &= ~flags; 3842 m_pendingActionFlags &= ~flags;
3866 m_loadState = WaitingForSource; 3843 m_loadState = WaitingForSource;
3867 3844
3868 #if ENABLE(VIDEO_TRACK) 3845 #if ENABLE(VIDEO_TRACK)
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
4438 return 0; 4415 return 0;
4439 } 4416 }
4440 4417
4441 void HTMLMediaElement::createMediaPlayer() 4418 void HTMLMediaElement::createMediaPlayer()
4442 { 4419 {
4443 #if ENABLE(WEB_AUDIO) 4420 #if ENABLE(WEB_AUDIO)
4444 if (m_audioSourceNode) 4421 if (m_audioSourceNode)
4445 m_audioSourceNode->lock(); 4422 m_audioSourceNode->lock();
4446 #endif 4423 #endif
4447 4424
4448 #if ENABLE(MEDIA_SOURCE)
4449 if (m_mediaSource) 4425 if (m_mediaSource)
4450 m_mediaSource->setReadyState(MediaSource::closedKeyword()); 4426 m_mediaSource->setReadyState(MediaSource::closedKeyword());
4451 #endif
4452 4427
4453 m_player = MediaPlayer::create(this); 4428 m_player = MediaPlayer::create(this);
4454 4429
4455 #if ENABLE(WEB_AUDIO) 4430 #if ENABLE(WEB_AUDIO)
4456 if (m_audioSourceNode) { 4431 if (m_audioSourceNode) {
4457 // When creating the player, make sure its AudioSourceProvider knows abo ut the MediaElementAudioSourceNode. 4432 // When creating the player, make sure its AudioSourceProvider knows abo ut the MediaElementAudioSourceNode.
4458 if (audioSourceProvider()) 4433 if (audioSourceProvider())
4459 audioSourceProvider()->setClient(m_audioSourceNode); 4434 audioSourceProvider()->setClient(m_audioSourceNode);
4460 4435
4461 m_audioSourceNode->unlock(); 4436 m_audioSourceNode->unlock();
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
4784 info.addMember(m_playedTimeRanges, "playedTimeRanges"); 4759 info.addMember(m_playedTimeRanges, "playedTimeRanges");
4785 info.addMember(m_asyncEventQueue, "asyncEventQueue"); 4760 info.addMember(m_asyncEventQueue, "asyncEventQueue");
4786 info.addMember(m_currentSrc, "currentSrc"); 4761 info.addMember(m_currentSrc, "currentSrc");
4787 info.addMember(m_error, "error"); 4762 info.addMember(m_error, "error");
4788 info.addMember(m_currentSourceNode, "currentSourceNode"); 4763 info.addMember(m_currentSourceNode, "currentSourceNode");
4789 info.addMember(m_nextChildNodeToConsider, "nextChildNodeToConsider"); 4764 info.addMember(m_nextChildNodeToConsider, "nextChildNodeToConsider");
4790 info.addMember(m_player, "player"); 4765 info.addMember(m_player, "player");
4791 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) 4766 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
4792 info.addMember(m_proxyWidget, "proxyWidget"); 4767 info.addMember(m_proxyWidget, "proxyWidget");
4793 #endif 4768 #endif
4794 #if ENABLE(MEDIA_SOURCE)
4795 info.addMember(m_mediaSource, "mediaSource"); 4769 info.addMember(m_mediaSource, "mediaSource");
4796 #endif
4797 #if ENABLE(VIDEO_TRACK) 4770 #if ENABLE(VIDEO_TRACK)
4798 info.addMember(m_textTracks, "textTracks"); 4771 info.addMember(m_textTracks, "textTracks");
4799 info.addMember(m_textTracksWhenResourceSelectionBegan, "textTracksWhenResour ceSelectionBegan"); 4772 info.addMember(m_textTracksWhenResourceSelectionBegan, "textTracksWhenResour ceSelectionBegan");
4800 info.addMember(m_cueTree, "cueTree"); 4773 info.addMember(m_cueTree, "cueTree");
4801 info.addMember(m_currentlyActiveCues, "currentlyActiveCues"); 4774 info.addMember(m_currentlyActiveCues, "currentlyActiveCues");
4802 #endif 4775 #endif
4803 info.addMember(m_mediaGroup, "mediaGroup"); 4776 info.addMember(m_mediaGroup, "mediaGroup");
4804 info.addMember(m_mediaController, "mediaController"); 4777 info.addMember(m_mediaController, "mediaController");
4805 4778
4806 #if PLATFORM(MAC) 4779 #if PLATFORM(MAC)
4807 info.addMember(m_sleepDisabler, "sleepDisabler"); 4780 info.addMember(m_sleepDisabler, "sleepDisabler");
4808 #endif 4781 #endif
4809 #if ENABLE(WEB_AUDIO) 4782 #if ENABLE(WEB_AUDIO)
4810 info.addMember(m_audioSourceNode, "audioSourceNode"); 4783 info.addMember(m_audioSourceNode, "audioSourceNode");
4811 #endif 4784 #endif
4812 4785
4813 } 4786 }
4814 4787
4815 } 4788 }
4816 #endif 4789 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLMediaElement.h ('k') | Source/WebCore/html/PublicURLManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698