Create SourceBuffer and SourceBufferList objects
authorannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 20:44:43 +0000 (20:44 +0000)
committerannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 20:44:43 +0000 (20:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=91771

Reviewed by Eric Carlson.

SourceBuffer and SourceBufferList objects are needed in order to
implement the new object-oriented MediaSource API:
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html

No new tests - will be able to test after landing BUGWK91775

Adding new files to build files:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/WebCoreCommon.vsprops:
* WebCore.vcproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:

New objects:
* Modules/mediasource/SourceBuffer.cpp: Added.
* Modules/mediasource/SourceBuffer.h: Added.
* Modules/mediasource/SourceBuffer.idl: Added.
* Modules/mediasource/SourceBufferList.cpp: Added.
* Modules/mediasource/SourceBufferList.h: Added.
* Modules/mediasource/SourceBufferList.idl: Added.

New events:
* dom/EventNames.h:
(WebCore):
* dom/EventTarget.h:
(WebCore):
* dom/EventTargetFactory.in:

Object constructors:
* page/DOMWindow.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/mediasource/SourceBuffer.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediasource/SourceBuffer.h [new file with mode: 0644]
Source/WebCore/Modules/mediasource/SourceBuffer.idl [new file with mode: 0644]
Source/WebCore/Modules/mediasource/SourceBufferList.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediasource/SourceBufferList.h [new file with mode: 0644]
Source/WebCore/Modules/mediasource/SourceBufferList.idl [new file with mode: 0644]
Source/WebCore/Target.pri
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/EventTargetFactory.in
Source/WebCore/page/DOMWindow.idl

index 352b54e..28b69e3 100644 (file)
@@ -2636,6 +2636,20 @@ SET(WebCoreTestSupport_SOURCES
     testing/InternalSettings.cpp
 )
 
+IF (ENABLE_MEDIA_SOURCE)
+    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${WEBCORE_DIR}/Modules/mediasource
+    )
+    LIST(APPEND WebCore_IDL_FILES
+        Modules/mediasource/SourceBuffer.idl
+        Modules/mediasource/SourceBufferList.idl
+    )
+    LIST(APPEND WebCore_SOURCES
+        Modules/mediasource/SourceBuffer.cpp
+        Modules/mediasource/SourceBufferList.cpp
+    )
+ENDIF()
+
 # Modules that the bindings generator scripts may use
 SET(SCRIPTS_RESOLVE_SUPPLEMENTAL
     ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
index 3796872..310ea45 100644 (file)
@@ -1,3 +1,49 @@
+2012-07-24  Anna Cavender  <annacc@chromium.org>
+
+        Create SourceBuffer and SourceBufferList objects
+        https://bugs.webkit.org/show_bug.cgi?id=91771
+
+        Reviewed by Eric Carlson.
+
+        SourceBuffer and SourceBufferList objects are needed in order to
+        implement the new object-oriented MediaSource API:
+        http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
+
+        No new tests - will be able to test after landing BUGWK91775
+
+        Adding new files to build files:
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcproj/WebCoreCommon.vsprops:
+        * WebCore.vcproj/copyForwardingHeaders.cmd:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        New objects:
+        * Modules/mediasource/SourceBuffer.cpp: Added.
+        * Modules/mediasource/SourceBuffer.h: Added.
+        * Modules/mediasource/SourceBuffer.idl: Added.
+        * Modules/mediasource/SourceBufferList.cpp: Added.
+        * Modules/mediasource/SourceBufferList.h: Added.
+        * Modules/mediasource/SourceBufferList.idl: Added.
+
+        New events:
+        * dom/EventNames.h:
+        (WebCore):
+        * dom/EventTarget.h:
+        (WebCore):
+        * dom/EventTargetFactory.in:
+
+        Object constructors:
+        * page/DOMWindow.idl:
+
 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
 
         Store the full year in GregorianDateTime
index a4d3741..608386a 100644 (file)
 #include "JSShadowRoot.cpp"
 #include "JSSharedWorker.cpp"
 #include "JSSharedWorkerContext.cpp"
+#if ENABLE(MEDIA_SOURCE)
+#include "JSSourceBuffer.cpp"
+#include "JSSourceBufferList.cpp"
+#endif
 #include "JSSQLError.cpp"
 #include "JSSQLException.cpp"
 #include "JSSQLResultSet.cpp"
index 50e630a..70c946d 100644 (file)
@@ -31,6 +31,7 @@ VPATH = \
     $(WebCore)/Modules/filesystem \
     $(WebCore)/Modules/geolocation \
     $(WebCore)/Modules/indexeddb \
+    $(WebCore)/Modules/mediasource \
     $(WebCore)/Modules/notifications \
     $(WebCore)/Modules/quota \
     $(WebCore)/Modules/webaudio \
@@ -105,6 +106,8 @@ BINDING_IDLS = \
     $(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
     $(WebCore)/Modules/indexeddb/IDBVersionChangeRequest.idl \
     $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \
+    $(WebCore)/Modules/mediasource/SourceBuffer.idl \
+    $(WebCore)/Modules/mediasource/SourceBufferList.idl \
     $(WebCore)/Modules/notifications/DOMWindowNotifications.idl \
     $(WebCore)/Modules/notifications/Notification.idl \
     $(WebCore)/Modules/notifications/NotificationCenter.idl \
@@ -946,6 +949,7 @@ IDL_INCLUDES = \
     $(WebCore)/fileapi \
     $(WebCore)/html \
     $(WebCore)/css \
+    $(WebCore)/Modules/mediasource \
     $(WebCore)/Modules/notifications \
     $(WebCore)/page \
     $(WebCore)/xml \
index 97178ed..f29faeb 100644 (file)
@@ -620,6 +620,12 @@ contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
     $$PWD/html/track/TrackEvent.idl \
 }
 
+contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
+  IDL_BINDINGS += \
+    $$PWD/Modules/mediasource/SourceBuffer.idl \
+    $$PWD/Modules/mediasource/SourceBufferList.idl
+}
+
 mathmlnames.output = MathMLNames.cpp
 mathmlnames.input = MATHML_NAMES
 mathmlnames.depends = $$PWD/mathml/mathattrs.in
index 5871c6b..a86da73 100644 (file)
@@ -15,6 +15,7 @@ webcore_cppflags += \
        -I$(srcdir)/Source/WebCore/Modules/gamepad \
        -I$(srcdir)/Source/WebCore/Modules/geolocation \
        -I$(srcdir)/Source/WebCore/Modules/indexeddb \
+       -I$(srcdir)/Source/WebCore/Modules/mediasource \
        -I$(srcdir)/Source/WebCore/Modules/mediastream \
        -I$(srcdir)/Source/WebCore/Modules/notifications \
        -I$(srcdir)/Source/WebCore/Modules/protocolhandler \
@@ -881,6 +882,7 @@ IDL_PATH := \
     $(WebCore)/Modules/gamepad \
     $(WebCore)/Modules/geolocation \
     $(WebCore)/Modules/indexeddb \
+    $(WebCore)/Modules/mediasource \
     $(WebCore)/Modules/mediastream \
     $(WebCore)/Modules/notifications \
     $(WebCore)/Modules/webaudio \
@@ -1049,6 +1051,7 @@ EXTRA_DIST += \
        $(shell ls $(srcdir)/Source/WebCore/Modules/gamepad/*.idl) \
        $(shell ls $(srcdir)/Source/WebCore/Modules/geolocation/*.idl) \
        $(shell ls $(srcdir)/Source/WebCore/Modules/indexeddb/*.idl) \
+       $(shell ls $(srcdir)/Source/WebCore/Modules/mediasource/*.idl) \
        $(shell ls $(srcdir)/Source/WebCore/Modules/mediastream/*.idl) \
        $(shell ls $(srcdir)/Source/WebCore/Modules/notifications/*.idl) \
        $(shell ls $(srcdir)/Source/WebCore/Modules/protocolhandler/*.idl) \
index 873acbc..5f1c47b 100644 (file)
@@ -507,6 +507,10 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSSharedWorker.h \
        DerivedSources/WebCore/JSSignalingCallback.cpp \
        DerivedSources/WebCore/JSSignalingCallback.h \
+       DerivedSources/WebCore/JSSourceBuffer.cpp \
+       DerivedSources/WebCore/JSSourceBuffer.h \
+       DerivedSources/WebCore/JSSourceBufferList.cpp \
+       DerivedSources/WebCore/JSSourceBufferList.h \
        DerivedSources/WebCore/JSSpeechInputEvent.cpp \
        DerivedSources/WebCore/JSSpeechInputEvent.h \
        DerivedSources/WebCore/JSSpeechInputResult.cpp \
@@ -696,6 +700,8 @@ dom_binding_idls += \
        $(WebCore)/Modules/geolocation/PositionCallback.idl \
        $(WebCore)/Modules/geolocation/PositionError.idl \
        $(WebCore)/Modules/geolocation/PositionErrorCallback.idl \
+       $(WebCore)/Modules/mediasource/SourceBuffer.idl \
+       $(WebCore)/Modules/mediasource/SourceBufferList.idl \
        $(WebCore)/Modules/mediastream/DeprecatedPeerConnection.idl \
        $(WebCore)/Modules/mediastream/DOMWindowMediaStream.idl \
        $(WebCore)/Modules/mediastream/IceCallback.idl \
@@ -1165,6 +1171,10 @@ webcore_modules_sources += \
        Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.h \
        Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp \
        Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h \
+       Source/WebCore/Modules/mediasource/SourceBuffer.cpp \
+       Source/WebCore/Modules/mediasource/SourceBuffer.h \
+       Source/WebCore/Modules/mediasource/SourceBufferList.cpp \
+       Source/WebCore/Modules/mediasource/SourceBufferList.h \
        Source/WebCore/Modules/mediastream/DeprecatedPeerConnection.cpp \
        Source/WebCore/Modules/mediastream/DeprecatedPeerConnection.h \
        Source/WebCore/Modules/mediastream/IceCallback.h \
diff --git a/Source/WebCore/Modules/mediasource/SourceBuffer.cpp b/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
new file mode 100644 (file)
index 0000000..7b36821
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SourceBuffer.h"
+
+#if ENABLE(MEDIA_SOURCE)
+
+#include "TimeRanges.h"
+#include <wtf/Uint8Array.h>
+
+namespace WebCore {
+
+SourceBuffer::SourceBuffer(const String& id)
+    : m_id(id)
+{
+}
+
+SourceBuffer::~SourceBuffer()
+{
+}
+
+PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode&) const
+{
+    // FIXME(91773): return buffered data from media source.
+    return 0;
+}
+
+void SourceBuffer::append(PassRefPtr<Uint8Array>, ExceptionCode&)
+{
+    // FIXME(91773): append the data to the media source.
+}
+
+void SourceBuffer::abort(ExceptionCode&)
+{
+    // FIXME(91773): signal the media source to abort this source buffer.
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/Modules/mediasource/SourceBuffer.h b/Source/WebCore/Modules/mediasource/SourceBuffer.h
new file mode 100644 (file)
index 0000000..0cbff3e
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SourceBuffer_h
+#define SourceBuffer_h
+
+#if ENABLE(MEDIA_SOURCE)
+
+#include "ExceptionCode.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class TimeRanges;
+
+class SourceBuffer : public RefCounted<SourceBuffer> {
+public:
+    static PassRefPtr<SourceBuffer> create(const String& id)
+    {
+        return adoptRef(new SourceBuffer(id));
+    }
+
+    virtual ~SourceBuffer();
+
+    PassRefPtr<TimeRanges> buffered(ExceptionCode&) const;
+
+    void append(PassRefPtr<Uint8Array> data, ExceptionCode&);
+
+    void abort(ExceptionCode&);
+    
+    const String& id() const { return m_id; }
+
+    void clear() { }
+
+private:
+    explicit SourceBuffer(const String& id);
+
+    String m_id;
+};
+
+} // namespace WebCore
+
+#endif
+#endif
diff --git a/Source/WebCore/Modules/mediasource/SourceBuffer.idl b/Source/WebCore/Modules/mediasource/SourceBuffer.idl
new file mode 100644 (file)
index 0000000..412b9cb
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+module html {
+
+    interface [
+        Conditional=MEDIA_SOURCE,
+        V8EnabledAtRuntime=mediaSource
+    ] SourceBuffer {
+
+        // Returns the time ranges buffered.
+        readonly attribute TimeRanges buffered
+            getter raises(DOMException);
+
+        // Append segment data.
+        void append(in Uint8Array data) raises (DOMException);
+
+        // Abort the current segment append sequence.
+        void abort() raises (DOMException);
+    };
+
+}
diff --git a/Source/WebCore/Modules/mediasource/SourceBufferList.cpp b/Source/WebCore/Modules/mediasource/SourceBufferList.cpp
new file mode 100644 (file)
index 0000000..3cc4678
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SourceBufferList.h"
+
+#if ENABLE(MEDIA_SOURCE)
+
+#include "Event.h"
+
+namespace WebCore {
+
+SourceBufferList::SourceBufferList(ScriptExecutionContext* context)
+    : m_scriptExecutionContext(context)
+{
+}
+
+unsigned long SourceBufferList::length() const
+{
+    return m_list.size();
+}
+
+SourceBuffer* SourceBufferList::item(unsigned index) const
+{
+    if (index >= m_list.size())
+        return 0;
+    return m_list[index].get();
+}
+
+void SourceBufferList::add(PassRefPtr<SourceBuffer> buffer)
+{
+    m_list.append(buffer);
+    createAndFireEvent(eventNames().webkitaddsourcebufferEvent);
+}
+
+bool SourceBufferList::remove(SourceBuffer* buffer)
+{    
+    size_t index = m_list.find(buffer);
+    if (index == notFound)
+        return false;
+
+    m_list.remove(index);
+    buffer->clear();
+    createAndFireEvent(eventNames().webkitremovesourcebufferEvent);
+    return true;
+}
+
+void SourceBufferList::clear()
+{
+    for (size_t i = 0; i < m_list.size(); ++i)
+        remove(m_list[i].get());
+}
+
+void SourceBufferList::createAndFireEvent(const AtomicString& eventName)
+{
+    RefPtr<Event> event = Event::create(eventName, false, false);
+    event->setTarget(this);
+
+    EventTarget::dispatchEvent(event);
+}
+
+const AtomicString& SourceBufferList::interfaceName() const
+{
+    return eventNames().interfaceForSourceBufferList;
+}
+
+ScriptExecutionContext* SourceBufferList::scriptExecutionContext() const
+{
+    return m_scriptExecutionContext;
+}
+
+EventTargetData* SourceBufferList::eventTargetData()
+{
+    return &m_eventTargetData;
+}
+
+EventTargetData* SourceBufferList::ensureEventTargetData()
+{
+    return &m_eventTargetData;
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/Modules/mediasource/SourceBufferList.h b/Source/WebCore/Modules/mediasource/SourceBufferList.h
new file mode 100644 (file)
index 0000000..7e9f831
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SourceBufferList_h
+#define SourceBufferList_h
+
+#if ENABLE(MEDIA_SOURCE)
+
+#include "EventTarget.h"
+#include "SourceBuffer.h"
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget {
+public:
+    static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context)
+    {
+        return adoptRef(new SourceBufferList(context));
+    }
+    virtual ~SourceBufferList() { }
+
+    unsigned long length() const;
+    SourceBuffer* item(unsigned index) const;
+
+    void add(PassRefPtr<SourceBuffer>);
+    bool remove(SourceBuffer*);
+    void clear();
+
+    // EventTarget interface
+    virtual const AtomicString& interfaceName() const OVERRIDE;
+    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
+
+    using RefCounted<SourceBufferList>::ref;
+    using RefCounted<SourceBufferList>::deref;
+
+protected:
+    virtual EventTargetData* eventTargetData() OVERRIDE;
+    virtual EventTargetData* ensureEventTargetData() OVERRIDE;
+
+private:
+    explicit SourceBufferList(ScriptExecutionContext*);
+
+    void createAndFireEvent(const AtomicString&);
+
+    virtual void refEventTarget() OVERRIDE { ref(); }
+    virtual void derefEventTarget() OVERRIDE { deref(); }
+
+    EventTargetData m_eventTargetData;
+    ScriptExecutionContext* m_scriptExecutionContext;
+
+    Vector<RefPtr<SourceBuffer> > m_list;
+};
+
+} // namespace WebCore
+
+#endif
+#endif
diff --git a/Source/WebCore/Modules/mediasource/SourceBufferList.idl b/Source/WebCore/Modules/mediasource/SourceBufferList.idl
new file mode 100644 (file)
index 0000000..39eddca
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+module html {
+
+    interface [
+        Conditional=MEDIA_SOURCE,
+        V8EnabledAtRuntime=mediaSource,
+        IndexedGetter,
+        EventTarget,
+        CallWith=ScriptExecutionContext
+    ] SourceBufferList {
+        readonly attribute unsigned long length;
+        SourceBuffer item(in unsigned long index);
+
+        // EventTarget interface
+        void addEventListener(in DOMString type,
+                              in EventListener listener,
+                              in [Optional] boolean useCapture);
+        void removeEventListener(in DOMString type,
+                                 in EventListener listener,
+                                 in [Optional] boolean useCapture);
+        boolean dispatchEvent(in Event event)
+            raises(EventException);
+    };
+
+}
index d867195..ebc3b59 100644 (file)
@@ -3008,6 +3008,15 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
         platform/AsyncFileSystem.cpp
 }
 
+contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
+    HEADERS += \
+        Modules/mediasource/SourceBuffer.h \
+        Modules/mediasource/SourceBufferList.h
+    SOURCES += \
+        Modules/mediasource/SourceBuffer.cpp \
+        Modules/mediasource/SourceBufferList.cpp
+}
+
 contains(DEFINES, ENABLE_ICONDATABASE=1) {
     SOURCES += \
         loader/icon/IconDatabase.cpp \
index 31e206c..dfb9ffa 100644 (file)
@@ -60,6 +60,7 @@
       '../Modules/geolocation',
       '../Modules/intents',
       '../Modules/indexeddb',
+      '../Modules/mediasource',
       '../Modules/mediastream',
       '../Modules/notifications',
       '../Modules/protocolhandler',
               '--include', '../Modules/filesystem',
               '--include', '../Modules/indexeddb',
               '--include', '../Modules/intents',
+              '--include', '../Modules/mediasource',
               '--include', '../Modules/mediastream',
               '--include', '../Modules/notifications',
               '--include', '../Modules/protocolhandler',
index 2fe39e2..040d8f7 100644 (file)
             'Modules/intents/Intent.idl',
             'Modules/intents/IntentResultCallback.idl',
             'Modules/intents/NavigatorIntents.idl',
+            'Modules/mediasource/SourceBuffer.idl',
+            'Modules/mediasource/SourceBufferList.idl',
             'Modules/mediastream/DeprecatedPeerConnection.idl',
             'Modules/mediastream/DOMWindowMediaStream.idl',
             'Modules/mediastream/IceCallback.idl',
             'Modules/intents/IntentResultCallback.h',
             'Modules/intents/NavigatorIntents.cpp',
             'Modules/intents/NavigatorIntents.h',
+            'Modules/mediasource/SourceBuffer.cpp',
+            'Modules/mediasource/SourceBuffer.h',
+            'Modules/mediasource/SourceBufferList.cpp',
+            'Modules/mediasource/SourceBufferList.h',
             'Modules/mediastream/DeprecatedPeerConnection.cpp',
             'Modules/mediastream/DeprecatedPeerConnection.h',
             'Modules/mediastream/IceCallback.h',
index 8f48353..a3fe36d 100755 (executable)
                                </File>
                        </Filter>
                        <Filter
+                               Name="mediasource"
+                               >
+                               <File
+                                       RelativePath="..\Modules\mediasource\SourceBuffer.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\Modules\mediasource\SourceBuffer.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\Modules\mediasource\SourceBufferList.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\Modules\mediasource\SourceBufferList.h"
+                                       >
+                               </File>
+                       </Filter>
+                       <Filter
                                Name="notifications"
                                >
                                <File
index 12e8767..15aa9bf 100644 (file)
@@ -7,7 +7,7 @@
        >
        <Tool
                Name="VCCLCompilerTool"
-               AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\Modules\filesystem&quot;;&quot;$(ProjectDir)..\Modules\geolocation&quot;;&quot;$(ProjectDir)..\Modules\indexeddb&quot;;&quot;$(ProjectDir)..\Modules\protocolhandler&quot;;&quot;$(ProjectDir)..\Modules\quota&quot;;&quot;$(ProjectDir)..\Modules\notifications&quot;;&quot;$(ProjectDir)..\Modules\webdatabase&quot;;&quot;$(ProjectDir)..\Modules\websockets&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\fileapi&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\mathml&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\rendering\svg&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\bindings\js\specialization&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\html\parser&quot;;&quot;$(ProjectDir)..\html\shadow&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\cache&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\mathml&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\scrolling&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\ca&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\filters\arm&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(ProjectDir)..\xml\parser&quot;;&quot;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\properties&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\testing&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
+               AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\Modules\filesystem&quot;;&quot;$(ProjectDir)..\Modules\geolocation&quot;;&quot;$(ProjectDir)..\Modules\indexeddb&quot;;&quot;$(ProjectDir)..\Modules\mediasource&quot;;&quot;$(ProjectDir)..\Modules\protocolhandler&quot;;&quot;$(ProjectDir)..\Modules\quota&quot;;&quot;$(ProjectDir)..\Modules\notifications&quot;;&quot;$(ProjectDir)..\Modules\webdatabase&quot;;&quot;$(ProjectDir)..\Modules\websockets&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\fileapi&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\mathml&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\rendering\svg&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\bindings\js\specialization&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\html\parser&quot;;&quot;$(ProjectDir)..\html\shadow&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\cache&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\mathml&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\scrolling&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\ca&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\filters\arm&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(ProjectDir)..\xml\parser&quot;;&quot;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\properties&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\testing&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
                PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
                UsePrecompiledHeader="2"
                PrecompiledHeaderThrough="WebCorePrefix.h"
index 0917cd7..79c3620 100755 (executable)
@@ -21,6 +21,7 @@ xcopy /y /d "%ProjectDir%..\config.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%CONFIGURATIONBUILDDIR%\obj\WebCore\DerivedSources\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\Modules\filesystem\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\Modules\geolocation\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
+xcopy /y /d "%ProjectDir%..\Modules\mediasource\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\Modules\notifications\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\Modules\protocolhandler\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\Modules\quota\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
index 1066ce6..3ab4070 100644 (file)
                B10B697E140C174000BC1C26 /* WebVTTTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTTokenizer.cpp; sourceTree = "<group>"; };
                B10B697F140C174000BC1C26 /* WebVTTTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTTokenizer.h; sourceTree = "<group>"; };
                B1827492134CA4C100B98C2D /* CallbackFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallbackFunction.cpp; sourceTree = "<group>"; };
+               B1A942E315B5CE2200D525D1 /* SourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceBuffer.cpp; sourceTree = "<group>"; };
+               B1A942E415B5CE2200D525D1 /* SourceBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBuffer.h; sourceTree = "<group>"; };
+               B1A942E515B5CE2200D525D1 /* SourceBuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourceBuffer.idl; sourceTree = "<group>"; };
+               B1A942E615B5CE2200D525D1 /* SourceBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceBufferList.cpp; sourceTree = "<group>"; };
+               B1A942E715B5CE2200D525D1 /* SourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferList.h; sourceTree = "<group>"; };
+               B1A942E815B5CE2200D525D1 /* SourceBufferList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourceBufferList.idl; sourceTree = "<group>"; };
                B1AD4E7113A12A4600846B27 /* TextTrackLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextTrackLoader.cpp; path = loader/TextTrackLoader.cpp; sourceTree = SOURCE_ROOT; };
                B1AD4E7213A12A4600846B27 /* TextTrackLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrackLoader.h; path = loader/TextTrackLoader.h; sourceTree = SOURCE_ROOT; };
                B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallbackFunction.h; sourceTree = "<group>"; };
                971145FE14EF006E00674FD9 /* Modules */ = {
                        isa = PBXGroup;
                        children = (
+                               B1A942DD15B5CE2200D525D1 /* mediasource */,
                                971145FF14EF007900674FD9 /* geolocation */,
                                9712A55315004E3C0048AF10 /* indexeddb */,
                                333F703D0FB49C16008E12A6 /* notifications */,
                        name = Plugins;
                        sourceTree = "<group>";
                };
+               B1A942DD15B5CE2200D525D1 /* mediasource */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B1A942E315B5CE2200D525D1 /* SourceBuffer.cpp */,
+                               B1A942E415B5CE2200D525D1 /* SourceBuffer.h */,
+                               B1A942E515B5CE2200D525D1 /* SourceBuffer.idl */,
+                               B1A942E615B5CE2200D525D1 /* SourceBufferList.cpp */,
+                               B1A942E715B5CE2200D525D1 /* SourceBufferList.h */,
+                               B1A942E815B5CE2200D525D1 /* SourceBufferList.idl */,
+                       );
+                       name = mediasource;
+                       path = Modules/mediasource;
+                       sourceTree = "<group>";
+               };
                B1AD4E7713A12A7200846B27 /* track */ = {
                        isa = PBXGroup;
                        children = (
index 3fc6ce5..b0efbe7 100644 (file)
@@ -157,6 +157,8 @@ namespace WebCore {
     macro(webkitbeginfullscreen) \
     macro(webkitendfullscreen) \
     \
+    macro(webkitaddsourcebuffer) \
+    macro(webkitremovesourcebuffer) \
     macro(webkitsourceopen) \
     macro(webkitsourceended) \
     macro(webkitsourceclose) \
index f387e42..ab0d7c7 100644 (file)
@@ -64,6 +64,7 @@ namespace WebCore {
     class ScriptExecutionContext;
     class SharedWorker;
     class SharedWorkerContext;
+    class SourceBufferList;
     class TextTrack;
     class TextTrackCue;
     class WebSocket;
index c558cd5..9c2bd9b 100644 (file)
@@ -27,6 +27,7 @@ PeerConnection00 conditional=MEDIA_STREAM
 Performance conditional=WEB_TIMING
 SharedWorker conditional=SHARED_WORKERS
 SharedWorkerContext conditional=SHARED_WORKERS
+SourceBufferList conditional=MEDIA_SOURCE
 SpeechRecognition conditional=SCRIPTED_SPEECH
 SVGElementInstance conditional=SVG
 TextTrack conditional=VIDEO_TRACK
index 2728576..a53336a 100644 (file)
@@ -782,6 +782,9 @@ module window {
 
         attribute [Conditional=MUTATION_OBSERVERS] MutationObserverConstructor WebKitMutationObserver;
 
+        attribute [Conditional=MEDIA_SOURCE, V8EnabledAtRuntime=mediaSource] SourceBufferConstructor SourceBuffer;
+        attribute [Conditional=MEDIA_SOURCE, V8EnabledAtRuntime=mediaSource] SourceBufferListConstructor SourceBufferList;
+
 #endif // defined(LANGUAGE_JAVASCRIPT)
 
 #if defined(V8_BINDING) && V8_BINDING