Changeset 156049 in webkit
- Timestamp:
- Sep 18, 2013 10:25:42 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 69 added
- 43 edited
- 20 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156047 r156049 1 2013-09-18 Jer Noble <jer.noble@apple.com> 2 3 Merge blink MediaSource changes since fork. 4 https://bugs.webkit.org/show_bug.cgi?id=118752 5 6 Rubber-stamped by Eric Carlson. 7 8 * http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt: Added. 9 * http/tests/media/media-source/mediasource-addsourcebuffer.html: Added. 10 * http/tests/media/media-source/mediasource-append-buffer-expected.txt: Added. 11 * http/tests/media/media-source/mediasource-append-buffer.html: Added. 12 * http/tests/media/media-source/mediasource-buffered-expected.txt: Added. 13 * http/tests/media/media-source/mediasource-buffered.html: Added. 14 * http/tests/media/media-source/mediasource-closed-expected.txt: Added. 15 * http/tests/media/media-source/mediasource-closed.html: Added. 16 * http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt: Added. 17 * http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html: Added. 18 * http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt: Added. 19 * http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html: Added. 20 * http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt: Added. 21 * http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html: Added. 22 * http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt: Added. 23 * http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html: Added. 24 * http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt: Added. 25 * http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html: Added. 26 * http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt: Added. 27 * http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html: Added. 28 * http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt: Added. 29 * http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html: Added. 30 * http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt: Added. 31 * http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html: Added. 32 * http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt: Added. 33 * http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html: Added. 34 * http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt: Added. 35 * http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html: Added. 36 * http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt: Added. 37 * http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html: Added. 38 * http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt: Added. 39 * http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html: Added. 40 * http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt: Added. 41 * http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html: Added. 42 * http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt: Added. 43 * http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html: Added. 44 * http/tests/media/media-source/mediasource-config-changes.js: Added. 45 * http/tests/media/media-source/mediasource-is-type-supported-expected.txt: Added. 46 * http/tests/media/media-source/mediasource-is-type-supported.html: Added. 47 * http/tests/media/media-source/mediasource-multiple-attach-expected.txt: Added. 48 * http/tests/media/media-source/mediasource-multiple-attach.html: Added. 49 * http/tests/media/media-source/mediasource-play-expected.txt: Added. 50 * http/tests/media/media-source/mediasource-play.html: Added. 51 * http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt: Added. 52 * http/tests/media/media-source/mediasource-sourcebufferlist.html: Added. 53 * http/tests/media/media-source/mediasource-util.js: Added. 54 * http/tests/media/media-source/video-media-source-objects-expected.txt: 55 * http/tests/media/resources/media-source/generate-config-change-tests.py: Added. 56 * http/tests/media/resources/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json: Added. 57 * http/tests/media/resources/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json: Added. 58 * http/tests/media/resources/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added. 59 * http/tests/media/resources/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 60 * http/tests/media/resources/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 61 * http/tests/media/resources/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 62 * http/tests/media/resources/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json: Added. 63 * http/tests/media/resources/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json: Added. 64 * http/tests/media/resources/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json: Added. 65 * http/tests/media/resources/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json: Added. 66 * http/tests/media/resources/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json: Added. 67 * http/tests/media/resources/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json: Added. 68 * http/tests/media/resources/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added. 69 * http/tests/media/resources/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 70 * http/tests/media/resources/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 71 * http/tests/media/resources/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added. 72 * http/tests/media/resources/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json: Added. 73 * http/tests/media/resources/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json: Added. 74 * http/tests/media/resources/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json: Added. 75 * http/tests/media/resources/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json: Added. 76 1 77 2013-09-18 Filip Pizlo <fpizlo@apple.com> 2 78 -
trunk/LayoutTests/http/tests/media/media-source/video-media-source-objects-expected.txt
r134648 r156049 3 3 EVENT(webkitsourceopen) 4 4 Test MediaSource object type 5 EXPECTED (mediaSource == '[object MediaSource]') OK5 EXPECTED (mediaSource == '[object WebKitMediaSource]') OK 6 6 EXPECTED (mediaSource instanceof window.WebKitMediaSource == 'true') OK 7 7 … … 12 12 13 13 Test SourceBufferList object type: 14 EXPECTED (mediaSource.sourceBuffers == '[object SourceBufferList]') OK14 EXPECTED (mediaSource.sourceBuffers == '[object WebKitSourceBufferList]') OK 15 15 EXPECTED (mediaSource.sourceBuffers instanceof window.WebKitSourceBufferList == 'true') OK 16 16 … … 40 40 RUN(mediaSource.removeSourceBuffer(segmentHelper.sourceBuffer)) 41 41 EXPECTED (mediaSource.sourceBuffers.length == '0') OK 42 EXPECTED (mediaSource.sourceBuffers == '[object SourceBufferList]') OK42 EXPECTED (mediaSource.sourceBuffers == '[object WebKitSourceBufferList]') OK 43 43 44 44 Test that append() throws an error after SourceBuffer has been removed. -
trunk/Source/WebCore/CMakeLists.txt
r156038 r156049 211 211 Modules/mediasource/SourceBuffer.idl 212 212 Modules/mediasource/SourceBufferList.idl 213 Modules/mediasource/URLMediaSource.idl 214 Modules/mediasource/WebKitMediaSource.idl 215 Modules/mediasource/WebKitSourceBuffer.idl 216 Modules/mediasource/WebKitSourceBufferList.idl 213 217 214 218 Modules/mediastream/MediaStream.idl … … 1463 1467 html/PasswordInputType.cpp 1464 1468 html/PluginDocument.cpp 1469 html/PublicURLManager.cpp 1465 1470 html/RadioInputType.cpp 1466 1471 html/RadioNodeList.cpp -
trunk/Source/WebCore/ChangeLog
r156041 r156049 1 2013-09-18 Jer Noble <jer.noble@apple.com> 2 3 Merge blink MediaSource changes since fork. 4 https://bugs.webkit.org/show_bug.cgi?id=118752 5 6 Rubber-stamped by Eric Carlson. 7 8 Tests: http/tests/media/media-source/mediasource-addsourcebuffer.html 9 http/tests/media/media-source/mediasource-append-buffer.html 10 http/tests/media/media-source/mediasource-buffered.html 11 http/tests/media/media-source/mediasource-closed.html 12 http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html 13 http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html 14 http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html 15 http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html 16 http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html 17 http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html 18 http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html 19 http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html 20 http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html 21 http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html 22 http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html 23 http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html 24 http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html 25 http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html 26 http/tests/media/media-source/mediasource-is-type-supported.html 27 http/tests/media/media-source/mediasource-multiple-attach.html 28 http/tests/media/media-source/mediasource-play.html 29 http/tests/media/media-source/mediasource-sourcebufferlist.html 30 31 Add files to project. Fix compile errors exposed by enabling. 32 33 * WebCore.xcodeproj/project.pbxproj: 34 * Modules/mediasource/MediaSourceRegistry.cpp: 35 (WebCore::MediaSourceRegistry::lookupMediaSource): 36 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 37 (WebCore::MediaPlayerPrivateAVFoundation::load): 38 * platform/graphics/mac/MediaPlayerPrivateQTKit.h: 39 (WebCore::MediaPlayerPrivateQTKit::load): 40 * platform/mac/MIMETypeRegistryMac.mm: 41 (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType): 42 * CMakeLists.txt: 43 * DerivedSources.make: 44 * DerivedSources.pri: 45 * GNUmakefile.list.am: 46 47 Merge 48 https://chromium.googlesource.com/chromium/blink/+/c38e2955db98a300a535b692869fea0e41501497 49 https://chromium.googlesource.com/chromium/blink/+/8568015e9bee1de7fccee28163f9e4a4b51f9baf 50 https://chromium.googlesource.com/chromium/blink/+/14417e8fa6294f4e7dbc1e0fac549398522b2f97 51 https://chromium.googlesource.com/chromium/blink/+/f43a5496f233102f8861a067a9cf8053c010d401 52 https://chromium.googlesource.com/chromium/blink/+/57771439806f7c6e6a272efb1ea72900f5f6a015 53 https://chromium.googlesource.com/chromium/blink/+/8c77a790a9d225194db0a8832399d0f9e1fa54ec 54 https://chromium.googlesource.com/chromium/blink/+/d33ae3fa7a8592e946503ed17f862a27c6d9dde1 55 https://chromium.googlesource.com/chromium/blink/+/1caaa9c51f06e1b9341d58c994f77fd59fcd236d 56 https://chromium.googlesource.com/chromium/blink/+/e95720393b0ebe67f19de39bb77cdf2926165512 57 https://chromium.googlesource.com/chromium/blink/+/bad2c1b4b70faec731b2ad3cc8a4ccf28de6cc38 58 https://chromium.googlesource.com/chromium/blink/+/a7873430c3d5c9373336c6f3993db3cb4228e9cd 59 https://chromium.googlesource.com/chromium/blink/+/508966d5e32360b3cec058f9fbae0014542fbc52 60 https://chromium.googlesource.com/chromium/blink/+/371dfe72f61ce6f73e6c242324da73c415d38be3 61 1 62 2013-09-18 Andreas Kling <akling@apple.com> 2 63 -
trunk/Source/WebCore/DerivedSources.cpp
r155367 r156049 269 269 #include "JSMediaQueryListListener.cpp" 270 270 #if ENABLE(MEDIA_SOURCE) 271 #include "JS MediaSource.cpp"271 #include "JSWebKitMediaSource.cpp" 272 272 #endif 273 273 #include "JSMessageChannel.cpp" … … 313 313 #include "JSSharedWorkerGlobalScope.cpp" 314 314 #if ENABLE(MEDIA_SOURCE) 315 #include "JS SourceBuffer.cpp"316 #include "JS SourceBufferList.cpp"315 #include "JSWebKitSourceBuffer.cpp" 316 #include "JSWebKitSourceBufferList.cpp" 317 317 #endif 318 318 #include "JSSQLError.cpp" -
trunk/Source/WebCore/DerivedSources.make
r155992 r156049 114 114 $(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \ 115 115 $(WebCore)/Modules/indieui/UIRequestEvent.idl \ 116 $(WebCore)/Modules/mediasource/MediaSource.idl \ 116 $(WebCore)/Modules/mediasource/MediaSource.idl \ 117 $(WebCore)/Modules/mediasource/SourceBuffer.idl \ 118 $(WebCore)/Modules/mediasource/SourceBufferList.idl \ 119 $(WebCore)/Modules/mediasource/URLMediaSource.idl \ 120 $(WebCore)/Modules/mediasource/WebKitMediaSource.idl \ 121 $(WebCore)/Modules/mediasource/WebKitSourceBuffer.idl \ 122 $(WebCore)/Modules/mediasource/WebKitSourceBufferList.idl \ 117 123 $(WebCore)/Modules/mediasource/SourceBuffer.idl \ 118 124 $(WebCore)/Modules/mediasource/SourceBufferList.idl \ -
trunk/Source/WebCore/DerivedSources.pri
r155790 r156049 663 663 $$PWD/Modules/mediasource/MediaSource.idl \ 664 664 $$PWD/Modules/mediasource/SourceBuffer.idl \ 665 $$PWD/Modules/mediasource/SourceBufferList.idl 665 $$PWD/Modules/mediasource/SourceBufferList.idl \ 666 $$PWD/Modules/mediasource/URLMediaSource.idl \ 667 $$PWD/Modules/mediasource/WebKitMediaSource.idl \ 668 $$PWD/Modules/mediasource/WebKitSourceBuffer.idl \ 669 $$PWD/Modules/mediasource/WebKitSourceBufferList.idl 666 670 } 667 671 -
trunk/Source/WebCore/GNUmakefile.list.am
r156038 r156049 501 501 DerivedSources/WebCore/JSMediaSource.cpp \ 502 502 DerivedSources/WebCore/JSMediaSource.h \ 503 DerivedSources/WebCore/JSWebKitMediaSource.cpp \ 504 DerivedSources/WebCore/JSWebKitMediaSource.h \ 503 505 DerivedSources/WebCore/JSMediaStream.cpp \ 504 506 DerivedSources/WebCore/JSMediaStream.h \ … … 671 673 DerivedSources/WebCore/JSSourceInfo.cpp \ 672 674 DerivedSources/WebCore/JSSourceInfo.h \ 675 DerivedSources/WebCore/JSWebKitSourceBuffer.cpp \ 676 DerivedSources/WebCore/JSWebKitSourceBuffer.h \ 677 DerivedSources/WebCore/JSWebKitSourceBufferList.cpp \ 678 DerivedSources/WebCore/JSWebKitSourceBufferList.h \ 673 679 DerivedSources/WebCore/JSSpeechInputEvent.cpp \ 674 680 DerivedSources/WebCore/JSSpeechInputEvent.h \ … … 1243 1249 $(WebCore)/Modules/mediasource/SourceBuffer.idl \ 1244 1250 $(WebCore)/Modules/mediasource/SourceBufferList.idl \ 1251 $(WebCore)/Modules/mediasource/URLMediaSource.idl \ 1252 $(WebCore)/Modules/mediasource/WebKitMediaSource.idl \ 1253 $(WebCore)/Modules/mediasource/WebKitSourceBuffer.idl \ 1254 $(WebCore)/Modules/mediasource/WebKitSourceBufferList.idl \ 1245 1255 $(WebCore)/Modules/mediastream/MediaStream.idl \ 1246 1256 $(WebCore)/Modules/mediastream/MediaStreamEvent.idl \ … … 1943 1953 Source/WebCore/Modules/mediasource/MediaSource.cpp \ 1944 1954 Source/WebCore/Modules/mediasource/MediaSource.h \ 1955 Source/WebCore/Modules/mediasource/MediaSourceBase.cpp \ 1956 Source/WebCore/Modules/mediasource/MediaSourceBase.h \ 1945 1957 Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp \ 1946 1958 Source/WebCore/Modules/mediasource/MediaSourceRegistry.h \ … … 1949 1961 Source/WebCore/Modules/mediasource/SourceBufferList.cpp \ 1950 1962 Source/WebCore/Modules/mediasource/SourceBufferList.h \ 1963 Source/WebCore/Modules/mediasource/URLMediaSource.cpp \ 1964 Source/WebCore/Modules/mediasource/URLMediaSource.h \ 1965 Source/WebCore/Modules/mediasource/WebKitMediaSource.cpp \ 1966 Source/WebCore/Modules/mediasource/WebKitMediaSource.h \ 1967 Source/WebCore/Modules/mediasource/WebKitSourceBuffer.cpp \ 1968 Source/WebCore/Modules/mediasource/WebKitSourceBuffer.h \ 1969 Source/WebCore/Modules/mediasource/WebKitSourceBufferList.cpp \ 1970 Source/WebCore/Modules/mediasource/WebKitSourceBufferList.h \ 1951 1971 Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp \ 1952 1972 Source/WebCore/Modules/mediastream/MediaConstraintsImpl.h \ … … 3708 3728 Source/WebCore/html/PluginDocument.cpp \ 3709 3729 Source/WebCore/html/PluginDocument.h \ 3730 Source/WebCore/html/PublicURLManager.cpp \ 3710 3731 Source/WebCore/html/PublicURLManager.h \ 3711 3732 Source/WebCore/html/RadioInputType.cpp \ -
trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp
r155356 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 35 35 36 36 #include "ContentType.h" 37 #include "Event.h" 37 #include "ExceptionCodePlaceholder.h" 38 #include "GenericEventQueue.h" 39 #include "Logging.h" 38 40 #include "MIMETypeRegistry.h" 41 #include "MediaSourceRegistry.h" 39 42 #include "SourceBufferPrivate.h" 40 43 #include "TimeRanges.h" 41 44 #include <runtime/Uint8Array.h> 45 #include <wtf/text/CString.h> 42 46 43 47 namespace WebCore { … … 51 55 52 56 MediaSource::MediaSource(ScriptExecutionContext* context) 53 : ActiveDOMObject(context) 54 , m_readyState(closedKeyword()) 55 , m_asyncEventQueue(*this) 56 , m_sourceBuffers(SourceBufferList::create(scriptExecutionContext(), m_asyncEventQueue)) 57 , m_activeSourceBuffers(SourceBufferList::create(scriptExecutionContext(), m_asyncEventQueue)) 58 { 59 } 60 61 const String& MediaSource::openKeyword() 62 { 63 DEFINE_STATIC_LOCAL(const String, open, (ASCIILiteral("open"))); 64 return open; 65 } 66 67 const String& MediaSource::closedKeyword() 68 { 69 DEFINE_STATIC_LOCAL(const String, closed, (ASCIILiteral("closed"))); 70 return closed; 71 } 72 73 const String& MediaSource::endedKeyword() 74 { 75 DEFINE_STATIC_LOCAL(const String, ended, (ASCIILiteral("ended"))); 76 return ended; 77 } 78 79 SourceBufferList* MediaSource::sourceBuffers() 80 { 81 return m_sourceBuffers.get(); 82 } 83 84 SourceBufferList* MediaSource::activeSourceBuffers() 85 { 86 // FIXME(91649): support track selection 87 return m_activeSourceBuffers.get(); 88 } 89 90 double MediaSource::duration() const 91 { 92 return m_readyState == closedKeyword() ? std::numeric_limits<float>::quiet_NaN() : m_private->duration(); 93 } 94 95 void MediaSource::setDuration(double duration, ExceptionCode& ec) 96 { 97 if (duration < 0.0 || std::isnan(duration)) { 98 ec = INVALID_ACCESS_ERR; 99 return; 100 } 101 if (m_readyState != openKeyword()) { 102 ec = INVALID_STATE_ERR; 103 return; 104 } 105 m_private->setDuration(duration); 57 : MediaSourceBase(context) 58 { 59 LOG(Media, "MediaSource::MediaSource %p", this); 60 m_sourceBuffers = SourceBufferList::create(scriptExecutionContext()); 61 m_activeSourceBuffers = SourceBufferList::create(scriptExecutionContext()); 62 } 63 64 MediaSource::~MediaSource() 65 { 66 LOG(Media, "MediaSource::~MediaSource %p", this); 67 ASSERT(isClosed()); 106 68 } 107 69 108 70 SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionCode& ec) 109 71 { 110 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-addsourcebuffer 72 LOG(Media, "MediaSource::addSourceBuffer(%s) %p", type.ascii().data(), this); 73 74 // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type 111 75 // 1. If type is null or an empty then throw an INVALID_ACCESS_ERR exception and 112 76 // abort these steps. … … 125 89 // 4. If the readyState attribute is not in the "open" state then throw an 126 90 // INVALID_STATE_ERR exception and abort these steps. 127 if (! m_private || m_readyState != openKeyword()) {91 if (!isOpen()) { 128 92 ec = INVALID_STATE_ERR; 129 93 return 0; … … 133 97 ContentType contentType(type); 134 98 Vector<String> codecs = contentType.codecs(); 135 OwnPtr<SourceBufferPrivate> sourceBufferPrivate; 136 switch (m_private->addSourceBuffer(contentType.type(), codecs, &sourceBufferPrivate)) { 137 case MediaSourcePrivate::Ok: { 138 ASSERT(sourceBufferPrivate); 139 RefPtr<SourceBuffer> buffer = SourceBuffer::create(sourceBufferPrivate.release(), this); 140 141 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object. 142 m_sourceBuffers->add(buffer); 143 m_activeSourceBuffers->add(buffer); 144 // 7. Return the new object to the caller. 145 return buffer.get(); 146 } 147 case MediaSourcePrivate::NotSupported: 148 // 2 (cont). If type contains a MIME type ... that is not supported with the types 149 // specified for the other SourceBuffer objects in sourceBuffers, then throw 150 // a NOT_SUPPORTED_ERR exception and abort these steps. 151 ec = NOT_SUPPORTED_ERR; 152 return 0; 153 case MediaSourcePrivate::ReachedIdLimit: 154 // 3 (cont). If the user agent can't handle any more SourceBuffer objects then throw 155 // a QUOTA_EXCEEDED_ERR exception and abort these steps. 156 ec = QUOTA_EXCEEDED_ERR; 157 return 0; 158 } 159 160 ASSERT_NOT_REACHED(); 161 return 0; 99 OwnPtr<SourceBufferPrivate> sourceBufferPrivate = createSourceBufferPrivate(contentType.type(), codecs, ec); 100 101 if (!sourceBufferPrivate) { 102 ASSERT(ec == NOT_SUPPORTED_ERR || ec == QUOTA_EXCEEDED_ERR); 103 // 2. If type contains a MIME type that is not supported ..., then throw a NOT_SUPPORTED_ERR exception and abort these steps. 104 // 3. If the user agent can't handle any more SourceBuffer objects then throw a QUOTA_EXCEEDED_ERR exception and abort these steps 105 return 0; 106 } 107 108 RefPtr<SourceBuffer> buffer = SourceBuffer::create(sourceBufferPrivate.release(), this); 109 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object. 110 m_sourceBuffers->add(buffer); 111 m_activeSourceBuffers->add(buffer); 112 // 7. Return the new object to the caller. 113 return buffer.get(); 162 114 } 163 115 164 116 void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionCode& ec) 165 117 { 166 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-removesourcebuffer 118 LOG(Media, "MediaSource::removeSourceBuffer() %p", this); 119 RefPtr<SourceBuffer> protect(buffer); 120 121 // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer 167 122 // 1. If sourceBuffer is null then throw an INVALID_ACCESS_ERR exception and 168 123 // abort these steps. … … 172 127 } 173 128 174 // 2. If sourceBuffers is empty then throw an INVALID_STATE_ERR exception and 175 // abort these steps. 176 if (!m_private || !m_sourceBuffers->length()) { 177 ec = INVALID_STATE_ERR; 178 return; 179 } 180 181 // 3. If sourceBuffer specifies an object that is not in sourceBuffers then 129 // 2. If sourceBuffer specifies an object that is not in sourceBuffers then 182 130 // throw a NOT_FOUND_ERR exception and abort these steps. 183 // 6. Remove sourceBuffer from sourceBuffers and fire a removesourcebuffer event 131 if (!m_sourceBuffers->length() || !m_sourceBuffers->contains(buffer)) { 132 ec = NOT_FOUND_ERR; 133 return; 134 } 135 136 // 3. If the sourceBuffer.updating attribute equals true, then run the following steps: ... 137 buffer->abortIfUpdating(); 138 139 // Steps 4-9 are related to updating audioTracks, videoTracks, and textTracks which aren't implmented yet. 140 // FIXME(91649): support track selection 141 142 // 10. If sourceBuffer is in activeSourceBuffers, then remove sourceBuffer from activeSourceBuffers ... 143 m_activeSourceBuffers->remove(buffer); 144 145 // 11. Remove sourceBuffer from sourceBuffers and fire a removesourcebuffer event 184 146 // on that object. 185 if (!m_sourceBuffers->remove(buffer)) { 186 ec = NOT_FOUND_ERR; 187 return; 188 } 189 190 // 7. Destroy all resources for sourceBuffer. 191 m_activeSourceBuffers->remove(buffer); 192 193 // 4. Remove track information from audioTracks, videoTracks, and textTracks for all tracks 194 // associated with sourceBuffer and fire a simple event named change on the modified lists. 195 // FIXME(91649): support track selection 196 197 // 5. If sourceBuffer is in activeSourceBuffers, then remove it from that list and fire a 198 // removesourcebuffer event on that object. 199 // FIXME(91649): support track selection 200 } 201 202 const String& MediaSource::readyState() const 203 { 204 return m_readyState; 205 } 206 207 void MediaSource::setReadyState(const String& state) 208 { 209 ASSERT(state == openKeyword() || state == closedKeyword() || state == endedKeyword()); 210 if (m_readyState == state) 211 return; 212 213 String oldState = m_readyState; 214 m_readyState = state; 215 216 if (m_readyState == closedKeyword()) { 217 m_sourceBuffers->clear(); 218 m_activeSourceBuffers->clear(); 219 m_private.clear(); 220 scheduleEvent(eventNames().webkitsourcecloseEvent); 221 return; 222 } 223 224 if (oldState == openKeyword() && m_readyState == endedKeyword()) { 225 scheduleEvent(eventNames().webkitsourceendedEvent); 226 return; 227 } 228 229 if (m_readyState == openKeyword()) { 230 scheduleEvent(eventNames().webkitsourceopenEvent); 231 return; 232 } 233 } 234 235 void MediaSource::endOfStream(const String& error, ExceptionCode& ec) 236 { 237 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-endofstream 238 // 1. If the readyState attribute is not in the "open" state then throw an 239 // INVALID_STATE_ERR exception and abort these steps. 240 if (!m_private || m_readyState != openKeyword()) { 241 ec = INVALID_STATE_ERR; 242 return; 243 } 244 245 MediaSourcePrivate::EndOfStreamStatus eosStatus = MediaSourcePrivate::EosNoError; 246 247 if (error.isNull() || error.isEmpty()) 248 eosStatus = MediaSourcePrivate::EosNoError; 249 else if (error == "network") 250 eosStatus = MediaSourcePrivate::EosNetworkError; 251 else if (error == "decode") 252 eosStatus = MediaSourcePrivate::EosDecodeError; 253 else { 254 ec = INVALID_ACCESS_ERR; 255 return; 256 } 257 258 // 2. Change the readyState attribute value to "ended". 259 setReadyState(endedKeyword()); 260 m_private->endOfStream(eosStatus); 147 m_sourceBuffers->remove(buffer); 148 149 // 12. Destroy all resources for sourceBuffer. 150 buffer->removedFromMediaSource(); 151 } 152 153 void MediaSource::onReadyStateChange(const AtomicString& oldState, const AtomicString& newState) 154 { 155 if (isOpen()) { 156 scheduleEvent(eventNames().sourceopenEvent); 157 return; 158 } 159 160 if (oldState == openKeyword() && newState == endedKeyword()) { 161 scheduleEvent(eventNames().sourceendedEvent); 162 return; 163 } 164 165 ASSERT(isClosed()); 166 167 m_activeSourceBuffers->clear(); 168 169 // Clear SourceBuffer references to this object. 170 for (unsigned long i = 0; i < m_sourceBuffers->length(); ++i) 171 m_sourceBuffers->item(i)->removedFromMediaSource(); 172 m_sourceBuffers->clear(); 173 174 scheduleEvent(eventNames().sourcecloseEvent); 175 } 176 177 Vector<RefPtr<TimeRanges> > MediaSource::activeRanges() const 178 { 179 Vector<RefPtr<TimeRanges> > activeRanges(m_activeSourceBuffers->length()); 180 for (size_t i = 0; i < m_activeSourceBuffers->length(); ++i) 181 activeRanges[i] = m_activeSourceBuffers->item(i)->buffered(ASSERT_NO_EXCEPTION); 182 183 return activeRanges; 261 184 } 262 185 263 186 bool MediaSource::isTypeSupported(const String& type) 264 187 { 265 // Section 2.1 isTypeSupported() method steps. 188 LOG(Media, "MediaSource::isTypeSupported(%s)", type.ascii().data()); 189 190 // Section 2.2 isTypeSupported() method steps. 266 191 // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-MediaSource-isTypeSupported-boolean-DOMString-type 267 192 // 1. If type is an empty string, then return false. … … 283 208 } 284 209 285 void MediaSource::setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate> mediaSourcePrivate)286 {287 ASSERT(mediaSourcePrivate);288 ASSERT(!m_private);289 m_private = mediaSourcePrivate;290 setReadyState(openKeyword());291 }292 293 210 const AtomicString& MediaSource::interfaceName() const 294 211 { … … 296 213 } 297 214 298 ScriptExecutionContext* MediaSource::scriptExecutionContext() const299 {300 return ActiveDOMObject::scriptExecutionContext();301 }302 303 bool MediaSource::hasPendingActivity() const304 {305 return m_private || m_asyncEventQueue.hasPendingEvents() || ActiveDOMObject::hasPendingActivity();306 }307 308 void MediaSource::stop()309 {310 m_private.clear();311 m_asyncEventQueue.cancelAllEvents();312 }313 314 EventTargetData* MediaSource::eventTargetData()315 {316 return &m_eventTargetData;317 }318 319 EventTargetData& MediaSource::ensureEventTargetData()320 {321 return m_eventTargetData;322 }323 324 void MediaSource::scheduleEvent(const AtomicString& eventName)325 {326 RefPtr<Event> event = Event::create(eventName, false, false);327 event->setTarget(this);328 m_asyncEventQueue.enqueueEvent(event.release());329 }330 331 215 } // namespace WebCore 332 216 -
trunk/Source/WebCore/Modules/mediasource/MediaSource.h
r155356 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "ActiveDOMObject.h" 37 #include "GenericEventQueue.h" 38 #include "MediaSourcePrivate.h" 36 #include "MediaSourceBase.h" 37 #include "ScriptWrappable.h" 39 38 #include "SourceBuffer.h" 40 39 #include "SourceBufferList.h" … … 43 42 namespace WebCore { 44 43 45 class MediaSource : public RefCounted<MediaSource>, public EventTarget, public ActiveDOMObject{44 class MediaSource : public MediaSourceBase, public ScriptWrappable { 46 45 public: 47 static const String& openKeyword();48 static const String& closedKeyword();49 static const String& endedKeyword();50 51 46 static PassRefPtr<MediaSource> create(ScriptExecutionContext*); 52 virtual ~MediaSource() { }47 virtual ~MediaSource(); 53 48 54 49 // MediaSource.idl methods 55 SourceBufferList* sourceBuffers(); 56 SourceBufferList* activeSourceBuffers(); 57 double duration() const; 58 void setDuration(double, ExceptionCode&); 50 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } 51 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get(); } 59 52 SourceBuffer* addSourceBuffer(const String& type, ExceptionCode&); 60 53 void removeSourceBuffer(SourceBuffer*, ExceptionCode&); 61 const String& readyState() const;62 void setReadyState(const String&);63 void endOfStream(const String& error, ExceptionCode&);64 54 static bool isTypeSupported(const String& type); 65 66 void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>);67 55 68 56 // EventTarget interface 69 57 virtual const AtomicString& interfaceName() const OVERRIDE; 70 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;71 58 72 // ActiveDOMObject interface 73 virtual bool hasPendingActivity() const OVERRIDE; 74 75 using RefCounted<MediaSource>::ref; 76 using RefCounted<MediaSource>::deref; 59 using RefCounted<MediaSourceBase>::ref; 60 using RefCounted<MediaSourceBase>::deref; 77 61 78 62 private: 79 63 explicit MediaSource(ScriptExecutionContext*); 80 64 81 // ActiveDOMObject interface 82 virtual void stop() OVERRIDE; 65 // MediaSourceBase interface 66 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OVERRIDE; 67 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; 83 68 84 virtual EventTargetData* eventTargetData() OVERRIDE;85 virtual EventTargetData& ensureEventTargetData() OVERRIDE;86 87 virtual void refEventTarget() OVERRIDE { ref(); }88 virtual void derefEventTarget() OVERRIDE { deref(); }89 90 void scheduleEvent(const AtomicString& eventName);91 92 EventTargetData m_eventTargetData;93 94 String m_readyState;95 OwnPtr<MediaSourcePrivate> m_private;96 97 GenericEventQueue m_asyncEventQueue;98 69 RefPtr<SourceBufferList> m_sourceBuffers; 99 70 RefPtr<SourceBufferList> m_activeSourceBuffers; … … 103 74 104 75 #endif 76 105 77 #endif -
trunk/Source/WebCore/Modules/mediasource/MediaSource.idl
r151495 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 ActiveDOMObject, 34 34 EventTarget, 35 JSGenerateToNativeObject, 35 36 Constructor, 36 ConstructorCallWith=ScriptExecutionContext, 37 InterfaceName=WebKitMediaSource 38 ] interface MediaSource { 37 ConstructorCallWith=ScriptExecutionContext 38 ] interface MediaSource : EventTarget { 39 39 // All the source buffers created by this object. 40 40 readonly attribute SourceBufferList sourceBuffers; … … 53 53 54 54 static boolean isTypeSupported (DOMString type); 55 56 // EventTarget interface57 void addEventListener(DOMString type,58 EventListener listener,59 optional boolean useCapture);60 void removeEventListener(DOMString type,61 EventListener listener,62 optional boolean useCapture);63 [RaisesException] boolean dispatchEvent(Event event);64 55 }; 65 -
trunk/Source/WebCore/Modules/mediasource/MediaSourceBase.h
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 */ 30 30 31 #ifndef MediaSource _h32 #define MediaSource _h31 #ifndef MediaSourceBase_h 32 #define MediaSourceBase_h 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 36 #include "ActiveDOMObject.h" 37 #include "EventTarget.h" 37 38 #include "GenericEventQueue.h" 39 #include "HTMLMediaSource.h" 38 40 #include "MediaSourcePrivate.h" 39 #include " SourceBuffer.h"40 #include "SourceBufferList.h"41 #include "URLRegistry.h" 42 #include <wtf/PassOwnPtr.h> 41 43 #include <wtf/RefCounted.h> 44 #include <wtf/Vector.h> 42 45 43 46 namespace WebCore { 44 47 45 class MediaSource : public RefCounted<MediaSource>, public EventTarget, public ActiveDOMObject { 48 class GenericEventQueue; 49 50 class MediaSourceBase : public RefCounted<MediaSourceBase>, public HTMLMediaSource, public ActiveDOMObject, public EventTarget { 46 51 public: 47 static const String& openKeyword();48 static const String& closedKeyword();49 static const String& endedKeyword();52 static const AtomicString& openKeyword(); 53 static const AtomicString& closedKeyword(); 54 static const AtomicString& endedKeyword(); 50 55 51 static PassRefPtr<MediaSource> create(ScriptExecutionContext*); 52 virtual ~MediaSource() { } 56 virtual ~MediaSourceBase(); 53 57 54 // MediaSource.idl methods 55 SourceBufferList* sourceBuffers(); 56 SourceBufferList* activeSourceBuffers(); 57 double duration() const; 58 void addedToRegistry(); 59 void removedFromRegistry(); 60 void openIfInEndedState(); 61 bool isOpen() const; 62 63 // HTMLMediaSource 64 virtual bool attachToElement() OVERRIDE; 65 virtual void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>) OVERRIDE; 66 virtual void close() OVERRIDE; 67 virtual bool isClosed() const OVERRIDE; 68 virtual double duration() const OVERRIDE; 69 virtual PassRefPtr<TimeRanges> buffered() const OVERRIDE; 70 virtual void refHTMLMediaSource() OVERRIDE { ref(); } 71 virtual void derefHTMLMediaSource() OVERRIDE { deref(); } 72 58 73 void setDuration(double, ExceptionCode&); 59 SourceBuffer* addSourceBuffer(const String& type, ExceptionCode&); 60 void removeSourceBuffer(SourceBuffer*, ExceptionCode&); 61 const String& readyState() const; 62 void setReadyState(const String&); 63 void endOfStream(const String& error, ExceptionCode&); 64 static bool isTypeSupported(const String& type); 74 const AtomicString& readyState() const { return m_readyState; } 75 void setReadyState(const AtomicString&); 76 void endOfStream(const AtomicString& error, ExceptionCode&); 65 77 66 void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>);67 68 // EventTarget interface69 virtual const AtomicString& interfaceName() const OVERRIDE;70 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;71 78 72 79 // ActiveDOMObject interface 73 80 virtual bool hasPendingActivity() const OVERRIDE; 74 75 using RefCounted<MediaSource>::ref;76 using RefCounted<MediaSource>::deref;77 78 private:79 explicit MediaSource(ScriptExecutionContext*);80 81 // ActiveDOMObject interface82 81 virtual void stop() OVERRIDE; 83 82 83 // EventTarget interface 84 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; 84 85 virtual EventTargetData* eventTargetData() OVERRIDE; 85 86 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 86 87 87 virtual void refEventTarget() OVERRIDE { ref(); } 88 88 virtual void derefEventTarget() OVERRIDE { deref(); } 89 89 90 // URLRegistrable interface 91 virtual URLRegistry& registry() const OVERRIDE; 92 93 using RefCounted<MediaSourceBase>::ref; 94 using RefCounted<MediaSourceBase>::deref; 95 96 protected: 97 explicit MediaSourceBase(ScriptExecutionContext*); 98 99 virtual void onReadyStateChange(const AtomicString& oldState, const AtomicString& newState) = 0; 100 virtual Vector<RefPtr<TimeRanges> > activeRanges() const = 0; 101 102 PassOwnPtr<SourceBufferPrivate> createSourceBufferPrivate(const String& type, const MediaSourcePrivate::CodecsArray&, ExceptionCode&); 90 103 void scheduleEvent(const AtomicString& eventName); 104 GenericEventQueue& asyncEventQueue() { return m_asyncEventQueue; } 91 105 106 private: 107 OwnPtr<MediaSourcePrivate> m_private; 92 108 EventTargetData m_eventTargetData; 93 94 String m_readyState; 95 OwnPtr<MediaSourcePrivate> m_private; 96 109 AtomicString m_readyState; 97 110 GenericEventQueue m_asyncEventQueue; 98 RefPtr<SourceBufferList> m_sourceBuffers; 99 RefPtr<SourceBufferList> m_activeSourceBuffers; 111 bool m_attached; 100 112 }; 101 113 102 } // namespace WebCore114 } 103 115 104 116 #endif 117 105 118 #endif -
trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp
r132115 r156049 35 35 36 36 #include "KURL.h" 37 #include "MediaSource .h"37 #include "MediaSourceBase.h" 38 38 #include <wtf/MainThread.h> 39 39 … … 47 47 } 48 48 49 void MediaSourceRegistry::register MediaSourceURL(const KURL& url, PassRefPtr<MediaSource> source)49 void MediaSourceRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegistrable* registrable) 50 50 { 51 ASSERT(®istrable->registry() == this); 51 52 ASSERT(isMainThread()); 52 53 53 source->setPendingActivity(source.get());54 54 MediaSourceBase* source = static_cast<MediaSourceBase*>(registrable); 55 source->addedToRegistry(); 55 56 m_mediaSources.set(url.string(), source); 56 57 } 57 58 58 void MediaSourceRegistry::unregister MediaSourceURL(const KURL& url)59 void MediaSourceRegistry::unregisterURL(const KURL& url) 59 60 { 60 61 ASSERT(isMainThread()); 61 HashMap<String, RefPtr<MediaSource > >::iterator iter = m_mediaSources.find(url.string());62 HashMap<String, RefPtr<MediaSourceBase> >::iterator iter = m_mediaSources.find(url.string()); 62 63 if (iter == m_mediaSources.end()) 63 64 return; 64 65 65 RefPtr<MediaSource > source = iter->value;66 RefPtr<MediaSourceBase> source = iter->value; 66 67 m_mediaSources.remove(iter); 67 68 // Remove the pending activity added in registerMediaSourceURL(). 69 source->unsetPendingActivity(source.get()); 68 source->removedFromRegistry(); 70 69 } 71 70 72 MediaSource* MediaSourceRegistry::lookupMediaSource(const String& url)71 URLRegistrable* MediaSourceRegistry::lookup(const String& url) 73 72 { 74 73 ASSERT(isMainThread()); 75 return m_mediaSources.get(url).get(); 74 return m_mediaSources.get(url); 75 } 76 77 MediaSourceRegistry::MediaSourceRegistry() 78 { 79 HTMLMediaSource::setRegistry(this); 76 80 } 77 81 -
trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h
r124953 r156049 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "URLRegistry.h" 36 37 #include <wtf/HashMap.h> 37 38 #include <wtf/PassRefPtr.h> … … 41 42 42 43 class KURL; 43 class MediaSource ;44 class MediaSourceBase; 44 45 45 class MediaSourceRegistry {46 class MediaSourceRegistry : public URLRegistry { 46 47 public: 47 48 // Returns a single instance of MediaSourceRegistry. … … 49 50 50 51 // Registers a blob URL referring to the specified media source. 51 void registerMediaSourceURL(const KURL&, PassRefPtr<MediaSource>); 52 void unregisterMediaSourceURL(const KURL&); 53 54 MediaSource* lookupMediaSource(const String& url); 52 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE; 53 virtual void unregisterURL(const KURL&) OVERRIDE; 54 virtual URLRegistrable* lookup(const String&) OVERRIDE; 55 55 56 56 private: 57 HashMap<String, RefPtr<MediaSource> > m_mediaSources; 57 MediaSourceRegistry(); 58 HashMap<String, RefPtr<MediaSourceBase> > m_mediaSources; 58 59 }; 59 60 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
r153728 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "Event.h" 37 #include "GenericEventQueue.h" 38 #include "Logging.h" 36 39 #include "MediaSource.h" 37 40 #include "SourceBufferPrivate.h" 38 41 #include "TimeRanges.h" 39 #include <runtime/Uint8Array.h>40 42 41 43 namespace WebCore { 42 44 43 PassRefPtr<SourceBuffer> SourceBuffer::create(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<MediaSource> source) 44 { 45 return adoptRef(new SourceBuffer(sourceBufferPrivate, source)); 46 } 47 48 SourceBuffer::SourceBuffer(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<MediaSource> source) 49 : m_private(sourceBufferPrivate) 45 PassRefPtr<SourceBuffer> SourceBuffer::create(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, MediaSource* source) 46 { 47 RefPtr<SourceBuffer> sourceBuffer(adoptRef(new SourceBuffer(sourceBufferPrivate, source))); 48 sourceBuffer->suspendIfNeeded(); 49 return sourceBuffer.release(); 50 } 51 52 SourceBuffer::SourceBuffer(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, MediaSource* source) 53 : ActiveDOMObject(source->scriptExecutionContext()) 54 , m_private(sourceBufferPrivate) 50 55 , m_source(source) 56 , m_asyncEventQueue(*this) 57 , m_updating(false) 51 58 , m_timestampOffset(0) 59 , m_appendBufferTimer(this, &SourceBuffer::appendBufferTimerFired) 52 60 { 53 61 ASSERT(m_private); … … 57 65 SourceBuffer::~SourceBuffer() 58 66 { 67 ASSERT(isRemoved()); 59 68 } 60 69 … … 89 98 90 99 // 4. If the readyState attribute of the parent media source is in the "ended" state then run the following steps: 91 if (isEnded()) { 92 // 4.1 Set the readyState attribute of the parent media source to "open" 93 // 4.2 Queue a task to fire a simple event named sourceopen at the parent media source. 94 m_source->setReadyState(MediaSource::openKeyword()); 95 } 100 // 4.1 Set the readyState attribute of the parent media source to "open" 101 // 4.2 Queue a task to fire a simple event named sourceopen at the parent media source. 102 m_source->openIfInEndedState(); 96 103 97 104 // 5. If this object is waiting for the end of a media segment to be appended, then throw an INVALID_STATE_ERR … … 106 113 } 107 114 108 void SourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionCode& ec) 109 { 110 // SourceBuffer.append() steps from October 1st version of the Media Source Extensions spec. 111 // https://dvcs.w3.org/hg/html-media/raw-file/7bab66368f2c/media-source/media-source.html#dom-append 112 113 // 2. If data is null then throw an INVALID_ACCESS_ERR exception and abort these steps. 115 void SourceBuffer::appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionCode& ec) 116 { 117 // Section 3.2 appendBuffer() 118 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data 119 // 1. If data is null then throw an INVALID_ACCESS_ERR exception and abort these steps. 114 120 if (!data) { 115 121 ec = INVALID_ACCESS_ERR; … … 117 123 } 118 124 119 // 3. If this object has been removed from the sourceBuffers attribute of media source then throw 120 // an INVALID_STATE_ERR exception and abort these steps. 121 if (isRemoved()) { 122 ec = INVALID_STATE_ERR; 123 return; 124 } 125 126 // 5. If the readyState attribute of media source is in the "ended" state then run the following steps: 127 if (isEnded()) { 128 // 5.1. Set the readyState attribute of media source to "open" 129 // 5.2. Queue a task to fire a simple event named sourceopen at media source. 130 m_source->setReadyState(MediaSource::openKeyword()); 131 } 132 133 // Steps 6 & beyond are handled by the private implementation. 134 m_private->append(data->data(), data->length()); 125 appendBufferInternal(static_cast<unsigned char*>(data->data()), data->byteLength(), ec); 126 } 127 128 void SourceBuffer::appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionCode& ec) 129 { 130 // Section 3.2 appendBuffer() 131 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data 132 // 1. If data is null then throw an INVALID_ACCESS_ERR exception and abort these steps. 133 if (!data) { 134 ec = INVALID_ACCESS_ERR; 135 return; 136 } 137 138 appendBufferInternal(static_cast<unsigned char*>(data->baseAddress()), data->byteLength(), ec); 135 139 } 136 140 … … 138 142 { 139 143 // Section 3.2 abort() method steps. 144 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-abort-void 140 145 // 1. If this object has been removed from the sourceBuffers attribute of the parent media source 141 146 // then throw an INVALID_STATE_ERR exception and abort these steps. 142 147 // 2. If the readyState attribute of the parent media source is not in the "open" state 143 148 // then throw an INVALID_STATE_ERR exception and abort these steps. 144 if (isRemoved() || !isOpen()) { 145 ec = INVALID_STATE_ERR; 146 return; 147 } 149 if (isRemoved() || !m_source->isOpen()) { 150 ec = INVALID_STATE_ERR; 151 return; 152 } 153 154 // 3. If the sourceBuffer.updating attribute equals true, then run the following steps: ... 155 abortIfUpdating(); 148 156 149 157 // 4. Run the reset parser state algorithm. 150 158 m_private->abort(); 159 160 // FIXME(229408) Add steps 5-6 update appendWindowStart & appendWindowEnd. 161 } 162 163 164 void SourceBuffer::abortIfUpdating() 165 { 166 // Section 3.2 abort() method step 3 substeps. 167 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-abort-void 168 169 if (!m_updating) 170 return; 171 172 // 3.1. Abort the buffer append and stream append loop algorithms if they are running. 173 m_appendBufferTimer.stop(); 174 m_pendingAppendData.clear(); 175 176 // 3.2. Set the updating attribute to false. 177 m_updating = false; 178 179 // 3.3. Queue a task to fire a simple event named abort at this SourceBuffer object. 180 scheduleEvent(eventNames().abortEvent); 181 182 // 3.4. Queue a task to fire a simple event named updateend at this SourceBuffer object. 183 scheduleEvent(eventNames().updateendEvent); 151 184 } 152 185 … … 157 190 158 191 m_private->removedFromMediaSource(); 159 m_source.clear(); 192 m_source = 0; 193 m_asyncEventQueue.close(); 194 } 195 196 bool SourceBuffer::hasPendingActivity() const 197 { 198 return m_source; 199 } 200 201 void SourceBuffer::stop() 202 { 203 m_appendBufferTimer.stop(); 204 } 205 206 ScriptExecutionContext* SourceBuffer::scriptExecutionContext() const 207 { 208 return ActiveDOMObject::scriptExecutionContext(); 209 } 210 211 const AtomicString& SourceBuffer::interfaceName() const 212 { 213 return eventNames().interfaceForSourceBuffer; 214 } 215 216 EventTargetData* SourceBuffer::eventTargetData() 217 { 218 return &m_eventTargetData; 219 } 220 221 EventTargetData& SourceBuffer::ensureEventTargetData() 222 { 223 return m_eventTargetData; 160 224 } 161 225 … … 165 229 } 166 230 167 bool SourceBuffer::isOpen() const 168 { 169 ASSERT(m_source); 170 return m_source->readyState() == MediaSource::openKeyword(); 171 } 172 173 bool SourceBuffer::isEnded() const 174 { 175 ASSERT(m_source); 176 return m_source->readyState() == MediaSource::endedKeyword(); 231 void SourceBuffer::scheduleEvent(const AtomicString& eventName) 232 { 233 RefPtr<Event> event = Event::create(eventName, false, false); 234 event->setTarget(this); 235 236 m_asyncEventQueue.enqueueEvent(event.release()); 237 } 238 239 void SourceBuffer::appendBufferInternal(unsigned char* data, unsigned size, ExceptionCode& ec) 240 { 241 // Section 3.2 appendBuffer() 242 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data 243 244 // Step 1 is enforced by the caller. 245 // 2. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an INVALID_STATE_ERR exception and abort these steps. 246 // 3. If the updating attribute equals true, then throw an INVALID_STATE_ERR exception and abort these steps. 247 if (isRemoved() || m_updating) { 248 ec = INVALID_STATE_ERR; 249 return; 250 } 251 252 // 4. If the readyState attribute of the parent media source is in the "ended" state then run the following steps: ... 253 m_source->openIfInEndedState(); 254 255 // Steps 5-6 256 257 // 7. Add data to the end of the input buffer. 258 m_pendingAppendData.append(data, size); 259 260 // 8. Set the updating attribute to true. 261 m_updating = true; 262 263 // 9. Queue a task to fire a simple event named updatestart at this SourceBuffer object. 264 scheduleEvent(eventNames().updatestartEvent); 265 266 // 10. Asynchronously run the buffer append algorithm. 267 m_appendBufferTimer.startOneShot(0); 268 } 269 270 void SourceBuffer::appendBufferTimerFired(Timer<SourceBuffer>*) 271 { 272 ASSERT(m_updating); 273 274 // Section 3.5.4 Buffer Append Algorithm 275 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-buffer-append 276 277 // 1. Run the segment parser loop algorithm. 278 // Step 2 doesn't apply since we run Step 1 synchronously here. 279 size_t appendSize = m_pendingAppendData.size(); 280 if (!appendSize) { 281 // Resize buffer for 0 byte appends so we always have a valid pointer. 282 // We need to convey all appends, even 0 byte ones to |m_private| so 283 // that it can clear its end of stream state if necessary. 284 m_pendingAppendData.resize(1); 285 } 286 m_private->append(m_pendingAppendData.data(), appendSize); 287 288 // 3. Set the updating attribute to false. 289 m_updating = false; 290 m_pendingAppendData.clear(); 291 292 // 4. Queue a task to fire a simple event named update at this SourceBuffer object. 293 scheduleEvent(eventNames().updateEvent); 294 295 // 5. Queue a task to fire a simple event named updateend at this SourceBuffer object. 296 scheduleEvent(eventNames().updateendEvent); 177 297 } 178 298 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h
r144328 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "ActiveDOMObject.h" 37 #include "EventTarget.h" 36 38 #include "ExceptionCode.h" 39 #include "GenericEventQueue.h" 40 #include "ScriptWrappable.h" 41 #include "Timer.h" 42 #include <runtime/ArrayBufferView.h> 37 43 #include <wtf/PassRefPtr.h> 38 44 #include <wtf/RefCounted.h> … … 44 50 class TimeRanges; 45 51 46 class SourceBuffer : public RefCounted<SourceBuffer> {52 class SourceBuffer : public RefCounted<SourceBuffer>, public ActiveDOMObject, public EventTarget, public ScriptWrappable { 47 53 public: 48 static PassRefPtr<SourceBuffer> create(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<MediaSource>);54 static PassRefPtr<SourceBuffer> create(PassOwnPtr<SourceBufferPrivate>, MediaSource*); 49 55 50 56 virtual ~SourceBuffer(); 51 57 52 58 // SourceBuffer.idl methods 59 bool updating() const { return m_updating; } 53 60 PassRefPtr<TimeRanges> buffered(ExceptionCode&) const; 54 61 double timestampOffset() const; 55 62 void setTimestampOffset(double, ExceptionCode&); 56 void append(PassRefPtr<Uint8Array> data, ExceptionCode&); 63 void appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionCode&); 64 void appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionCode&); 57 65 void abort(ExceptionCode&); 58 66 67 void abortIfUpdating(); 59 68 void removedFromMediaSource(); 60 69 70 // ActiveDOMObject interface 71 virtual bool hasPendingActivity() const OVERRIDE; 72 virtual void stop() OVERRIDE; 73 74 // EventTarget interface 75 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; 76 virtual const AtomicString& interfaceName() const OVERRIDE; 77 78 using RefCounted<SourceBuffer>::ref; 79 using RefCounted<SourceBuffer>::deref; 80 81 protected: 82 // EventTarget interface 83 virtual EventTargetData* eventTargetData() OVERRIDE; 84 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 85 virtual void refEventTarget() OVERRIDE { ref(); } 86 virtual void derefEventTarget() OVERRIDE { deref(); } 87 61 88 private: 62 SourceBuffer(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<MediaSource>);89 SourceBuffer(PassOwnPtr<SourceBufferPrivate>, MediaSource*); 63 90 64 91 bool isRemoved() const; 65 bool isOpen() const; 66 bool isEnded() const; 92 void scheduleEvent(const AtomicString& eventName); 93 94 void appendBufferInternal(unsigned char*, unsigned, ExceptionCode&); 95 void appendBufferTimerFired(Timer<SourceBuffer>*); 67 96 68 97 OwnPtr<SourceBufferPrivate> m_private; 69 RefPtr<MediaSource> m_source; 98 MediaSource* m_source; 99 GenericEventQueue m_asyncEventQueue; 100 EventTargetData m_eventTargetData; 70 101 102 bool m_updating; 71 103 double m_timestampOffset; 104 105 Vector<unsigned char> m_pendingAppendData; 106 Timer<SourceBuffer> m_appendBufferTimer; 72 107 }; 73 108 … … 75 110 76 111 #endif 112 77 113 #endif -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl
r151336 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 [ 32 32 Conditional=MEDIA_SOURCE, 33 InterfaceName=WebKitSourceBuffer 34 ] interface SourceBuffer { 33 NoInterfaceObject, 34 ActiveDOMObject, 35 EventTarget, 36 JSGenerateToNativeObject 37 ] interface SourceBuffer : EventTarget { 35 38 39 readonly attribute boolean updating; 40 36 41 // Returns the time ranges buffered. 37 42 [GetterRaisesException] readonly attribute TimeRanges buffered; … … 41 46 42 47 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 48 [RaisesException] void appendBuffer(ArrayBuffer data); 49 [RaisesException] void appendBuffer(ArrayBufferView data); 44 50 45 51 // Abort the current segment append sequence. -
trunk/Source/WebCore/Modules/mediasource/SourceBufferList.cpp
r155356 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 35 35 36 36 #include "Event.h" 37 #include "GenericEventQueue.h"38 37 #include "SourceBuffer.h" 39 38 40 39 namespace WebCore { 41 40 42 SourceBufferList::SourceBufferList(ScriptExecutionContext & context, GenericEventQueue& asyncEventQueue)41 SourceBufferList::SourceBufferList(ScriptExecutionContext* context) 43 42 : m_scriptExecutionContext(context) 44 , m_asyncEventQueue( asyncEventQueue)43 , m_asyncEventQueue(*this) 45 44 { 46 45 } 47 46 48 unsigned SourceBufferList::length() const 47 SourceBufferList::~SourceBufferList() 49 48 { 50 return m_list.size(); 51 } 52 53 SourceBuffer* SourceBufferList::item(unsigned index) const 54 { 55 if (index >= m_list.size()) 56 return 0; 57 return m_list[index].get(); 49 ASSERT(m_list.isEmpty()); 58 50 } 59 51 … … 61 53 { 62 54 m_list.append(buffer); 63 createAndFireEvent(eventNames().webkitaddsourcebufferEvent);55 scheduleEvent(eventNames().addsourcebufferEvent); 64 56 } 65 57 66 boolSourceBufferList::remove(SourceBuffer* buffer)58 void SourceBufferList::remove(SourceBuffer* buffer) 67 59 { 68 60 size_t index = m_list.find(buffer); 69 61 if (index == notFound) 70 return false; 71 72 buffer->removedFromMediaSource(); 62 return; 73 63 m_list.remove(index); 74 createAndFireEvent(eventNames().webkitremovesourcebufferEvent); 75 return true; 64 scheduleEvent(eventNames().removesourcebufferEvent); 76 65 } 77 66 78 67 void SourceBufferList::clear() 79 68 { 80 for (size_t i = 0; i < m_list.size(); ++i)81 m_list[i]->removedFromMediaSource();82 69 m_list.clear(); 83 createAndFireEvent(eventNames().webkitremovesourcebufferEvent);70 scheduleEvent(eventNames().removesourcebufferEvent); 84 71 } 85 72 86 void SourceBufferList:: createAndFireEvent(const AtomicString& eventName)73 void SourceBufferList::scheduleEvent(const AtomicString& eventName) 87 74 { 88 75 RefPtr<Event> event = Event::create(eventName, false, false); 89 76 event->setTarget(this); 77 90 78 m_asyncEventQueue.enqueueEvent(event.release()); 91 79 } … … 98 86 ScriptExecutionContext* SourceBufferList::scriptExecutionContext() const 99 87 { 100 return &m_scriptExecutionContext;88 return m_scriptExecutionContext; 101 89 } 102 90 -
trunk/Source/WebCore/Modules/mediasource/SourceBufferList.h
r155356 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 35 35 36 36 #include "EventTarget.h" 37 #include "GenericEventQueue.h" 38 #include "ScriptWrappable.h" 37 39 #include <wtf/RefCounted.h> 38 40 #include <wtf/Vector.h> … … 41 43 42 44 class SourceBuffer; 43 class GenericEventQueue;44 45 45 class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget {46 class SourceBufferList : public RefCounted<SourceBufferList>, public ScriptWrappable, public EventTarget { 46 47 public: 47 static PassRefPtr<SourceBufferList> create(ScriptExecutionContext & context, GenericEventQueue& asyncEventQueue)48 static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context) 48 49 { 49 return adoptRef(new SourceBufferList(context , asyncEventQueue));50 return adoptRef(new SourceBufferList(context)); 50 51 } 51 virtual ~SourceBufferList() { }52 virtual ~SourceBufferList(); 52 53 53 unsigned l ength() const;54 SourceBuffer* item(unsigned index) const;54 unsigned long length() const { return m_list.size(); } 55 SourceBuffer* item(unsigned long index) const { return (index < m_list.size()) ? m_list[index].get() : 0; } 55 56 56 57 void add(PassRefPtr<SourceBuffer>); 57 bool remove(SourceBuffer*); 58 void remove(SourceBuffer*); 59 bool contains(SourceBuffer* buffer) { return m_list.find(buffer) != notFound; } 58 60 void clear(); 59 61 … … 70 72 71 73 private: 72 SourceBufferList(ScriptExecutionContext* , GenericEventQueue*);74 SourceBufferList(ScriptExecutionContext*); 73 75 74 void createAndFireEvent(const AtomicString&);76 void scheduleEvent(const AtomicString&); 75 77 76 78 virtual void refEventTarget() OVERRIDE { ref(); } … … 78 80 79 81 EventTargetData m_eventTargetData; 80 ScriptExecutionContext &m_scriptExecutionContext;81 GenericEventQueue &m_asyncEventQueue;82 ScriptExecutionContext* m_scriptExecutionContext; 83 GenericEventQueue m_asyncEventQueue; 82 84 83 85 Vector<RefPtr<SourceBuffer> > m_list; … … 87 89 88 90 #endif 91 89 92 #endif -
trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl
r151499 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 [ 32 32 Conditional=MEDIA_SOURCE, 33 NoInterfaceObject, 33 34 EventTarget, 34 InterfaceName=WebKitSourceBufferList 35 ] interface SourceBufferList { 35 JSGenerateToNativeObject, 36 CallWith=ScriptExecutionContext 37 ] interface SourceBufferList : EventTarget { 36 38 readonly attribute unsigned long length; 37 39 getter SourceBuffer item(unsigned long index); 38 39 // EventTarget interface40 void addEventListener(DOMString type,41 EventListener listener,42 optional boolean useCapture);43 void removeEventListener(DOMString type,44 EventListener listener,45 optional boolean useCapture);46 [RaisesException] boolean dispatchEvent(Event event);47 40 }; 48 41 -
trunk/Source/WebCore/Modules/mediasource/URLMediaSource.cpp
r156048 r156049 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 #ifndef MediaSourcePrivate_h 31 #define MediaSourcePrivate_h 30 31 #include "config.h" 32 #include "URLMediaSource.h" 32 33 33 34 #if ENABLE(MEDIA_SOURCE) 34 35 35 #include <wtf/Forward.h> 36 #include "DOMURL.h" 37 #include "MediaSourceBase.h" 38 #include <wtf/MainThread.h> 36 39 37 40 namespace WebCore { 38 41 39 class SourceBufferPrivate; 42 String URLMediaSource::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaSourceBase* source) 43 { 44 // Since WebWorkers cannot obtain MediaSource objects, we should be on the main thread. 45 ASSERT(isMainThread()); 40 46 41 class MediaSourcePrivate { 42 public: 43 typedef Vector<String, 0> CodecsArray; 44 45 MediaSourcePrivate() { } 46 virtual ~MediaSourcePrivate() { } 47 48 enum AddStatus { Ok, NotSupported, ReachedIdLimit }; 49 virtual AddStatus addSourceBuffer(const String& type, const CodecsArray&, OwnPtr<SourceBufferPrivate>*) = 0; 50 virtual double duration() = 0; 51 virtual void setDuration(double) = 0; 52 enum EndOfStreamStatus { EosNoError, EosNetworkError, EosDecodeError }; 53 virtual void endOfStream(EndOfStreamStatus) = 0; 54 }; 55 47 if (!scriptExecutionContext || !source) 48 return String(); 49 return DOMURL::createPublicURL(scriptExecutionContext, source); 56 50 } 57 51 52 } // namespace WebCore 53 58 54 #endif 59 #endif -
trunk/Source/WebCore/Modules/mediasource/URLMediaSource.h
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 [32 Conditional=MEDIA_SOURCE,33 InterfaceName=WebKitSourceBuffer34 ] interface SourceBuffer {35 30 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 31 #ifndef URLMediaSource_h 32 #define URLMediaSource_h 38 33 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 34 #if ENABLE(MEDIA_SOURCE) 41 35 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 36 #include <wtf/Forward.h> 44 37 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 38 namespace WebCore { 39 40 class MediaSourceBase; 41 class ScriptExecutionContext; 42 43 class URLMediaSource { 44 public: 45 static String createObjectURL(ScriptExecutionContext*, MediaSourceBase*); 47 46 }; 48 47 48 } // namespace WebCore 49 50 #endif 51 52 #endif -
trunk/Source/WebCore/Modules/mediasource/URLMediaSource.idl
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 30 [ 32 Conditional=MEDIA_SOURCE, 33 InterfaceName=WebKitSourceBuffer 34 ] interface SourceBuffer { 35 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 38 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 41 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 44 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 31 Conditional=MEDIA_SOURCE 32 ] 33 partial interface URL { 34 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source); 35 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(WebKitMediaSource? source); 47 36 }; 48 -
trunk/Source/WebCore/Modules/mediasource/WebKitMediaSource.cpp
r156048 r156049 30 30 31 31 #include "config.h" 32 #include " MediaSource.h"32 #include "WebKitMediaSource.h" 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 36 #include "ContentType.h" 37 #include "E vent.h"37 #include "ExceptionCodePlaceholder.h" 38 38 #include "MIMETypeRegistry.h" 39 #include "MediaSourceRegistry.h" 39 40 #include "SourceBufferPrivate.h" 40 41 #include "TimeRanges.h" … … 43 44 namespace WebCore { 44 45 45 PassRefPtr< MediaSource>MediaSource::create(ScriptExecutionContext* context)46 { 47 RefPtr< MediaSource> mediaSource(adoptRef(newMediaSource(context)));46 PassRefPtr<WebKitMediaSource> WebKitMediaSource::create(ScriptExecutionContext* context) 47 { 48 RefPtr<WebKitMediaSource> mediaSource(adoptRef(new WebKitMediaSource(context))); 48 49 mediaSource->suspendIfNeeded(); 49 50 return mediaSource.release(); 50 51 } 51 52 52 MediaSource::MediaSource(ScriptExecutionContext* context) 53 : ActiveDOMObject(context) 54 , m_readyState(closedKeyword()) 53 WebKitMediaSource::WebKitMediaSource(ScriptExecutionContext* context) 54 : MediaSourceBase(context) 55 55 , m_asyncEventQueue(*this) 56 , m_sourceBuffers(SourceBufferList::create(scriptExecutionContext(), m_asyncEventQueue)) 57 , m_activeSourceBuffers(SourceBufferList::create(scriptExecutionContext(), m_asyncEventQueue)) 58 { 59 } 60 61 const String& MediaSource::openKeyword() 62 { 63 DEFINE_STATIC_LOCAL(const String, open, (ASCIILiteral("open"))); 64 return open; 65 } 66 67 const String& MediaSource::closedKeyword() 68 { 69 DEFINE_STATIC_LOCAL(const String, closed, (ASCIILiteral("closed"))); 70 return closed; 71 } 72 73 const String& MediaSource::endedKeyword() 74 { 75 DEFINE_STATIC_LOCAL(const String, ended, (ASCIILiteral("ended"))); 76 return ended; 77 } 78 79 SourceBufferList* MediaSource::sourceBuffers() 56 , m_sourceBuffers(WebKitSourceBufferList::create(scriptExecutionContext())) 57 , m_activeSourceBuffers(WebKitSourceBufferList::create(scriptExecutionContext())) 58 { 59 } 60 61 WebKitSourceBufferList* WebKitMediaSource::sourceBuffers() 80 62 { 81 63 return m_sourceBuffers.get(); 82 64 } 83 65 84 SourceBufferList*MediaSource::activeSourceBuffers()66 WebKitSourceBufferList* WebKitMediaSource::activeSourceBuffers() 85 67 { 86 68 // FIXME(91649): support track selection … … 88 70 } 89 71 90 double MediaSource::duration() const 91 { 92 return m_readyState == closedKeyword() ? std::numeric_limits<float>::quiet_NaN() : m_private->duration(); 93 } 94 95 void MediaSource::setDuration(double duration, ExceptionCode& ec) 96 { 97 if (duration < 0.0 || std::isnan(duration)) { 98 ec = INVALID_ACCESS_ERR; 99 return; 100 } 101 if (m_readyState != openKeyword()) { 102 ec = INVALID_STATE_ERR; 103 return; 104 } 105 m_private->setDuration(duration); 106 } 107 108 SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionCode& ec) 72 WebKitSourceBuffer* WebKitMediaSource::addSourceBuffer(const String& type, ExceptionCode& ec) 109 73 { 110 74 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-addsourcebuffer … … 125 89 // 4. If the readyState attribute is not in the "open" state then throw an 126 90 // INVALID_STATE_ERR exception and abort these steps. 127 if (! m_private || m_readyState != openKeyword()) {91 if (!isOpen()) { 128 92 ec = INVALID_STATE_ERR; 129 93 return 0; … … 133 97 ContentType contentType(type); 134 98 Vector<String> codecs = contentType.codecs(); 135 OwnPtr<SourceBufferPrivate> sourceBufferPrivate; 136 switch (m_private->addSourceBuffer(contentType.type(), codecs, &sourceBufferPrivate)) { 137 case MediaSourcePrivate::Ok: { 138 ASSERT(sourceBufferPrivate); 139 RefPtr<SourceBuffer> buffer = SourceBuffer::create(sourceBufferPrivate.release(), this); 140 141 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object. 142 m_sourceBuffers->add(buffer); 143 m_activeSourceBuffers->add(buffer); 144 // 7. Return the new object to the caller. 145 return buffer.get(); 146 } 147 case MediaSourcePrivate::NotSupported: 148 // 2 (cont). If type contains a MIME type ... that is not supported with the types 149 // specified for the other SourceBuffer objects in sourceBuffers, then throw 150 // a NOT_SUPPORTED_ERR exception and abort these steps. 151 ec = NOT_SUPPORTED_ERR; 152 return 0; 153 case MediaSourcePrivate::ReachedIdLimit: 154 // 3 (cont). If the user agent can't handle any more SourceBuffer objects then throw 155 // a QUOTA_EXCEEDED_ERR exception and abort these steps. 156 ec = QUOTA_EXCEEDED_ERR; 157 return 0; 158 } 159 160 ASSERT_NOT_REACHED(); 161 return 0; 162 } 163 164 void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionCode& ec) 99 OwnPtr<SourceBufferPrivate> sourceBufferPrivate = createSourceBufferPrivate(contentType.type(), codecs, ec); 100 if (!sourceBufferPrivate) 101 return 0; 102 103 RefPtr<WebKitSourceBuffer> buffer = WebKitSourceBuffer::create(sourceBufferPrivate.release(), this); 104 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object. 105 m_sourceBuffers->add(buffer); 106 m_activeSourceBuffers->add(buffer); 107 // 7. Return the new object to the caller. 108 return buffer.get(); 109 } 110 111 void WebKitMediaSource::removeSourceBuffer(WebKitSourceBuffer* buffer, ExceptionCode& ec) 165 112 { 166 113 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-removesourcebuffer … … 174 121 // 2. If sourceBuffers is empty then throw an INVALID_STATE_ERR exception and 175 122 // abort these steps. 176 if ( !m_private|| !m_sourceBuffers->length()) {123 if (isClosed() || !m_sourceBuffers->length()) { 177 124 ec = INVALID_STATE_ERR; 178 125 return; … … 191 138 m_activeSourceBuffers->remove(buffer); 192 139 193 // 4. Remove track information from audioTracks, videoTracks, and textTracks for all tracks 140 // 4. Remove track information from audioTracks, videoTracks, and textTracks for all tracks 194 141 // associated with sourceBuffer and fire a simple event named change on the modified lists. 195 142 // FIXME(91649): support track selection … … 200 147 } 201 148 202 const String& MediaSource::readyState() const 203 { 204 return m_readyState; 205 } 206 207 void MediaSource::setReadyState(const String& state) 208 { 209 ASSERT(state == openKeyword() || state == closedKeyword() || state == endedKeyword()); 210 if (m_readyState == state) 211 return; 212 213 String oldState = m_readyState; 214 m_readyState = state; 215 216 if (m_readyState == closedKeyword()) { 149 void WebKitMediaSource::onReadyStateChange(const AtomicString& oldState, const AtomicString& newState) 150 { 151 if (isClosed()) { 217 152 m_sourceBuffers->clear(); 218 153 m_activeSourceBuffers->clear(); 219 m_private.clear();220 154 scheduleEvent(eventNames().webkitsourcecloseEvent); 221 155 return; 222 156 } 223 157 224 if (oldState == openKeyword() && m_readyState == endedKeyword()) {158 if (oldState == openKeyword() && newState == endedKeyword()) { 225 159 scheduleEvent(eventNames().webkitsourceendedEvent); 226 160 return; 227 161 } 228 162 229 if ( m_readyState == openKeyword()) {163 if (isOpen()) { 230 164 scheduleEvent(eventNames().webkitsourceopenEvent); 231 165 return; … … 233 167 } 234 168 235 void MediaSource::endOfStream(const String& error, ExceptionCode& ec) 236 { 237 // 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-endofstream 238 // 1. If the readyState attribute is not in the "open" state then throw an 239 // INVALID_STATE_ERR exception and abort these steps. 240 if (!m_private || m_readyState != openKeyword()) { 241 ec = INVALID_STATE_ERR; 242 return; 243 } 244 245 MediaSourcePrivate::EndOfStreamStatus eosStatus = MediaSourcePrivate::EosNoError; 246 247 if (error.isNull() || error.isEmpty()) 248 eosStatus = MediaSourcePrivate::EosNoError; 249 else if (error == "network") 250 eosStatus = MediaSourcePrivate::EosNetworkError; 251 else if (error == "decode") 252 eosStatus = MediaSourcePrivate::EosDecodeError; 253 else { 254 ec = INVALID_ACCESS_ERR; 255 return; 256 } 257 258 // 2. Change the readyState attribute value to "ended". 259 setReadyState(endedKeyword()); 260 m_private->endOfStream(eosStatus); 261 } 262 263 bool MediaSource::isTypeSupported(const String& type) 169 Vector<RefPtr<TimeRanges> > WebKitMediaSource::activeRanges() const 170 { 171 Vector<RefPtr<TimeRanges> > activeRanges(m_activeSourceBuffers->length()); 172 for (size_t i = 0; i < m_activeSourceBuffers->length(); ++i) 173 activeRanges[i] = m_activeSourceBuffers->item(i)->buffered(ASSERT_NO_EXCEPTION); 174 175 return activeRanges; 176 } 177 178 bool WebKitMediaSource::isTypeSupported(const String& type) 264 179 { 265 180 // Section 2.1 isTypeSupported() method steps. … … 283 198 } 284 199 285 void MediaSource::setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate> mediaSourcePrivate) 286 { 287 ASSERT(mediaSourcePrivate); 288 ASSERT(!m_private); 289 m_private = mediaSourcePrivate; 290 setReadyState(openKeyword()); 291 } 292 293 const AtomicString& MediaSource::interfaceName() const 294 { 295 return eventNames().interfaceForMediaSource; 296 } 297 298 ScriptExecutionContext* MediaSource::scriptExecutionContext() const 299 { 300 return ActiveDOMObject::scriptExecutionContext(); 301 } 302 303 bool MediaSource::hasPendingActivity() const 304 { 305 return m_private || m_asyncEventQueue.hasPendingEvents() || ActiveDOMObject::hasPendingActivity(); 306 } 307 308 void MediaSource::stop() 309 { 310 m_private.clear(); 311 m_asyncEventQueue.cancelAllEvents(); 312 } 313 314 EventTargetData* MediaSource::eventTargetData() 315 { 316 return &m_eventTargetData; 317 } 318 319 EventTargetData& MediaSource::ensureEventTargetData() 320 { 321 return m_eventTargetData; 322 } 323 324 void MediaSource::scheduleEvent(const AtomicString& eventName) 325 { 326 RefPtr<Event> event = Event::create(eventName, false, false); 327 event->setTarget(this); 328 m_asyncEventQueue.enqueueEvent(event.release()); 200 const AtomicString& WebKitMediaSource::interfaceName() const 201 { 202 return eventNames().interfaceForWebKitMediaSource; 329 203 } 330 204 -
trunk/Source/WebCore/Modules/mediasource/WebKitMediaSource.h
r156048 r156049 29 29 */ 30 30 31 #ifndef SourceBufferList_h32 #define SourceBufferList_h31 #ifndef WebKitMediaSource_h 32 #define WebKitMediaSource_h 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "EventTarget.h" 36 #include "MediaSourceBase.h" 37 #include "ScriptWrappable.h" 38 #include "WebKitSourceBuffer.h" 39 #include "WebKitSourceBufferList.h" 37 40 #include <wtf/RefCounted.h> 38 #include <wtf/Vector.h>39 41 40 42 namespace WebCore { 41 43 42 class SourceBuffer; 43 class GenericEventQueue; 44 class WebKitMediaSource : public MediaSourceBase, public ScriptWrappable { 45 public: 46 static PassRefPtr<WebKitMediaSource> create(ScriptExecutionContext*); 47 virtual ~WebKitMediaSource() { } 44 48 45 class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget { 46 public: 47 static PassRefPtr<SourceBufferList> create(ScriptExecutionContext& context, GenericEventQueue& asyncEventQueue) 48 { 49 return adoptRef(new SourceBufferList(context, asyncEventQueue)); 50 } 51 virtual ~SourceBufferList() { } 52 53 unsigned length() const; 54 SourceBuffer* item(unsigned index) const; 55 56 void add(PassRefPtr<SourceBuffer>); 57 bool remove(SourceBuffer*); 58 void clear(); 49 // WebKitMediaSource.idl methods 50 WebKitSourceBufferList* sourceBuffers(); 51 WebKitSourceBufferList* activeSourceBuffers(); 52 WebKitSourceBuffer* addSourceBuffer(const String& type, ExceptionCode&); 53 void removeSourceBuffer(WebKitSourceBuffer*, ExceptionCode&); 54 static bool isTypeSupported(const String& type); 59 55 60 56 // EventTarget interface 61 57 virtual const AtomicString& interfaceName() const OVERRIDE; 62 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;63 58 64 using RefCounted<SourceBufferList>::ref; 65 using RefCounted<SourceBufferList>::deref; 66 67 protected: 68 virtual EventTargetData* eventTargetData() OVERRIDE; 69 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 59 using RefCounted<MediaSourceBase>::ref; 60 using RefCounted<MediaSourceBase>::deref; 70 61 71 62 private: 72 SourceBufferList(ScriptExecutionContext*, GenericEventQueue*);63 explicit WebKitMediaSource(ScriptExecutionContext*); 73 64 74 void createAndFireEvent(const AtomicString&); 65 // MediaSourceBase interface 66 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OVERRIDE; 67 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; 75 68 76 virtual void refEventTarget() OVERRIDE { ref(); } 77 virtual void derefEventTarget() OVERRIDE { deref(); } 78 79 EventTargetData m_eventTargetData; 80 ScriptExecutionContext& m_scriptExecutionContext; 81 GenericEventQueue& m_asyncEventQueue; 82 83 Vector<RefPtr<SourceBuffer> > m_list; 69 GenericEventQueue m_asyncEventQueue; 70 RefPtr<WebKitSourceBufferList> m_sourceBuffers; 71 RefPtr<WebKitSourceBufferList> m_activeSourceBuffers; 84 72 }; 85 73 -
trunk/Source/WebCore/Modules/mediasource/WebKitMediaSource.idl
r156048 r156049 33 33 ActiveDOMObject, 34 34 EventTarget, 35 JSGenerateToNativeObject, 35 36 Constructor, 36 ConstructorCallWith=ScriptExecutionContext, 37 InterfaceName=WebKitMediaSource 38 ] interface MediaSource { 37 ConstructorCallWith=ScriptExecutionContext 38 ] interface WebKitMediaSource : EventTarget { 39 39 // All the source buffers created by this object. 40 readonly attribute SourceBufferList sourceBuffers;40 readonly attribute WebKitSourceBufferList sourceBuffers; 41 41 42 42 // Subset of sourceBuffers that provide data for the selected/enabled tracks. 43 readonly attribute SourceBufferList activeSourceBuffers;43 readonly attribute WebKitSourceBufferList activeSourceBuffers; 44 44 45 45 [SetterRaisesException] attribute double duration; 46 46 47 [RaisesException] SourceBuffer addSourceBuffer(DOMString type);48 [RaisesException] void removeSourceBuffer( SourceBuffer buffer);47 [RaisesException] WebKitSourceBuffer addSourceBuffer(DOMString type); 48 [RaisesException] void removeSourceBuffer(WebKitSourceBuffer buffer); 49 49 50 50 readonly attribute DOMString readyState; … … 53 53 54 54 static boolean isTypeSupported (DOMString type); 55 56 // EventTarget interface57 void addEventListener(DOMString type,58 EventListener listener,59 optional boolean useCapture);60 void removeEventListener(DOMString type,61 EventListener listener,62 optional boolean useCapture);63 [RaisesException] boolean dispatchEvent(Event event);64 55 }; 65 56 -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBuffer.cpp
r156048 r156049 30 30 31 31 #include "config.h" 32 #include " SourceBuffer.h"32 #include "WebKitSourceBuffer.h" 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 #include "MediaSource.h"37 36 #include "SourceBufferPrivate.h" 38 37 #include "TimeRanges.h" 38 #include "WebKitMediaSource.h" 39 39 #include <runtime/Uint8Array.h> 40 40 41 41 namespace WebCore { 42 42 43 PassRefPtr< SourceBuffer> SourceBuffer::create(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<MediaSource> source)43 PassRefPtr<WebKitSourceBuffer> WebKitSourceBuffer::create(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<WebKitMediaSource> source) 44 44 { 45 return adoptRef(new SourceBuffer(sourceBufferPrivate, source));45 return adoptRef(new WebKitSourceBuffer(sourceBufferPrivate, source)); 46 46 } 47 47 48 SourceBuffer::SourceBuffer(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<MediaSource> source)48 WebKitSourceBuffer::WebKitSourceBuffer(PassOwnPtr<SourceBufferPrivate> sourceBufferPrivate, PassRefPtr<WebKitMediaSource> source) 49 49 : m_private(sourceBufferPrivate) 50 50 , m_source(source) … … 55 55 } 56 56 57 SourceBuffer::~SourceBuffer()57 WebKitSourceBuffer::~WebKitSourceBuffer() 58 58 { 59 59 } 60 60 61 PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode& ec) const61 PassRefPtr<TimeRanges> WebKitSourceBuffer::buffered(ExceptionCode& ec) const 62 62 { 63 63 // Section 3.1 buffered attribute steps. … … 73 73 } 74 74 75 double SourceBuffer::timestampOffset() const75 double WebKitSourceBuffer::timestampOffset() const 76 76 { 77 77 return m_timestampOffset; 78 78 } 79 79 80 void SourceBuffer::setTimestampOffset(double offset, ExceptionCode& ec)80 void WebKitSourceBuffer::setTimestampOffset(double offset, ExceptionCode& ec) 81 81 { 82 82 // Section 3.1 timestampOffset attribute setter steps. … … 89 89 90 90 // 4. If the readyState attribute of the parent media source is in the "ended" state then run the following steps: 91 if (isEnded()) { 92 // 4.1 Set the readyState attribute of the parent media source to "open" 93 // 4.2 Queue a task to fire a simple event named sourceopen at the parent media source. 94 m_source->setReadyState(MediaSource::openKeyword()); 95 } 91 // 4.1 Set the readyState attribute of the parent media source to "open" 92 // 4.2 Queue a task to fire a simple event named sourceopen at the parent media source. 93 m_source->openIfInEndedState(); 96 94 97 95 // 5. If this object is waiting for the end of a media segment to be appended, then throw an INVALID_STATE_ERR … … 106 104 } 107 105 108 void SourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionCode& ec)106 void WebKitSourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionCode& ec) 109 107 { 110 108 // SourceBuffer.append() steps from October 1st version of the Media Source Extensions spec. … … 125 123 126 124 // 5. If the readyState attribute of media source is in the "ended" state then run the following steps: 127 if (isEnded()) { 128 // 5.1. Set the readyState attribute of media source to "open" 129 // 5.2. Queue a task to fire a simple event named sourceopen at media source. 130 m_source->setReadyState(MediaSource::openKeyword()); 131 } 125 // 5.1. Set the readyState attribute of media source to "open" 126 // 5.2. Queue a task to fire a simple event named sourceopen at media source. 127 m_source->openIfInEndedState(); 132 128 133 129 // Steps 6 & beyond are handled by the private implementation. … … 135 131 } 136 132 137 void SourceBuffer::abort(ExceptionCode& ec)133 void WebKitSourceBuffer::abort(ExceptionCode& ec) 138 134 { 139 135 // Section 3.2 abort() method steps. … … 142 138 // 2. If the readyState attribute of the parent media source is not in the "open" state 143 139 // then throw an INVALID_STATE_ERR exception and abort these steps. 144 if (isRemoved() || ! isOpen()) {140 if (isRemoved() || !m_source->isOpen()) { 145 141 ec = INVALID_STATE_ERR; 146 142 return; … … 151 147 } 152 148 153 void SourceBuffer::removedFromMediaSource()149 void WebKitSourceBuffer::removedFromMediaSource() 154 150 { 155 151 if (isRemoved()) … … 160 156 } 161 157 162 bool SourceBuffer::isRemoved() const158 bool WebKitSourceBuffer::isRemoved() const 163 159 { 164 160 return !m_source; 165 }166 167 bool SourceBuffer::isOpen() const168 {169 ASSERT(m_source);170 return m_source->readyState() == MediaSource::openKeyword();171 }172 173 bool SourceBuffer::isEnded() const174 {175 ASSERT(m_source);176 return m_source->readyState() == MediaSource::endedKeyword();177 161 } 178 162 -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBuffer.h
r156048 r156049 29 29 */ 30 30 31 #ifndef SourceBuffer_h32 #define SourceBuffer_h31 #ifndef WebKitSourceBuffer_h 32 #define WebKitSourceBuffer_h 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 36 #include "ExceptionCode.h" 37 #include "ScriptWrappable.h" 38 #include <runtime/Uint8Array.h> 37 39 #include <wtf/PassRefPtr.h> 38 40 #include <wtf/RefCounted.h> … … 40 42 41 43 namespace WebCore { 42 class MediaSource;43 44 class SourceBufferPrivate; 44 45 class TimeRanges; 46 class WebKitMediaSource; 45 47 46 class SourceBuffer : public RefCounted<SourceBuffer>{48 class WebKitSourceBuffer : public RefCounted<WebKitSourceBuffer>, public ScriptWrappable { 47 49 public: 48 static PassRefPtr< SourceBuffer> create(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<MediaSource>);50 static PassRefPtr<WebKitSourceBuffer> create(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<WebKitMediaSource>); 49 51 50 virtual ~ SourceBuffer();52 virtual ~WebKitSourceBuffer(); 51 53 52 // SourceBuffer.idl methods54 // WebKitSourceBuffer.idl methods 53 55 PassRefPtr<TimeRanges> buffered(ExceptionCode&) const; 54 56 double timestampOffset() const; 55 57 void setTimestampOffset(double, ExceptionCode&); 56 void append(PassRefPtr< Uint8Array> data, ExceptionCode&);58 void append(PassRefPtr<JSC::Uint8Array> data, ExceptionCode&); 57 59 void abort(ExceptionCode&); 58 60 … … 60 62 61 63 private: 62 SourceBuffer(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<MediaSource>);64 WebKitSourceBuffer(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<WebKitMediaSource>); 63 65 64 66 bool isRemoved() const; 65 bool isOpen() const;66 bool isEnded() const;67 67 68 68 OwnPtr<SourceBufferPrivate> m_private; 69 RefPtr< MediaSource> m_source;69 RefPtr<WebKitMediaSource> m_source; 70 70 71 71 double m_timestampOffset; -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBuffer.idl
r156048 r156049 30 30 31 31 [ 32 Conditional=MEDIA_SOURCE, 33 InterfaceName=WebKitSourceBuffer 34 ] interface SourceBuffer { 32 Conditional=MEDIA_SOURCE 33 ] interface WebKitSourceBuffer { 35 34 36 35 // Returns the time ranges buffered. -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBufferList.cpp
r156048 r156049 30 30 31 31 #include "config.h" 32 #include " SourceBufferList.h"32 #include "WebKitSourceBufferList.h" 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 36 #include "Event.h" 37 #include "GenericEventQueue.h" 38 #include "SourceBuffer.h" 37 #include "WebKitSourceBuffer.h" 39 38 40 39 namespace WebCore { 41 40 42 SourceBufferList::SourceBufferList(ScriptExecutionContext& context, GenericEventQueue& asyncEventQueue)41 WebKitSourceBufferList::WebKitSourceBufferList(ScriptExecutionContext* context) 43 42 : m_scriptExecutionContext(context) 44 , m_asyncEventQueue( asyncEventQueue)43 , m_asyncEventQueue(*this) 45 44 { 46 45 } 47 46 48 unsigned SourceBufferList::length() const 47 WebKitSourceBufferList::~WebKitSourceBufferList() 48 { 49 } 50 51 unsigned WebKitSourceBufferList::length() const 49 52 { 50 53 return m_list.size(); 51 54 } 52 55 53 SourceBuffer*SourceBufferList::item(unsigned index) const56 WebKitSourceBuffer* WebKitSourceBufferList::item(unsigned index) const 54 57 { 55 58 if (index >= m_list.size()) … … 58 61 } 59 62 60 void SourceBufferList::add(PassRefPtr<SourceBuffer> buffer)63 void WebKitSourceBufferList::add(PassRefPtr<WebKitSourceBuffer> buffer) 61 64 { 62 65 m_list.append(buffer); … … 64 67 } 65 68 66 bool SourceBufferList::remove(SourceBuffer* buffer)69 bool WebKitSourceBufferList::remove(WebKitSourceBuffer* buffer) 67 70 { 68 71 size_t index = m_list.find(buffer); … … 76 79 } 77 80 78 void SourceBufferList::clear()81 void WebKitSourceBufferList::clear() 79 82 { 80 83 for (size_t i = 0; i < m_list.size(); ++i) … … 84 87 } 85 88 86 void SourceBufferList::createAndFireEvent(const AtomicString& eventName)89 void WebKitSourceBufferList::createAndFireEvent(const AtomicString& eventName) 87 90 { 88 91 RefPtr<Event> event = Event::create(eventName, false, false); … … 91 94 } 92 95 93 const AtomicString& SourceBufferList::interfaceName() const96 const AtomicString& WebKitSourceBufferList::interfaceName() const 94 97 { 95 return eventNames().interfaceFor SourceBufferList;98 return eventNames().interfaceForWebKitSourceBufferList; 96 99 } 97 100 98 ScriptExecutionContext* SourceBufferList::scriptExecutionContext() const101 ScriptExecutionContext* WebKitSourceBufferList::scriptExecutionContext() const 99 102 { 100 return &m_scriptExecutionContext;103 return m_scriptExecutionContext; 101 104 } 102 105 103 EventTargetData* SourceBufferList::eventTargetData()106 EventTargetData* WebKitSourceBufferList::eventTargetData() 104 107 { 105 108 return &m_eventTargetData; 106 109 } 107 110 108 EventTargetData& SourceBufferList::ensureEventTargetData()111 EventTargetData& WebKitSourceBufferList::ensureEventTargetData() 109 112 { 110 113 return m_eventTargetData; -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBufferList.h
r156048 r156049 29 29 */ 30 30 31 #ifndef SourceBufferList_h32 #define SourceBufferList_h31 #ifndef WebKitSourceBufferList_h 32 #define WebKitSourceBufferList_h 33 33 34 34 #if ENABLE(MEDIA_SOURCE) 35 35 36 36 #include "EventTarget.h" 37 #include "GenericEventQueue.h" 38 #include "ScriptWrappable.h" 37 39 #include <wtf/RefCounted.h> 38 40 #include <wtf/Vector.h> … … 40 42 namespace WebCore { 41 43 42 class SourceBuffer;44 class WebKitSourceBuffer; 43 45 class GenericEventQueue; 44 46 45 class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget {47 class WebKitSourceBufferList : public RefCounted<WebKitSourceBufferList>, public ScriptWrappable, public EventTarget { 46 48 public: 47 static PassRefPtr< SourceBufferList> create(ScriptExecutionContext& context, GenericEventQueue& asyncEventQueue)49 static PassRefPtr<WebKitSourceBufferList> create(ScriptExecutionContext* context) 48 50 { 49 return adoptRef(new SourceBufferList(context, asyncEventQueue));51 return adoptRef(new WebKitSourceBufferList(context)); 50 52 } 51 virtual ~ SourceBufferList() { }53 virtual ~WebKitSourceBufferList(); 52 54 53 55 unsigned length() const; 54 SourceBuffer* item(unsigned index) const;56 WebKitSourceBuffer* item(unsigned index) const; 55 57 56 void add(PassRefPtr< SourceBuffer>);57 bool remove( SourceBuffer*);58 void add(PassRefPtr<WebKitSourceBuffer>); 59 bool remove(WebKitSourceBuffer*); 58 60 void clear(); 59 61 … … 62 64 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; 63 65 64 using RefCounted< SourceBufferList>::ref;65 using RefCounted< SourceBufferList>::deref;66 using RefCounted<WebKitSourceBufferList>::ref; 67 using RefCounted<WebKitSourceBufferList>::deref; 66 68 67 69 protected: … … 70 72 71 73 private: 72 SourceBufferList(ScriptExecutionContext*, GenericEventQueue*);74 WebKitSourceBufferList(ScriptExecutionContext*); 73 75 74 76 void createAndFireEvent(const AtomicString&); … … 78 80 79 81 EventTargetData m_eventTargetData; 80 ScriptExecutionContext &m_scriptExecutionContext;81 GenericEventQueue &m_asyncEventQueue;82 ScriptExecutionContext* m_scriptExecutionContext; 83 GenericEventQueue m_asyncEventQueue; 82 84 83 Vector<RefPtr< SourceBuffer> > m_list;85 Vector<RefPtr<WebKitSourceBuffer> > m_list; 84 86 }; 85 87 -
trunk/Source/WebCore/Modules/mediasource/WebKitSourceBufferList.idl
r156048 r156049 31 31 [ 32 32 Conditional=MEDIA_SOURCE, 33 InterfaceName=WebKitSourceBuffer 34 ] interface SourceBuffer { 35 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 38 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 41 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 44 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 33 EventTarget, 34 JSGenerateToNativeObject 35 ] interface WebKitSourceBufferList : EventTarget { 36 readonly attribute unsigned long length; 37 getter WebKitSourceBuffer item(unsigned long index); 47 38 }; 48 39 -
trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp
r155573 r156049 32 32 #include "ExceptionCode.h" 33 33 #include "MediaStreamCenter.h" 34 #include "MediaStreamRegistry.h" 34 35 #include "MediaStreamSource.h" 35 36 #include "MediaStreamTrackEvent.h" … … 354 355 } 355 356 357 URLRegistry& MediaStream::registry() const 358 { 359 return MediaStreamRegistry::registry(); 360 } 361 356 362 } // namespace WebCore 357 363 -
trunk/Source/WebCore/Modules/mediastream/MediaStream.h
r155789 r156049 36 36 #include "ScriptWrappable.h" 37 37 #include "Timer.h" 38 #include "URLRegistry.h" 38 39 #include <wtf/RefCounted.h> 39 40 #include <wtf/RefPtr.h> … … 41 42 namespace WebCore { 42 43 43 class MediaStream : public RefCounted<MediaStream>, public ScriptWrappable, public MediaStreamDescriptorClient, public EventTarget, public ContextDestructionObserver {44 class MediaStream : public RefCounted<MediaStream>, public URLRegistrable, public ScriptWrappable, public MediaStreamDescriptorClient, public EventTarget, public ContextDestructionObserver { 44 45 public: 45 46 static PassRefPtr<MediaStream> create(ScriptExecutionContext*); … … 77 78 using RefCounted<MediaStream>::ref; 78 79 using RefCounted<MediaStream>::deref; 80 81 // URLRegistrable 82 virtual URLRegistry& registry() const OVERRIDE; 79 83 80 84 protected: -
trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp
r155248 r156049 42 42 } 43 43 44 void MediaStreamRegistry::register MediaStreamURL(const KURL& url, PassRefPtr<MediaStream>stream)44 void MediaStreamRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegistrable* stream) 45 45 { 46 ASSERT(&stream->registry() == this); 46 47 ASSERT(isMainThread()); 47 m_streamDescriptors.set(url.string(), st ream->descriptor());48 m_streamDescriptors.set(url.string(), static_cast<MediaStream*>(stream)->descriptor()); 48 49 } 49 50 50 void MediaStreamRegistry::unregister MediaStreamURL(const KURL& url)51 void MediaStreamRegistry::unregisterURL(const KURL& url) 51 52 { 52 53 ASSERT(isMainThread()); -
trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h
r99087 r156049 28 28 #if ENABLE(MEDIA_STREAM) 29 29 30 #include "URLRegistry.h" 30 31 #include <wtf/HashMap.h> 31 32 #include <wtf/PassRefPtr.h> … … 38 39 class MediaStreamDescriptor; 39 40 40 class MediaStreamRegistry {41 class MediaStreamRegistry : public URLRegistry { 41 42 public: 42 43 // Returns a single instance of MediaStreamRegistry. … … 44 45 45 46 // Registers a blob URL referring to the specified stream data. 46 v oid registerMediaStreamURL(const KURL&, PassRefPtr<MediaStream>);47 v oid unregisterMediaStreamURL(const KURL&);47 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE; 48 virtual void unregisterURL(const KURL&) OVERRIDE; 48 49 49 50 MediaStreamDescriptor* lookupMediaStreamDescriptor(const String& url); -
trunk/Source/WebCore/Modules/mediastream/URLMediaStream.cpp
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 [32 Conditional=MEDIA_SOURCE,33 InterfaceName=WebKitSourceBuffer34 ] interface SourceBuffer {35 30 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 31 #include "config.h" 32 #include "URLMediaStream.h" 38 33 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 34 #include "DOMURL.h" 35 #include "MediaStream.h" 36 #include <wtf/MainThread.h> 41 37 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 38 namespace WebCore { 44 39 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 47 }; 40 String URLMediaStream::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaStream* stream) 41 { 42 // Since WebWorkers cannot obtain Stream objects, we should be on the main thread. 43 ASSERT(isMainThread()); 48 44 45 if (!scriptExecutionContext || !stream) 46 return String(); 47 return DOMURL::createPublicURL(scriptExecutionContext, stream); 48 } 49 50 51 } // namespace WebCore -
trunk/Source/WebCore/Modules/mediastream/URLMediaStream.h
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 [32 Conditional=MEDIA_SOURCE,33 InterfaceName=WebKitSourceBuffer34 ] interface SourceBuffer {35 30 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 31 #ifndef URLMediaStream_h 32 #define URLMediaStream_h 38 33 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 34 #include <wtf/Forward.h> 41 35 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 36 namespace WebCore { 44 37 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 38 class MediaStream; 39 class ScriptExecutionContext; 40 41 class URLMediaStream { 42 public: 43 static String createObjectURL(ScriptExecutionContext*, MediaStream*); 47 44 }; 48 45 46 } // namespace WebCore 47 48 #endif -
trunk/Source/WebCore/Modules/mediastream/URLMediaStream.idl
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 [ 32 Conditional=MEDIA_SOURCE, 33 InterfaceName=WebKitSourceBuffer 34 ] interface SourceBuffer { 35 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 38 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 41 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 44 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 30 partial interface URL { 31 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream); 47 32 }; 48 -
trunk/Source/WebCore/Target.pri
r156038 r156049 694 694 html/PasswordInputType.cpp \ 695 695 html/PluginDocument.cpp \ 696 html/PublicURLManager.cpp \ 696 697 html/RadioInputType.cpp \ 697 698 html/RadioNodeList.cpp \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r156038 r156049 103 103 0720B0A114D3323500642955 /* GenericEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0720B09F14D3323500642955 /* GenericEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 104 104 0720B0A114D3323500642957 /* GestureEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 0720B09F14D3323500642957 /* GestureEvent.h */; settings = {ATTRIBUTES = (Private, ); }; }; 105 07277E4A17D018CC0015534D /* JSMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07277E3E17D018CC0015534D /* JSMediaSource.cpp */; };106 07277E4B17D018CC0015534D /* JSMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E3F17D018CC0015534D /* JSMediaSource.h */; };107 105 07277E4C17D018CC0015534D /* JSMediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07277E4017D018CC0015534D /* JSMediaStream.cpp */; }; 108 106 07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534D /* JSMediaStream.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5297 5295 CD27F6E7145770D30078207D /* MediaController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD27F6E6145770D30078207D /* MediaController.cpp */; }; 5298 5296 CD37B39815C1B971006DC898 /* DiagnosticLoggingKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD37B37415C1A7E1006DC898 /* DiagnosticLoggingKeys.cpp */; }; 5297 CD3A495217A9C8C600274E42 /* MediaSourceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3A495117A9C8B600274E42 /* MediaSourceBase.h */; }; 5298 CD3A495417A9CC9000274E42 /* MediaSourceBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3A495017A9C8B600274E42 /* MediaSourceBase.cpp */; }; 5299 CD3A495E17A9D01B00274E42 /* MediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3A495517A9D01B00274E42 /* MediaSource.cpp */; }; 5300 CD3A495F17A9D01B00274E42 /* MediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3A495617A9D01B00274E42 /* MediaSource.h */; }; 5301 CD3A496117A9D01B00274E42 /* SourceBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3A495817A9D01B00274E42 /* SourceBuffer.cpp */; }; 5302 CD3A496217A9D01B00274E42 /* SourceBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3A495917A9D01B00274E42 /* SourceBuffer.h */; }; 5303 CD3A496417A9D01B00274E42 /* SourceBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3A495B17A9D01B00274E42 /* SourceBufferList.cpp */; }; 5304 CD3A496517A9D01B00274E42 /* SourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3A495C17A9D01B00274E42 /* SourceBufferList.h */; }; 5299 5305 CD47B3FC16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD47B3FA16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm */; }; 5300 5306 CD4AC52A1496AE9A0087C4EF /* Composite.wav in Copy Audio Resources */ = {isa = PBXBuildFile; fileRef = CD4AC5281496AE2F0087C4EF /* Composite.wav */; }; … … 5303 5309 CD54DE4717468B6F005E5B36 /* AudioSessionManagerMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4517468B6F005E5B36 /* AudioSessionManagerMac.cpp */; }; 5304 5310 CD54DE4B17469C6D005E5B36 /* AudioSessionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */; }; 5311 CD61FE631794AADB004101EB /* WebKitMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942DE15B5CE2200D525D1 /* WebKitMediaSource.cpp */; }; 5312 CD61FE641794AADB004101EB /* WebKitMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = B1A942DF15B5CE2200D525D1 /* WebKitMediaSource.h */; }; 5313 CD61FE671794AADB004101EB /* MediaSourceRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */; }; 5314 CD61FE681794AADB004101EB /* MediaSourceRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = B1A942E215B5CE2200D525D1 /* MediaSourceRegistry.h */; }; 5315 CD61FE691794AADB004101EB /* WebKitSourceBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942E315B5CE2200D525D1 /* WebKitSourceBuffer.cpp */; }; 5316 CD61FE6A1794AADB004101EB /* WebKitSourceBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B1A942E415B5CE2200D525D1 /* WebKitSourceBuffer.h */; }; 5317 CD61FE6B1794AADB004101EB /* WebKitSourceBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942E615B5CE2200D525D1 /* WebKitSourceBufferList.cpp */; }; 5318 CD61FE6C1794AADB004101EB /* WebKitSourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = B1A942E715B5CE2200D525D1 /* WebKitSourceBufferList.h */; }; 5319 CD61FE7E1794CB26004101EB /* JSWebKitMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD61FE7C1794CB26004101EB /* JSWebKitMediaSource.cpp */; }; 5320 CD61FE7F1794CB26004101EB /* JSWebKitMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD61FE7D1794CB26004101EB /* JSWebKitMediaSource.h */; }; 5321 CD61FE841794CC59004101EB /* JSWebKitSourceBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD61FE801794CC59004101EB /* JSWebKitSourceBuffer.cpp */; }; 5322 CD61FE851794CC59004101EB /* JSWebKitSourceBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = CD61FE811794CC59004101EB /* JSWebKitSourceBuffer.h */; }; 5323 CD61FE861794CC59004101EB /* JSWebKitSourceBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD61FE821794CC59004101EB /* JSWebKitSourceBufferList.cpp */; }; 5324 CD61FE871794CC59004101EB /* JSWebKitSourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = CD61FE831794CC59004101EB /* JSWebKitSourceBufferList.h */; }; 5305 5325 CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */; }; 5306 5326 CD82030A1395AB6A00F956C6 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5310 5330 CD8203101395ACE700F956C6 /* WebWindowAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5311 5331 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */; }; 5332 CD9DE17417AAC74C00EA386D /* JSMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE17217AAC74C00EA386D /* JSMediaSource.cpp */; }; 5333 CD9DE17517AAC74C00EA386D /* JSMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17317AAC74C00EA386D /* JSMediaSource.h */; }; 5334 CD9DE17A17AAC75B00EA386D /* JSSourceBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE17617AAC75B00EA386D /* JSSourceBuffer.cpp */; }; 5335 CD9DE17B17AAC75B00EA386D /* JSSourceBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17717AAC75B00EA386D /* JSSourceBuffer.h */; }; 5336 CD9DE17C17AAC75B00EA386D /* JSSourceBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE17817AAC75B00EA386D /* JSSourceBufferList.cpp */; }; 5337 CD9DE17D17AAC75B00EA386D /* JSSourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17917AAC75B00EA386D /* JSSourceBufferList.h */; }; 5338 CD9DE18117AAD6A400EA386D /* URLMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE17E17AAD64E00EA386D /* URLMediaSource.cpp */; }; 5339 CD9DE18217AAD6A400EA386D /* URLMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE17F17AAD64E00EA386D /* URLMediaSource.h */; }; 5340 CD9DE18517AB0CF300EA386D /* HTMLMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD9DE18317AB0CF300EA386D /* HTMLMediaSource.cpp */; }; 5341 CD9DE18617AB0CF300EA386D /* HTMLMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD9DE18417AB0CF300EA386D /* HTMLMediaSource.h */; }; 5312 5342 CDA79824170A258300D45C55 /* AudioSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA79823170A258300D45C55 /* AudioSession.cpp */; }; 5313 5343 CDA79827170A279100D45C55 /* AudioSessionIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA79825170A279000D45C55 /* AudioSessionIOS.mm */; }; … … 5339 5369 CDEA7C841276230400B846DD /* RenderFullScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEA7C821276230400B846DD /* RenderFullScreen.h */; }; 5340 5370 CDEA7C851276230400B846DD /* RenderFullScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA7C831276230400B846DD /* RenderFullScreen.cpp */; }; 5371 CDEE393717974259001D7580 /* PublicURLManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEE393617974259001D7580 /* PublicURLManager.cpp */; }; 5341 5372 CDF65CC8145B1E7500C4C7AA /* MediaController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD27F6E4145767870078207D /* MediaController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5342 5373 CDF65CCA145B448800C4C7AA /* MediaControllerInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF65CC9145B43A700C4C7AA /* MediaControllerInterface.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 6533 6564 07221BAF17CF0AD400848E51 /* RTCStatsResponseBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCStatsResponseBase.h; sourceTree = "<group>"; }; 6534 6565 07221BB017CF0AD400848E51 /* RTCVoidRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCVoidRequest.h; sourceTree = "<group>"; }; 6535 07277E3E17D018CC0015534D /* JSMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaSource.cpp; sourceTree = "<group>"; };6536 07277E3F17D018CC0015534D /* JSMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaSource.h; sourceTree = "<group>"; };6537 6566 07277E4017D018CC0015534D /* JSMediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStream.cpp; sourceTree = "<group>"; }; 6538 6567 07277E4117D018CC0015534D /* JSMediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStream.h; sourceTree = "<group>"; }; … … 10676 10705 B10B697F140C174000BC1C26 /* WebVTTTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTTokenizer.h; sourceTree = "<group>"; }; 10677 10706 B1827492134CA4C100B98C2D /* CallbackFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallbackFunction.cpp; sourceTree = "<group>"; }; 10678 B1A942DE15B5CE2200D525D1 /* MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path =MediaSource.cpp; sourceTree = "<group>"; };10679 B1A942DF15B5CE2200D525D1 /* MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =MediaSource.h; sourceTree = "<group>"; };10680 B1A942E015B5CE2200D525D1 /* MediaSource.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path =MediaSource.idl; sourceTree = "<group>"; };10707 B1A942DE15B5CE2200D525D1 /* WebKitMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitMediaSource.cpp; sourceTree = "<group>"; }; 10708 B1A942DF15B5CE2200D525D1 /* WebKitMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitMediaSource.h; sourceTree = "<group>"; }; 10709 B1A942E015B5CE2200D525D1 /* WebKitMediaSource.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitMediaSource.idl; sourceTree = "<group>"; }; 10681 10710 B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceRegistry.cpp; sourceTree = "<group>"; }; 10682 10711 B1A942E215B5CE2200D525D1 /* MediaSourceRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceRegistry.h; sourceTree = "<group>"; }; 10683 B1A942E315B5CE2200D525D1 /* SourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path =SourceBuffer.cpp; sourceTree = "<group>"; };10684 B1A942E415B5CE2200D525D1 /* SourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =SourceBuffer.h; sourceTree = "<group>"; };10685 B1A942E515B5CE2200D525D1 /* SourceBuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path =SourceBuffer.idl; sourceTree = "<group>"; };10686 B1A942E615B5CE2200D525D1 /* SourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path =SourceBufferList.cpp; sourceTree = "<group>"; };10687 B1A942E715B5CE2200D525D1 /* SourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =SourceBufferList.h; sourceTree = "<group>"; };10688 B1A942E815B5CE2200D525D1 /* SourceBufferList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path =SourceBufferList.idl; sourceTree = "<group>"; };10712 B1A942E315B5CE2200D525D1 /* WebKitSourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitSourceBuffer.cpp; sourceTree = "<group>"; }; 10713 B1A942E415B5CE2200D525D1 /* WebKitSourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSourceBuffer.h; sourceTree = "<group>"; }; 10714 B1A942E515B5CE2200D525D1 /* WebKitSourceBuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSourceBuffer.idl; sourceTree = "<group>"; }; 10715 B1A942E615B5CE2200D525D1 /* WebKitSourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitSourceBufferList.cpp; sourceTree = "<group>"; }; 10716 B1A942E715B5CE2200D525D1 /* WebKitSourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSourceBufferList.h; sourceTree = "<group>"; }; 10717 B1A942E815B5CE2200D525D1 /* WebKitSourceBufferList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSourceBufferList.idl; sourceTree = "<group>"; }; 10689 10718 B1AD4E7113A12A4600846B27 /* TextTrackLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextTrackLoader.cpp; path = loader/TextTrackLoader.cpp; sourceTree = SOURCE_ROOT; }; 10690 10719 B1AD4E7213A12A4600846B27 /* TextTrackLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrackLoader.h; path = loader/TextTrackLoader.h; sourceTree = SOURCE_ROOT; }; … … 12166 12195 CD37B37415C1A7E1006DC898 /* DiagnosticLoggingKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DiagnosticLoggingKeys.cpp; sourceTree = "<group>"; }; 12167 12196 CD37B37515C1A7E1006DC898 /* DiagnosticLoggingKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiagnosticLoggingKeys.h; sourceTree = "<group>"; }; 12197 CD3A495017A9C8B600274E42 /* MediaSourceBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceBase.cpp; sourceTree = "<group>"; }; 12198 CD3A495117A9C8B600274E42 /* MediaSourceBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaSourceBase.h; sourceTree = "<group>"; }; 12199 CD3A495517A9D01B00274E42 /* MediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSource.cpp; sourceTree = "<group>"; }; 12200 CD3A495617A9D01B00274E42 /* MediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSource.h; sourceTree = "<group>"; }; 12201 CD3A495717A9D01B00274E42 /* MediaSource.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaSource.idl; sourceTree = "<group>"; }; 12202 CD3A495817A9D01B00274E42 /* SourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceBuffer.cpp; sourceTree = "<group>"; }; 12203 CD3A495917A9D01B00274E42 /* SourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBuffer.h; sourceTree = "<group>"; }; 12204 CD3A495A17A9D01B00274E42 /* SourceBuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourceBuffer.idl; sourceTree = "<group>"; }; 12205 CD3A495B17A9D01B00274E42 /* SourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceBufferList.cpp; sourceTree = "<group>"; }; 12206 CD3A495C17A9D01B00274E42 /* SourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferList.h; sourceTree = "<group>"; }; 12207 CD3A495D17A9D01B00274E42 /* SourceBufferList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourceBufferList.idl; sourceTree = "<group>"; }; 12168 12208 CD47B3F916CC34F800A21EC8 /* CDMPrivateAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDMPrivateAVFoundation.h; path = Modules/encryptedmedia/CDMPrivateAVFoundation.h; sourceTree = "<group>"; }; 12169 12209 CD47B3FA16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CDMPrivateAVFoundation.mm; path = Modules/encryptedmedia/CDMPrivateAVFoundation.mm; sourceTree = "<group>"; }; … … 12176 12216 CD54DE4517468B6F005E5B36 /* AudioSessionManagerMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionManagerMac.cpp; sourceTree = "<group>"; }; 12177 12217 CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionMac.cpp; sourceTree = "<group>"; }; 12218 CD61FE7C1794CB26004101EB /* JSWebKitMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitMediaSource.cpp; sourceTree = "<group>"; }; 12219 CD61FE7D1794CB26004101EB /* JSWebKitMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitMediaSource.h; sourceTree = "<group>"; }; 12220 CD61FE801794CC59004101EB /* JSWebKitSourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitSourceBuffer.cpp; sourceTree = "<group>"; }; 12221 CD61FE811794CC59004101EB /* JSWebKitSourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitSourceBuffer.h; sourceTree = "<group>"; }; 12222 CD61FE821794CC59004101EB /* JSWebKitSourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitSourceBufferList.cpp; sourceTree = "<group>"; }; 12223 CD61FE831794CC59004101EB /* JSWebKitSourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitSourceBufferList.h; sourceTree = "<group>"; }; 12178 12224 CD7E05201651A84100C1201F /* WebCoreAVFResourceLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebCoreAVFResourceLoader.h; path = objc/WebCoreAVFResourceLoader.h; sourceTree = "<group>"; }; 12179 12225 CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WebCoreAVFResourceLoader.mm; path = objc/WebCoreAVFResourceLoader.mm; sourceTree = "<group>"; }; … … 12184 12230 CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebWindowAnimation.h; sourceTree = "<group>"; }; 12185 12231 CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebWindowAnimation.mm; sourceTree = "<group>"; }; 12232 CD9DE17217AAC74C00EA386D /* JSMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaSource.cpp; sourceTree = "<group>"; }; 12233 CD9DE17317AAC74C00EA386D /* JSMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaSource.h; sourceTree = "<group>"; }; 12234 CD9DE17617AAC75B00EA386D /* JSSourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSourceBuffer.cpp; sourceTree = "<group>"; }; 12235 CD9DE17717AAC75B00EA386D /* JSSourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSourceBuffer.h; sourceTree = "<group>"; }; 12236 CD9DE17817AAC75B00EA386D /* JSSourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSourceBufferList.cpp; sourceTree = "<group>"; }; 12237 CD9DE17917AAC75B00EA386D /* JSSourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSourceBufferList.h; sourceTree = "<group>"; }; 12238 CD9DE17E17AAD64E00EA386D /* URLMediaSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = URLMediaSource.cpp; sourceTree = "<group>"; }; 12239 CD9DE17F17AAD64E00EA386D /* URLMediaSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLMediaSource.h; sourceTree = "<group>"; }; 12240 CD9DE18017AAD64E00EA386D /* URLMediaSource.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = URLMediaSource.idl; sourceTree = "<group>"; }; 12241 CD9DE18317AB0CF300EA386D /* HTMLMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMediaSource.cpp; sourceTree = "<group>"; }; 12242 CD9DE18417AB0CF300EA386D /* HTMLMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMediaSource.h; sourceTree = "<group>"; }; 12186 12243 CDA79821170A22DC00D45C55 /* AudioSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioSession.h; sourceTree = "<group>"; }; 12187 12244 CDA79822170A24F400D45C55 /* AudioSessionListener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioSessionListener.h; sourceTree = "<group>"; }; … … 12242 12299 CDEA7C821276230400B846DD /* RenderFullScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFullScreen.h; sourceTree = "<group>"; }; 12243 12300 CDEA7C831276230400B846DD /* RenderFullScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFullScreen.cpp; sourceTree = "<group>"; }; 12301 CDEE393617974259001D7580 /* PublicURLManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PublicURLManager.cpp; sourceTree = "<group>"; }; 12302 CDEE393817974274001D7580 /* URLRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLRegistry.h; sourceTree = "<group>"; }; 12244 12303 CDF65CC9145B43A700C4C7AA /* MediaControllerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControllerInterface.h; sourceTree = "<group>"; }; 12245 12304 CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMediaElementCustom.cpp; sourceTree = "<group>"; }; … … 13384 13443 isa = PBXGroup; 13385 13444 children = ( 13386 07277E3E17D018CC0015534D /* JSMediaSource.cpp */,13387 07277E3F17D018CC0015534D /* JSMediaSource.h */,13388 13445 07277E4017D018CC0015534D /* JSMediaStream.cpp */, 13389 13446 07277E4117D018CC0015534D /* JSMediaStream.h */, … … 13705 13762 AA93C850175D5B2000FD3CE3 /* IndieUI */, 13706 13763 1C5FAECA0DCFD8C900D58F78 /* Inspector */, 13764 CD61FE7B1794CA02004101EB /* MediaSource */, 13707 13765 07CFD99317D01405001C4FFC /* MediaStream */, 13708 13766 33503C9C10179A9A003B47E1 /* Notifications */, … … 16331 16389 E44613930CD6331000FADA75 /* HTMLMediaElement.h */, 16332 16390 E44613940CD6331000FADA75 /* HTMLMediaElement.idl */, 16391 CD9DE18317AB0CF300EA386D /* HTMLMediaSource.cpp */, 16392 CD9DE18417AB0CF300EA386D /* HTMLMediaSource.h */, 16333 16393 A8EA79EC0A1916DF00A8EF5F /* HTMLMenuElement.cpp */, 16334 16394 A8EA79E80A1916DF00A8EF5F /* HTMLMenuElement.h */, … … 16487 16547 97205AB91239292700B17380 /* PluginDocument.cpp */, 16488 16548 97205ABA1239292700B17380 /* PluginDocument.h */, 16549 CDEE393617974259001D7580 /* PublicURLManager.cpp */, 16489 16550 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */, 16490 16551 F55B3D971251F12D003EF269 /* RadioInputType.cpp */, … … 16521 16582 F55B3DA91251F12D003EF269 /* URLInputType.cpp */, 16522 16583 F55B3DAA1251F12D003EF269 /* URLInputType.h */, 16584 CDEE393817974274001D7580 /* URLRegistry.h */, 16523 16585 F5A154251279534D00D0B0C0 /* ValidationMessage.cpp */, 16524 16586 F5A154261279534D00D0B0C0 /* ValidationMessage.h */, … … 18071 18133 isa = PBXGroup; 18072 18134 children = ( 18073 B1A942DE15B5CE2200D525D1 /* MediaSource.cpp */, 18074 B1A942DF15B5CE2200D525D1 /* MediaSource.h */, 18075 B1A942E015B5CE2200D525D1 /* MediaSource.idl */, 18135 CD3A495517A9D01B00274E42 /* MediaSource.cpp */, 18136 CD3A495617A9D01B00274E42 /* MediaSource.h */, 18137 CD3A495717A9D01B00274E42 /* MediaSource.idl */, 18138 CD3A495017A9C8B600274E42 /* MediaSourceBase.cpp */, 18139 CD3A495117A9C8B600274E42 /* MediaSourceBase.h */, 18076 18140 B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */, 18077 18141 B1A942E215B5CE2200D525D1 /* MediaSourceRegistry.h */, 18078 B1A942E315B5CE2200D525D1 /* SourceBuffer.cpp */, 18079 B1A942E415B5CE2200D525D1 /* SourceBuffer.h */, 18080 B1A942E515B5CE2200D525D1 /* SourceBuffer.idl */, 18081 B1A942E615B5CE2200D525D1 /* SourceBufferList.cpp */, 18082 B1A942E715B5CE2200D525D1 /* SourceBufferList.h */, 18083 B1A942E815B5CE2200D525D1 /* SourceBufferList.idl */, 18142 CD3A495817A9D01B00274E42 /* SourceBuffer.cpp */, 18143 CD3A495917A9D01B00274E42 /* SourceBuffer.h */, 18144 CD3A495A17A9D01B00274E42 /* SourceBuffer.idl */, 18145 CD3A495B17A9D01B00274E42 /* SourceBufferList.cpp */, 18146 CD3A495C17A9D01B00274E42 /* SourceBufferList.h */, 18147 CD3A495D17A9D01B00274E42 /* SourceBufferList.idl */, 18148 CD9DE17E17AAD64E00EA386D /* URLMediaSource.cpp */, 18149 CD9DE17F17AAD64E00EA386D /* URLMediaSource.h */, 18150 CD9DE18017AAD64E00EA386D /* URLMediaSource.idl */, 18151 B1A942DE15B5CE2200D525D1 /* WebKitMediaSource.cpp */, 18152 B1A942DF15B5CE2200D525D1 /* WebKitMediaSource.h */, 18153 B1A942E015B5CE2200D525D1 /* WebKitMediaSource.idl */, 18154 B1A942E315B5CE2200D525D1 /* WebKitSourceBuffer.cpp */, 18155 B1A942E415B5CE2200D525D1 /* WebKitSourceBuffer.h */, 18156 B1A942E515B5CE2200D525D1 /* WebKitSourceBuffer.idl */, 18157 B1A942E615B5CE2200D525D1 /* WebKitSourceBufferList.cpp */, 18158 B1A942E715B5CE2200D525D1 /* WebKitSourceBufferList.h */, 18159 B1A942E815B5CE2200D525D1 /* WebKitSourceBufferList.idl */, 18084 18160 ); 18085 18161 name = mediasource; … … 19855 19931 ); 19856 19932 name = ios; 19933 sourceTree = "<group>"; 19934 }; 19935 CD61FE7B1794CA02004101EB /* MediaSource */ = { 19936 isa = PBXGroup; 19937 children = ( 19938 CD9DE17217AAC74C00EA386D /* JSMediaSource.cpp */, 19939 CD9DE17317AAC74C00EA386D /* JSMediaSource.h */, 19940 CD9DE17617AAC75B00EA386D /* JSSourceBuffer.cpp */, 19941 CD9DE17717AAC75B00EA386D /* JSSourceBuffer.h */, 19942 CD9DE17817AAC75B00EA386D /* JSSourceBufferList.cpp */, 19943 CD9DE17917AAC75B00EA386D /* JSSourceBufferList.h */, 19944 CD61FE801794CC59004101EB /* JSWebKitSourceBuffer.cpp */, 19945 CD61FE811794CC59004101EB /* JSWebKitSourceBuffer.h */, 19946 CD61FE821794CC59004101EB /* JSWebKitSourceBufferList.cpp */, 19947 CD61FE831794CC59004101EB /* JSWebKitSourceBufferList.h */, 19948 CD61FE7C1794CB26004101EB /* JSWebKitMediaSource.cpp */, 19949 CD61FE7D1794CB26004101EB /* JSWebKitMediaSource.h */, 19950 ); 19951 name = MediaSource; 19857 19952 sourceTree = "<group>"; 19858 19953 }; … … 21780 21875 E100EE761546EAC100BA11D1 /* DeprecatedStyleBuilder.h in Headers */, 21781 21876 A7C9ABF91357A3BF00F5503F /* DetailsMarkerControl.h in Headers */, 21877 CD61FE681794AADB004101EB /* MediaSourceRegistry.h in Headers */, 21782 21878 CCC2B51415F613060048CDD6 /* DeviceClient.h in Headers */, 21783 21879 CCC2B51615F613060048CDD6 /* DeviceController.h in Headers */, … … 21831 21927 85E7118D0AC5D5350053270F /* DOMAttrInternal.h in Headers */, 21832 21928 BC946EEF107FDBAC00857193 /* DOMBeforeLoadEvent.h in Headers */, 21929 CD61FE851794CC59004101EB /* JSWebKitSourceBuffer.h in Headers */, 21833 21930 2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */, 21834 21931 2E2D99EA10E2BC3800496337 /* DOMBlobInternal.h in Headers */, … … 21995 22092 85E711B80AC5D5350053270F /* DOMHTMLLinkElementInternal.h in Headers */, 21996 22093 85ECBEF30AA7626900544F0B /* DOMHTMLMapElement.h in Headers */, 22094 CD9DE17D17AAC75B00EA386D /* JSSourceBufferList.h in Headers */, 21997 22095 85E711B90AC5D5350053270F /* DOMHTMLMapElementInternal.h in Headers */, 21998 22096 BC51579F0C03BBD3008BB0EE /* DOMHTMLMarqueeElement.h in Headers */, … … 22009 22107 85E711BE0AC5D5350053270F /* DOMHTMLOListElementInternal.h in Headers */, 22010 22108 85F32AEE0AA63B8700FF3184 /* DOMHTMLOptGroupElement.h in Headers */, 22109 CD9DE18217AAD6A400EA386D /* URLMediaSource.h in Headers */, 22011 22110 85E711BF0AC5D5350053270F /* DOMHTMLOptGroupElementInternal.h in Headers */, 22012 22111 8540756B0AD6CBF900620C57 /* DOMHTMLOptionElement.h in Headers */, … … 22019 22118 85ECBEF70AA7626900544F0B /* DOMHTMLParamElement.h in Headers */, 22020 22119 85E711C20AC5D5350053270F /* DOMHTMLParamElementInternal.h in Headers */, 22120 CD61FE6A1794AADB004101EB /* WebKitSourceBuffer.h in Headers */, 22021 22121 85183B480AA6926100F19FA3 /* DOMHTMLPreElement.h in Headers */, 22022 22122 85E711C30AC5D5350053270F /* DOMHTMLPreElementInternal.h in Headers */, … … 22671 22771 F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */, 22672 22772 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */, 22673 07277E4B17D018CC0015534D /* JSMediaSource.h in Headers */,22674 22773 511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */, 22675 22774 7A54858014E02D51006AE05A /* InspectorHistory.h in Headers */, … … 23086 23185 B2FA3D790AB75A6F000E5AC4 /* JSSVGFEFloodElement.h in Headers */, 23087 23186 B2FA3D7B0AB75A6F000E5AC4 /* JSSVGFEFuncAElement.h in Headers */, 23187 CD61FE7F1794CB26004101EB /* JSWebKitMediaSource.h in Headers */, 23088 23188 B2FA3D7D0AB75A6F000E5AC4 /* JSSVGFEFuncBElement.h in Headers */, 23089 23189 B2FA3D7F0AB75A6F000E5AC4 /* JSSVGFEFuncGElement.h in Headers */, … … 23215 23315 6E3FAD3914733F4011E42307 /* JSWebGLDebugRendererInfo.h in Headers */, 23216 23316 6E3FAD3914733F4022E42307 /* JSWebGLDebugShaders.h in Headers */, 23317 CD3A495217A9C8C600274E42 /* MediaSourceBase.h in Headers */, 23217 23318 6E3FAD3914733F4000E42307 /* JSWebGLDepthTexture.h in Headers */, 23218 23319 49C7B9981042D2D30009D447 /* JSWebGLFramebuffer.h in Headers */, … … 23446 23547 0014628B103CD1DE000B20DB /* OriginAccessEntry.h in Headers */, 23447 23548 FE9E89FC16E2DC0500A908F8 /* OriginLock.h in Headers */, 23549 CD9DE18617AB0CF300EA386D /* HTMLMediaSource.h in Headers */, 23448 23550 FD581FAF1520F91F003A7A75 /* OscillatorNode.h in Headers */, 23449 23551 078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */, … … 23677 23779 0854B0151255E4E600B9CDD0 /* RenderSVGInline.h in Headers */, 23678 23780 0854B0171255E4E600B9CDD0 /* RenderSVGInlineText.h in Headers */, 23781 CD3A496217A9D01B00274E42 /* SourceBuffer.h in Headers */, 23679 23782 436708CB12D9CA4B00044234 /* RenderSVGModelObject.h in Headers */, 23680 23783 ADDF1AD71257CD9A0003A759 /* RenderSVGPath.h in Headers */, … … 23729 23832 514C767A0CE923A1007EF3CD /* ResourceHandleClient.h in Headers */, 23730 23833 514C767B0CE923A1007EF3CD /* ResourceHandleInternal.h in Headers */, 23834 CD61FE641794AADB004101EB /* WebKitMediaSource.h in Headers */, 23731 23835 51E4143416A6596300C633C7 /* ResourceHandleTypes.h in Headers */, 23732 23836 656D373F0ADBA5DE00A4554D /* ResourceLoader.h in Headers */, … … 23858 23962 41D168E810226E89009BC827 /* SharedWorkerGlobalScope.h in Headers */, 23859 23963 41D168EA10226E89009BC827 /* SharedWorkerRepository.h in Headers */, 23964 CD61FE6C1794AADB004101EB /* WebKitSourceBufferList.h in Headers */, 23860 23965 E1B7839C163740A70007B692 /* SharedWorkerStrategy.h in Headers */, 23861 23966 41D168EE10226E89009BC827 /* SharedWorkerThread.h in Headers */, … … 24009 24114 71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */, 24010 24115 0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */, 24116 CD61FE871794CC59004101EB /* JSWebKitSourceBufferList.h in Headers */, 24011 24117 71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */, 24118 CD9DE17B17AAC75B00EA386D /* JSSourceBuffer.h in Headers */, 24012 24119 089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */, 24013 24120 089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */, … … 24275 24382 930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */, 24276 24383 93F198F608245E59001E9ABC /* TextResourceDecoder.h in Headers */, 24384 CD3A496517A9D01B00274E42 /* SourceBufferList.h in Headers */, 24277 24385 A824B4650E2EF2EA0081A7B7 /* TextRun.h in Headers */, 24278 24386 448B1B7A0F3A2F9B0047A9E2 /* TextSizeAdjustment.h in Headers */, … … 24308 24416 070334D71459FFD5008D8D45 /* TrackBase.h in Headers */, 24309 24417 BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */, 24418 CD3A495F17A9D01B00274E42 /* MediaSource.h in Headers */, 24310 24419 49E911C40EF86D47009D0CAF /* TransformationMatrix.h in Headers */, 24311 24420 FB484F4D171F821E00040755 /* TransformFunctions.h in Headers */, … … 24462 24571 85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */, 24463 24572 9380F47409A11AB4001FDB34 /* Widget.h in Headers */, 24573 CD9DE17517AAC74C00EA386D /* JSMediaSource.h in Headers */, 24464 24574 1411DCB1164C39A800D49BC1 /* WidthCache.h in Headers */, 24465 24575 939B02EF0EA2DBC400C54570 /* WidthIterator.h in Headers */, … … 25089 25199 14D8238B0AF92DF60004F057 /* Chrome.cpp in Sources */, 25090 25200 ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */, 25201 CD9DE17417AAC74C00EA386D /* JSMediaSource.cpp in Sources */, 25091 25202 4ACBC0BE12713CBD0094F9B2 /* ClassList.cpp in Sources */, 25092 25203 BC904B760D10998F00680D32 /* ClassNodeList.cpp in Sources */, … … 25305 25416 85032DDE0AA8C9BE007D3B7D /* DOMCSSMediaRule.mm in Sources */, 25306 25417 85032DE00AA8C9BE007D3B7D /* DOMCSSPageRule.mm in Sources */, 25418 CD9DE17A17AAC75B00EA386D /* JSSourceBuffer.cpp in Sources */, 25307 25419 858C382D0AA8E40500B187A4 /* DOMCSSPrimitiveValue.mm in Sources */, 25308 25420 85032DE20AA8C9BE007D3B7D /* DOMCSSRule.mm in Sources */, … … 25362 25474 7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */, 25363 25475 85992EBB0AA5069500AC0785 /* DOMHTMLHeadElement.mm in Sources */, 25476 CD3A496417A9D01B00274E42 /* SourceBufferList.cpp in Sources */, 25364 25477 85183B450AA6926100F19FA3 /* DOMHTMLHeadingElement.mm in Sources */, 25365 25478 85ECBEF20AA7626900544F0B /* DOMHTMLHRElement.mm in Sources */, … … 25563 25676 5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */, 25564 25677 26C17A3F1491D2D400D12BA2 /* FileSystemIOS.mm in Sources */, 25678 CD3A495417A9CC9000274E42 /* MediaSourceBase.cpp in Sources */, 25565 25679 514B3F760C722055000530DF /* FileSystemMac.mm in Sources */, 25566 25680 5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */, … … 25812 25926 B275356F0B053814002CE64F /* Image.cpp in Sources */, 25813 25927 43D2597713C816F400608559 /* ImageBuffer.cpp in Sources */, 25928 CD9DE17C17AAC75B00EA386D /* JSSourceBufferList.cpp in Sources */, 25814 25929 B2A10B940B3818D700099AA4 /* ImageBufferCG.cpp in Sources */, 25815 25930 2292B27C1356669400CF11EF /* ImageBufferDataCG.cpp in Sources */, … … 26010 26125 1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */, 26011 26126 FB91392B16AE4FC0001FE682 /* JSDOMPath.cpp in Sources */, 26127 CD61FE6B1794AADB004101EB /* WebKitSourceBufferList.cpp in Sources */, 26012 26128 A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */, 26013 26129 A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */, … … 26060 26176 FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */, 26061 26177 FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */, 26178 CD3A495E17A9D01B00274E42 /* MediaSource.cpp in Sources */, 26062 26179 8482B7511198CB6B00BFB005 /* JSHashChangeEvent.cpp in Sources */, 26063 26180 BC94D14E0C275C68006BC617 /* JSHistory.cpp in Sources */, … … 26079 26196 BCCBAD400C18C14200CE890F /* JSHTMLCollection.cpp in Sources */, 26080 26197 BCCBAD3B0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp in Sources */, 26198 CD61FE841794CC59004101EB /* JSWebKitSourceBuffer.cpp in Sources */, 26081 26199 4A1E719014E101E400626F9D /* JSHTMLContentElement.cpp in Sources */, 26082 26200 F5C041E60FFCA96D00839D4A /* JSHTMLDataListElement.cpp in Sources */, … … 26393 26511 B2FA3DCC0AB75A6F000E5AC4 /* JSSVGPathSegCurvetoQuadraticSmoothRel.cpp in Sources */, 26394 26512 B2C96D8D0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp in Sources */, 26513 CD3A496117A9D01B00274E42 /* SourceBuffer.cpp in Sources */, 26395 26514 B2FA3DCE0AB75A6F000E5AC4 /* JSSVGPathSegLinetoAbs.cpp in Sources */, 26396 26515 B2FA3DD00AB75A6F000E5AC4 /* JSSVGPathSegLinetoHorizontalAbs.cpp in Sources */, … … 26466 26585 FD82D7F713D4C8BD004E4372 /* JSWaveShaperNode.cpp in Sources */, 26467 26586 A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */, 26468 07277E4A17D018CC0015534D /* JSMediaSource.cpp in Sources */,26469 26587 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */, 26470 26588 7EA30F6916DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp in Sources */, … … 26609 26727 D3A94A38122DABAC00A37BBC /* MediaQueryList.cpp in Sources */, 26610 26728 D3AA10F3123A98AA0092152B /* MediaQueryMatcher.cpp in Sources */, 26729 CD61FE671794AADB004101EB /* MediaSourceRegistry.cpp in Sources */, 26611 26730 FD671A77159BB07000197559 /* MediaStreamAudioSourceNode.cpp in Sources */, 26612 26731 0711589017DF6F6200EDFE2B /* MediaStreamComponent.cpp in Sources */, … … 26830 26949 439046DD12DA25E800AF80A2 /* RenderMathMLMath.cpp in Sources */, 26831 26950 439046DF12DA25E800AF80A2 /* RenderMathMLOperator.cpp in Sources */, 26951 CD61FE631794AADB004101EB /* WebKitMediaSource.cpp in Sources */, 26832 26952 439046E112DA25E800AF80A2 /* RenderMathMLRoot.cpp in Sources */, 26833 26953 439046E312DA25E800AF80A2 /* RenderMathMLRow.cpp in Sources */, … … 27079 27199 BC7FA62E0D1F0EFF00DB22A9 /* StaticNodeList.cpp in Sources */, 27080 27200 A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */, 27201 CD9DE18517AB0CF300EA386D /* HTMLMediaSource.cpp in Sources */, 27081 27202 51E3F9C70DA059DC00250911 /* Storage.cpp in Sources */, 27082 27203 C5160EEA1004543A00A7CEE2 /* StorageAreaImpl.cpp in Sources */, … … 27204 27325 B22279DF0D00BF220071B782 /* SVGFEFuncAElement.cpp in Sources */, 27205 27326 B22279E20D00BF220071B782 /* SVGFEFuncBElement.cpp in Sources */, 27327 CD61FE7E1794CB26004101EB /* JSWebKitMediaSource.cpp in Sources */, 27206 27328 B22279E50D00BF220071B782 /* SVGFEFuncGElement.cpp in Sources */, 27207 27329 B22279E80D00BF220071B782 /* SVGFEFuncRElement.cpp in Sources */, … … 27266 27388 8419D2A8120D92D000141F8F /* SVGPathByteStreamBuilder.cpp in Sources */, 27267 27389 8419D2AC120D92FC00141F8F /* SVGPathByteStreamSource.cpp in Sources */, 27390 CD61FE861794CC59004101EB /* JSWebKitSourceBufferList.cpp in Sources */, 27268 27391 B2227A580D00BF220071B782 /* SVGPathElement.cpp in Sources */, 27269 27392 8476C9EF11DF6A5800555B02 /* SVGPathParser.cpp in Sources */, … … 27352 27475 376DCCE113B4F966002EBEFC /* TextRun.cpp in Sources */, 27353 27476 B2C3DA4A0D006C1D00EF6F26 /* TextStream.cpp in Sources */, 27477 CD9DE18117AAD6A400EA386D /* URLMediaSource.cpp in Sources */, 27354 27478 9759E93F14EF1CF80026A2DD /* TextTrack.cpp in Sources */, 27355 27479 9759E94214EF1CF80026A2DD /* TextTrackCue.cpp in Sources */, … … 27500 27624 1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */, 27501 27625 CD82030B1395AB6A00F956C6 /* WebVideoFullscreenController.mm in Sources */, 27626 CD61FE691794AADB004101EB /* WebKitSourceBuffer.cpp in Sources */, 27502 27627 CD82030D1395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm in Sources */, 27503 27628 F12171F516A8CED2000053CA /* WebVTTElement.cpp in Sources */, … … 27519 27644 F34742E01343631F00531BC2 /* WorkerDebuggerAgent.cpp in Sources */, 27520 27645 A3E2643014748991005A8588 /* WorkerEventQueue.cpp in Sources */, 27646 CDEE393717974259001D7580 /* PublicURLManager.cpp in Sources */, 27521 27647 2E4346480F546A8200B0F1BA /* WorkerGlobalScope.cpp in Sources */, 27522 27648 9712A611150090CE0048AF10 /* WorkerGlobalScopeIndexedDatabase.cpp in Sources */, -
trunk/Source/WebCore/dom/EventNames.h
r154673 r156049 168 168 macro(webkitendfullscreen) \ 169 169 \ 170 macro(addsourcebuffer) \ 171 macro(removesourcebuffer) \ 172 macro(sourceopen) \ 173 macro(sourceended) \ 174 macro(sourceclose) \ 175 macro(update) \ 176 macro(updateend) \ 177 macro(updatestart) \ 170 178 macro(webkitaddsourcebuffer) \ 171 179 macro(webkitremovesourcebuffer) \ -
trunk/Source/WebCore/dom/EventTarget.h
r155959 r156049 57 57 class ScriptProcessorNode; 58 58 class MediaController; 59 class MediaSource;60 59 class MediaStream; 61 60 class MessagePort; … … 66 65 class SharedWorker; 67 66 class SharedWorkerGlobalScope; 68 class SourceBufferList;69 67 class TextTrack; 70 68 class TextTrackCue; -
trunk/Source/WebCore/dom/EventTargetFactory.in
r155573 r156049 31 31 SharedWorker conditional=SHARED_WORKERS 32 32 SharedWorkerGlobalScope conditional=SHARED_WORKERS 33 SourceBuffer conditional=MEDIA_SOURCE 33 34 SourceBufferList conditional=MEDIA_SOURCE 34 35 SpeechRecognition conditional=SCRIPTED_SPEECH … … 39 40 TextTrackList conditional=VIDEO_TRACK 40 41 VideoTrackList conditional=VIDEO_TRACK 42 WebKitMediaSource conditional=MEDIA_SOURCE 41 43 WebKitNamedFlow 44 WebKitSourceBufferList conditional=MEDIA_SOURCE 42 45 WebSocket conditional=WEB_SOCKETS 43 46 Worker conditional=WORKERS -
trunk/Source/WebCore/fileapi/Blob.cpp
r148536 r156049 53 53 } // namespace 54 54 55 class BlobURLRegistry : public URLRegistry { 56 public: 57 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE; 58 virtual void unregisterURL(const KURL&) OVERRIDE; 59 60 static URLRegistry& registry(); 61 }; 62 63 64 void BlobURLRegistry::registerURL(SecurityOrigin* origin, const KURL& publicURL, URLRegistrable* blob) 65 { 66 ASSERT(&blob->registry() == this); 67 ThreadableBlobRegistry::registerBlobURL(origin, publicURL, static_cast<Blob*>(blob)->url()); 68 } 69 70 void BlobURLRegistry::unregisterURL(const KURL& url) 71 { 72 ThreadableBlobRegistry::unregisterBlobURL(url); 73 } 74 75 URLRegistry& BlobURLRegistry::registry() 76 { 77 DEFINE_STATIC_LOCAL(BlobURLRegistry, instance, ()); 78 return instance; 79 } 80 81 55 82 Blob::Blob() 56 83 : m_size(0) … … 207 234 #endif 208 235 236 URLRegistry& Blob::registry() const 237 { 238 return BlobURLRegistry::registry(); 239 } 240 241 209 242 } // namespace WebCore -
trunk/Source/WebCore/fileapi/Blob.h
r151947 r156049 35 35 #include "KURL.h" 36 36 #include "ScriptWrappable.h" 37 #include "URLRegistry.h" 37 38 #include <wtf/PassOwnPtr.h> 38 39 #include <wtf/PassRefPtr.h> … … 44 45 class ScriptExecutionContext; 45 46 46 class Blob : public ScriptWrappable, public RefCounted<Blob> {47 class Blob : public ScriptWrappable, public URLRegistrable, public RefCounted<Blob> { 47 48 public: 48 49 static PassRefPtr<Blob> create() … … 79 80 static bool isNormalizedContentType(const CString&); 80 81 82 // URLRegistrable 83 virtual URLRegistry& registry() const OVERRIDE; 84 81 85 #if ENABLE(BLOB) 82 86 PassRefPtr<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const; -
trunk/Source/WebCore/html/DOMURL.cpp
r151947 r156049 40 40 #include "ScriptExecutionContext.h" 41 41 #include "SecurityOrigin.h" 42 #include "ThreadableBlobRegistry.h"43 42 #include <wtf/MainThread.h> 44 43 45 #if ENABLE(MEDIA_SOURCE)46 #include "MediaSource.h"47 #include "MediaSourceRegistry.h"48 #endif49 50 #if ENABLE(MEDIA_STREAM)51 #include "MediaStream.h"52 #include "MediaStreamRegistry.h"53 #endif54 55 44 namespace WebCore { 56 57 #if ENABLE(MEDIA_SOURCE)58 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaSource* source)59 {60 // Since WebWorkers cannot obtain MediaSource objects, we should be on the main thread.61 ASSERT(isMainThread());62 63 if (!scriptExecutionContext || !source)64 return String();65 66 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());67 if (publicURL.isEmpty())68 return String();69 70 MediaSourceRegistry::registry().registerMediaSourceURL(publicURL, source);71 scriptExecutionContext->publicURLManager().sourceURLs().add(publicURL.string());72 73 return publicURL.string();74 }75 #endif76 77 #if ENABLE(MEDIA_STREAM)78 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaStream* stream)79 {80 if (!scriptExecutionContext || !stream)81 return String();82 83 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());84 if (publicURL.isEmpty())85 return String();86 87 // Since WebWorkers cannot obtain Stream objects, we should be on the main thread.88 ASSERT(isMainThread());89 90 MediaStreamRegistry::registry().registerMediaStreamURL(publicURL, stream);91 scriptExecutionContext->publicURLManager().streamURLs().add(publicURL.string());92 93 return publicURL.string();94 }95 #endif96 45 97 46 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, Blob* blob) … … 99 48 if (!scriptExecutionContext || !blob) 100 49 return String(); 50 return createPublicURL(scriptExecutionContext, blob); 51 } 101 52 53 String DOMURL::createPublicURL(ScriptExecutionContext* scriptExecutionContext, URLRegistrable* registrable) 54 { 102 55 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin()); 103 56 if (publicURL.isEmpty()) 104 57 return String(); 105 58 106 ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext->securityOrigin(), publicURL, blob->url()); 107 scriptExecutionContext->publicURLManager().blobURLs().add(publicURL.string()); 59 scriptExecutionContext->publicURLManager().registerURL(scriptExecutionContext->securityOrigin(), publicURL, registrable); 108 60 109 61 return publicURL.string(); … … 122 74 MemoryCache::removeRequestFromCache(scriptExecutionContext, request); 123 75 124 HashSet<String>& blobURLs = scriptExecutionContext->publicURLManager().blobURLs(); 125 if (blobURLs.contains(url.string())) { 126 ThreadableBlobRegistry::unregisterBlobURL(url); 127 blobURLs.remove(url.string()); 128 } 129 130 #if ENABLE(MEDIA_SOURCE) 131 HashSet<String>& sourceURLs = scriptExecutionContext->publicURLManager().sourceURLs(); 132 if (sourceURLs.contains(url.string())) { 133 MediaSourceRegistry::registry().unregisterMediaSourceURL(url); 134 sourceURLs.remove(url.string()); 135 } 136 #endif 137 #if ENABLE(MEDIA_STREAM) 138 HashSet<String>& streamURLs = scriptExecutionContext->publicURLManager().streamURLs(); 139 if (streamURLs.contains(url.string())) { 140 // FIXME: make sure of this assertion below. Raise a spec question if required. 141 // Since WebWorkers cannot obtain Stream objects, we should be on the main thread. 142 ASSERT(isMainThread()); 143 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); 144 streamURLs.remove(url.string()); 145 } 146 #endif 76 scriptExecutionContext->publicURLManager().revoke(url); 147 77 } 148 78 -
trunk/Source/WebCore/html/DOMURL.h
r127757 r156049 37 37 38 38 class Blob; 39 class MediaSource;40 class MediaStream;41 39 class ScriptExecutionContext; 40 class URLRegistrable; 42 41 43 42 class DOMURL : public RefCounted<DOMURL> { … … 51 50 static String createObjectURL(ScriptExecutionContext*, Blob*); 52 51 static void revokeObjectURL(ScriptExecutionContext*, const String&); 53 #if ENABLE(MEDIA_SOURCE) 54 static String createObjectURL(ScriptExecutionContext*, MediaSource*); 55 #endif 56 #if ENABLE(MEDIA_STREAM) 57 static String createObjectURL(ScriptExecutionContext*, MediaStream*); 58 #endif 52 53 static String createPublicURL(ScriptExecutionContext*, URLRegistrable*); 59 54 #endif 60 55 }; -
trunk/Source/WebCore/html/DOMURL.idl
r152100 r156049 35 35 ImplementationLacksVTable 36 36 ] interface DOMURL { 37 #if defined(ENABLE_MEDIA_SOURCE) && ENABLE_MEDIA_SOURCE38 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source);39 #endif40 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM41 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream);42 #endif43 37 [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(Blob? blob); 44 38 [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url); -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r155908 r156049 121 121 122 122 #if ENABLE(MEDIA_SOURCE) 123 #include "MediaSource.h" 124 #include "MediaSourceRegistry.h" 123 #include "HTMLMediaSource.h" 125 124 #endif 126 125 … … 384 383 385 384 #if ENABLE(MEDIA_SOURCE) 386 setSourceState(MediaSource::closedKeyword());385 closeMediaSource(); 387 386 #endif 388 387 … … 812 811 813 812 #if ENABLE(MEDIA_SOURCE) 814 setSourceState(MediaSource::closedKeyword());813 closeMediaSource(); 815 814 #endif 816 815 … … 1094 1093 1095 1094 if (url.protocolIs(mediaSourceBlobProtocol)) 1096 m_mediaSource = MediaSourceRegistry::registry().lookupMediaSource(url.string());1095 m_mediaSource = HTMLMediaSource::lookup(url.string()); 1097 1096 1098 1097 if (m_mediaSource) { 1099 if (!m_player->load(url, m_mediaSource)) 1098 if (m_mediaSource->attachToElement()) 1099 m_player->load(url, m_mediaSource); 1100 else { 1101 // Forget our reference to the MediaSource, so we leave it alone 1102 // while processing remainder of load failure. 1103 m_mediaSource = 0; 1100 1104 mediaLoadingFailed(MediaPlayer::FormatError); 1105 } 1101 1106 } else 1102 1107 #endif … … 1601 1606 1602 1607 #if ENABLE(MEDIA_SOURCE) 1603 setSourceState(MediaSource::closedKeyword());1608 closeMediaSource(); 1604 1609 #endif 1605 1610 … … 1632 1637 1633 1638 #if ENABLE(MEDIA_SOURCE) 1634 setSourceState(MediaSource::closedKeyword());1639 closeMediaSource(); 1635 1640 #endif 1636 1641 … … 2177 2182 // Always notify the media engine of a seek if the source is not closed. This ensures that the source is 2178 2183 // always in a flushed state when the 'seeking' event fires. 2179 if (m_mediaSource && m_mediaSource-> readyState() != MediaSource::closedKeyword())2184 if (m_mediaSource && m_mediaSource->isClosed()) 2180 2185 noSeekRequired = false; 2181 2186 #endif … … 2541 2546 2542 2547 #if ENABLE(MEDIA_SOURCE) 2543 void HTMLMediaElement:: setSourceState(const String& state)2548 void HTMLMediaElement::closeMediaSource() 2544 2549 { 2545 2550 if (!m_mediaSource) 2546 return; 2547 2548 m_mediaSource->setReadyState(state); 2549 if (state == MediaSource::closedKeyword()) 2550 m_mediaSource = 0; 2551 return; 2552 2553 m_mediaSource->close(); 2554 m_mediaSource = 0; 2551 2555 } 2552 2556 #endif … … 3868 3872 if (!m_player) 3869 3873 return TimeRanges::create(); 3874 3875 #if ENABLE(MEDIA_SOURCE) 3876 if (m_mediaSource) 3877 return m_mediaSource->buffered(); 3878 #endif 3879 3870 3880 return m_player->buffered(); 3871 3881 } … … 4086 4096 4087 4097 #if ENABLE(MEDIA_SOURCE) 4088 setSourceState(MediaSource::closedKeyword());4098 closeMediaSource(); 4089 4099 #endif 4090 4100 … … 4131 4141 4132 4142 #if ENABLE(MEDIA_SOURCE) 4133 setSourceState(MediaSource::closedKeyword());4143 closeMediaSource(); 4134 4144 #endif 4135 4145 … … 4793 4803 #if ENABLE(MEDIA_SOURCE) 4794 4804 if (m_mediaSource) 4795 m_mediaSource-> setReadyState(MediaSource::closedKeyword());4805 m_mediaSource->close(); 4796 4806 #endif 4797 4807 -
trunk/Source/WebCore/html/HTMLMediaElement.h
r155908 r156049 192 192 #if ENABLE(MEDIA_SOURCE) 193 193 // Media Source. 194 void setSourceState(const String&);194 void closeMediaSource(); 195 195 #endif 196 196 … … 674 674 675 675 #if ENABLE(MEDIA_SOURCE) 676 RefPtr< MediaSource> m_mediaSource;676 RefPtr<HTMLMediaSource> m_mediaSource; 677 677 #endif 678 678 -
trunk/Source/WebCore/html/HTMLMediaSource.cpp
r156048 r156049 1 1 /* 2 * Copyright (C) 201 2Google Inc. All rights reserved.2 * Copyright (C) 2013 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 [32 Conditional=MEDIA_SOURCE,33 InterfaceName=WebKitSourceBuffer34 ] interface SourceBuffer {35 30 36 // Returns the time ranges buffered. 37 [GetterRaisesException] readonly attribute TimeRanges buffered; 31 #include "config.h" 32 #include "HTMLMediaSource.h" 38 33 39 // Applies an offset to media segment timestamps. 40 [SetterRaisesException] attribute double timestampOffset; 34 namespace WebCore { 41 35 42 // Append segment data. 43 [RaisesException] void append(Uint8Array data); 36 URLRegistry* HTMLMediaSource::s_registry = 0; 44 37 45 // Abort the current segment append sequence. 46 [RaisesException] void abort(); 47 }; 38 void HTMLMediaSource::setRegistry(URLRegistry* registry) 39 { 40 ASSERT(!s_registry); 41 s_registry = registry; 42 } 48 43 44 } -
trunk/Source/WebCore/html/HTMLMediaSource.h
r156048 r156049 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 #ifndef MediaSourcePrivate_h31 #define MediaSourcePrivate_h32 30 33 #if ENABLE(MEDIA_SOURCE) 31 #ifndef HTMLMediaSource_h 32 #define HTMLMediaSource_h 34 33 34 #include "URLRegistry.h" 35 35 #include <wtf/Forward.h> 36 36 37 37 namespace WebCore { 38 38 39 class SourceBufferPrivate; 39 class MediaSourcePrivate; 40 class TimeRanges; 40 41 41 class MediaSourcePrivate {42 class HTMLMediaSource : public URLRegistrable { 42 43 public: 43 typedef Vector<String, 0> CodecsArray; 44 static void setRegistry(URLRegistry*); 45 static HTMLMediaSource* lookup(const String& url) { return s_registry ? static_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; } 44 46 45 MediaSourcePrivate() {}46 v irtual ~MediaSourcePrivate() {}47 void ref() { refHTMLMediaSource(); } 48 void deref() { derefHTMLMediaSource(); } 47 49 48 enum AddStatus { Ok, NotSupported, ReachedIdLimit }; 49 virtual AddStatus addSourceBuffer(const String& type, const CodecsArray&, OwnPtr<SourceBufferPrivate>*) = 0; 50 virtual double duration() = 0; 51 virtual void setDuration(double) = 0; 52 enum EndOfStreamStatus { EosNoError, EosNetworkError, EosDecodeError }; 53 virtual void endOfStream(EndOfStreamStatus) = 0; 50 // Called when an HTMLMediaElement is attempting to attach to this object, 51 // and helps enforce attachment to at most one element at a time. 52 // If already attached, returns false. Otherwise, must be in 53 // 'closed' state, and returns true to indicate attachment success. 54 // Reattachment allowed by first calling close() (even if already in 'closed'). 55 virtual bool attachToElement() = 0; 56 virtual void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>) = 0; 57 virtual void close() = 0; 58 virtual bool isClosed() const = 0; 59 virtual double duration() const = 0; 60 virtual PassRefPtr<TimeRanges> buffered() const = 0; 61 virtual void refHTMLMediaSource() = 0; 62 virtual void derefHTMLMediaSource() = 0; 63 64 // URLRegistrable 65 virtual URLRegistry& registry() const OVERRIDE { return *s_registry; } 66 67 private: 68 static URLRegistry* s_registry; 54 69 }; 55 70 … … 57 72 58 73 #endif 59 #endif -
trunk/Source/WebCore/html/PublicURLManager.cpp
r156048 r156049 1 1 /* 2 * Copyright (C) 2011 Google Inc. All rights reserved.3 2 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 25 25 */ 26 26 27 #i fndef DOMURL_h28 # define DOMURL_h27 #include "config.h" 28 #include "PublicURLManager.h" 29 29 30 30 #include "KURL.h" 31 #include <wtf/HashSet.h> 32 #include <wtf/PassRefPtr.h> 33 #include <wtf/RefCounted.h> 34 #include <wtf/text/WTFString.h> 31 #include "URLRegistry.h" 32 #include <wtf/text/StringHash.h> 35 33 36 34 namespace WebCore { 37 35 38 class Blob; 39 class MediaSource; 40 class MediaStream; 41 class ScriptExecutionContext; 36 void PublicURLManager::registerURL(SecurityOrigin* origin, const KURL& url, URLRegistrable* registrable) 37 { 38 RegistryURLMap::iterator found = m_registryToURL.add(®istrable->registry(), URLSet()).iterator; 39 found->key->registerURL(origin, url, registrable); 40 found->value.add(url.string()); 41 } 42 42 43 class DOMURL : public RefCounted<DOMURL> { 43 void PublicURLManager::revoke(const KURL& url) 44 { 45 for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) { 46 if (i->value.contains(url.string())) { 47 i->key->unregisterURL(url); 48 i->value.remove(url.string()); 49 break; 50 } 51 } 52 } 44 53 45 public: 46 static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); } 54 void PublicURLManager::contextDestroyed() 55 { 56 for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) { 57 for (URLSet::iterator j = i->value.begin(); j != i->value.end(); ++j) 58 i->key->unregisterURL(KURL(ParsedURLString, *j)); 59 } 47 60 48 #if ENABLE(BLOB) 49 static void contextDestroyed(ScriptExecutionContext*); 61 m_registryToURL.clear(); 62 } 50 63 51 static String createObjectURL(ScriptExecutionContext*, Blob*); 52 static void revokeObjectURL(ScriptExecutionContext*, const String&); 53 #if ENABLE(MEDIA_SOURCE) 54 static String createObjectURL(ScriptExecutionContext*, MediaSource*); 55 #endif 56 #if ENABLE(MEDIA_STREAM) 57 static String createObjectURL(ScriptExecutionContext*, MediaStream*); 58 #endif 59 #endif 60 }; 61 62 } // namespace WebCore 63 64 #endif // DOMURL_h 64 } -
trunk/Source/WebCore/html/PublicURLManager.h
r156004 r156049 28 28 29 29 #if ENABLE(BLOB) 30 #include "ScriptExecutionContext.h" 31 #include "ThreadableBlobRegistry.h" 30 #include <wtf/HashMap.h> 32 31 #include <wtf/HashSet.h> 32 #include <wtf/PassOwnPtr.h> 33 #include <wtf/RefCounted.h> 33 34 #include <wtf/text/WTFString.h> 34 35 #if ENABLE(MEDIA_STREAM)36 #include "MediaStream.h"37 #include "MediaStreamRegistry.h"38 #endif39 40 #if ENABLE(MEDIA_SOURCE)41 #include "MediaSource.h"42 #include "MediaSourceRegistry.h"43 #endif44 35 45 36 namespace WebCore { 46 37 38 class KURL; 47 39 class ScriptExecutionContext; 40 class SecurityOrigin; 41 class URLRegistry; 42 class URLRegistrable; 48 43 49 44 class PublicURLManager { … … 51 46 public: 52 47 static OwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); } 53 void contextDestroyed()54 {55 HashSet<String>::iterator blobURLsEnd = m_blobURLs.end();56 for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobURLsEnd; ++iter)57 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter));58 48 59 #if ENABLE(MEDIA_STREAM) 60 HashSet<String>::iterator streamURLsEnd = m_streamURLs.end(); 61 for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != streamURLsEnd; ++iter) 62 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter)); 63 #endif 64 #if ENABLE(MEDIA_SOURCE) 65 HashSet<String>::iterator sourceURLsEnd = m_sourceURLs.end(); 66 for (HashSet<String>::iterator iter = m_sourceURLs.begin(); iter != sourceURLsEnd; ++iter) 67 MediaSourceRegistry::registry().unregisterMediaSourceURL(KURL(ParsedURLString, *iter)); 68 #endif 69 } 70 71 HashSet<String>& blobURLs() { return m_blobURLs; } 72 #if ENABLE(MEDIA_STREAM) 73 HashSet<String>& streamURLs() { return m_streamURLs; } 74 #endif 75 #if ENABLE(MEDIA_SOURCE) 76 HashSet<String>& sourceURLs() { return m_sourceURLs; } 77 #endif 49 void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*); 50 void revoke(const KURL&); 51 void contextDestroyed(); 78 52 79 53 private: 80 HashSet<String> m_blobURLs; 81 #if ENABLE(MEDIA_STREAM) 82 HashSet<String> m_streamURLs; 83 #endif 84 #if ENABLE(MEDIA_SOURCE) 85 HashSet<String> m_sourceURLs; 86 #endif 54 typedef HashSet<String> URLSet; 55 typedef HashMap<URLRegistry*, URLSet > RegistryURLMap; 56 RegistryURLMap m_registryToURL; 87 57 }; 88 58 -
trunk/Source/WebCore/html/URLRegistry.h
r156048 r156049 28 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 #ifndef MediaSourcePrivate_h31 #define MediaSourcePrivate_h32 30 33 #if ENABLE(MEDIA_SOURCE) 31 #ifndef URLRegistry_h 32 #define URLRegistry_h 34 33 35 #include <wtf/ Forward.h>34 #include <wtf/text/WTFString.h> 36 35 37 36 namespace WebCore { 38 37 39 class SourceBufferPrivate; 38 class KURL; 39 class SecurityOrigin; 40 class URLRegistry; 40 41 41 class MediaSourcePrivate {42 class URLRegistrable { 42 43 public: 43 typedef Vector<String, 0> CodecsArray; 44 45 MediaSourcePrivate() { } 46 virtual ~MediaSourcePrivate() { } 47 48 enum AddStatus { Ok, NotSupported, ReachedIdLimit }; 49 virtual AddStatus addSourceBuffer(const String& type, const CodecsArray&, OwnPtr<SourceBufferPrivate>*) = 0; 50 virtual double duration() = 0; 51 virtual void setDuration(double) = 0; 52 enum EndOfStreamStatus { EosNoError, EosNetworkError, EosDecodeError }; 53 virtual void endOfStream(EndOfStreamStatus) = 0; 44 virtual ~URLRegistrable() { } 45 virtual URLRegistry& registry() const = 0; 54 46 }; 55 47 56 } 48 class URLRegistry { 49 WTF_MAKE_FAST_ALLOCATED; 50 public: 51 virtual ~URLRegistry() { } 52 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) = 0; 53 virtual void unregisterURL(const KURL&) = 0; 57 54 58 #endif 59 #endif 55 // This is an optional API 56 virtual URLRegistrable* lookup(const String&) { ASSERT_NOT_REACHED(); return 0; } 57 }; 58 59 } // namespace WebCore 60 61 #endif // URLRegistry_h -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r154921 r156049 46 46 47 47 #if ENABLE(MEDIA_SOURCE) 48 #include " MediaSource.h"48 #include "HTMLMediaSource.h" 49 49 #endif 50 50 … … 94 94 virtual void load(const String&) { } 95 95 #if ENABLE(MEDIA_SOURCE) 96 virtual void load(const String&, PassRefPtr< MediaSource>) { }96 virtual void load(const String&, PassRefPtr<HTMLMediaSource>) { } 97 97 #endif 98 98 virtual void cancelLoad() { } … … 395 395 396 396 #if ENABLE(MEDIA_SOURCE) 397 bool MediaPlayer::load(const KURL& url, PassRefPtr< MediaSource> mediaSource)397 bool MediaPlayer::load(const KURL& url, PassRefPtr<HTMLMediaSource> mediaSource) 398 398 { 399 399 m_mediaSource = mediaSource; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r154970 r156049 68 68 class Document; 69 69 class GStreamerGWorld; 70 #if ENABLE(MEDIA_SOURCE) 71 class HTMLMediaSource; 72 #endif 70 73 class MediaPlayerPrivateInterface; 71 #if ENABLE(MEDIA_SOURCE)72 class MediaSource;73 #endif74 74 class TextTrackRepresentation; 75 75 … … 283 283 bool load(const KURL&, const ContentType&, const String& keySystem); 284 284 #if ENABLE(MEDIA_SOURCE) 285 bool load(const KURL&, PassRefPtr< MediaSource>);285 bool load(const KURL&, PassRefPtr<HTMLMediaSource>); 286 286 #endif 287 287 void cancelLoad(); … … 292 292 void prepareToPlay(); 293 293 void play(); 294 void pause(); 294 void pause(); 295 295 296 296 #if ENABLE(ENCRYPTED_MEDIA) … … 319 319 void setRate(double); 320 320 321 bool preservesPitch() const; 321 bool preservesPitch() const; 322 322 void setPreservesPitch(bool); 323 323 … … 339 339 void setClosedCaptionsVisible(bool closedCaptionsVisible); 340 340 341 bool autoplay() const; 341 bool autoplay() const; 342 342 void setAutoplay(bool); 343 343 … … 520 520 521 521 #if ENABLE(MEDIA_SOURCE) 522 RefPtr< MediaSource> m_mediaSource;522 RefPtr<HTMLMediaSource> m_mediaSource; 523 523 #endif 524 524 }; -
trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
r154921 r156049 47 47 virtual void load(const String& url) = 0; 48 48 #if ENABLE(MEDIA_SOURCE) 49 virtual void load(const String& url, PassRefPtr< MediaSource>) = 0;49 virtual void load(const String& url, PassRefPtr<HTMLMediaSource>) = 0; 50 50 #endif 51 51 virtual void cancelLoad() = 0; -
trunk/Source/WebCore/platform/graphics/MediaSourcePrivate.h
r144328 r156049 51 51 virtual void setDuration(double) = 0; 52 52 enum EndOfStreamStatus { EosNoError, EosNetworkError, EosDecodeError }; 53 virtual void endOfStream(EndOfStreamStatus) = 0; 53 virtual void markEndOfStream(EndOfStreamStatus) = 0; 54 virtual void unmarkEndOfStream() = 0; 54 55 }; 55 56 -
trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
r154921 r156049 130 130 // MediaPlayerPrivatePrivateInterface overrides. 131 131 virtual void load(const String& url); 132 #if ENABLE(MEDIA_SOURCE) 133 virtual void load(const String&, PassRefPtr<HTMLMediaSource>) { }; 134 #endif 132 135 virtual void cancelLoad() = 0; 133 136 -
trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
r151642 r156049 98 98 99 99 void load(const String& url); 100 #if ENABLE(MEDIA_SOURCE) 101 virtual void load(const String&, PassRefPtr<HTMLMediaSource>) { }; 102 #endif 100 103 void cancelLoad(); 101 104 void loadInternal(const String& url); -
trunk/Source/WebCore/platform/mac/MIMETypeRegistryMac.mm
r150227 r156049 74 74 } 75 75 76 #if ENABLE(MEDIA_SOURCE) 77 bool MIMETypeRegistry::isSupportedMediaSourceMIMEType(const String&, const String&) 78 { 79 return false; 76 80 } 81 #endif 82 83 }
Note: See TracChangeset
for help on using the changeset viewer.