Diff
Modified: trunk/Source/WebCore/ChangeLog (111019 => 111020)
--- trunk/Source/WebCore/ChangeLog 2012-03-16 16:56:57 UTC (rev 111019)
+++ trunk/Source/WebCore/ChangeLog 2012-03-16 16:56:57 UTC (rev 111020)
@@ -1,3 +1,40 @@
+2012-03-16 Tommy Widenflycht <[email protected]>
+
+ MediaStream API (JSEP): Introducing PeerConnection00Handler
+ https://bugs.webkit.org/show_bug.cgi?id=81333
+
+ Reviewed by Adam Barth.
+
+ In preparation of the last WebCore patch that will introduce PeerConnection00 here's its platform representation.
+
+ Not possible to test until the entire JSEP feature is commited.
+
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * platform/mediastream/PeerConnection00Handler.cpp: Added.
+ (WebCore):
+ (WebCore::PeerConnection00Handler::create):
+ (WebCore::PeerConnection00Handler::PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::~PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::createOffer):
+ (WebCore::PeerConnection00Handler::createAnswer):
+ (WebCore::PeerConnection00Handler::setLocalDescription):
+ (WebCore::PeerConnection00Handler::setRemoteDescription):
+ (WebCore::PeerConnection00Handler::localDescription):
+ (WebCore::PeerConnection00Handler::remoteDescription):
+ (WebCore::PeerConnection00Handler::startIce):
+ (WebCore::PeerConnection00Handler::processIceMessage):
+ (WebCore::PeerConnection00Handler::addStream):
+ (WebCore::PeerConnection00Handler::removeStream):
+ (WebCore::PeerConnection00Handler::stop):
+ * platform/mediastream/PeerConnection00Handler.h: Added.
+ (WebCore):
+ (PeerConnection00Handler):
+ * platform/mediastream/PeerConnection00HandlerClient.h: Added.
+ (WebCore):
+ (PeerConnection00HandlerClient):
+ (WebCore::PeerConnection00HandlerClient::~PeerConnection00HandlerClient):
+
2012-03-16 Pavel Podivilov <[email protected]>
Web Inspector: fix exception when hovering over bound function in heap profiler.
Modified: trunk/Source/WebCore/GNUmakefile.list.am (111019 => 111020)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-03-16 16:56:57 UTC (rev 111019)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-03-16 16:56:57 UTC (rev 111020)
@@ -3346,6 +3346,9 @@
Source/WebCore/platform/mediastream/MediaStreamComponent.h \
Source/WebCore/platform/mediastream/MediaStreamDescriptor.h \
Source/WebCore/platform/mediastream/MediaStreamSource.h \
+ Source/WebCore/platform/mediastream/PeerConnection00Handler.cpp \
+ Source/WebCore/platform/mediastream/PeerConnection00Handler.h \
+ Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h \
Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp \
Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h \
Source/WebCore/platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (111019 => 111020)
--- trunk/Source/WebCore/WebCore.gypi 2012-03-16 16:56:57 UTC (rev 111019)
+++ trunk/Source/WebCore/WebCore.gypi 2012-03-16 16:56:57 UTC (rev 111020)
@@ -429,6 +429,9 @@
'platform/mediastream/MediaStreamComponent.h',
'platform/mediastream/MediaStreamDescriptor.h',
'platform/mediastream/MediaStreamSource.h',
+ 'platform/mediastream/PeerConnection00Handler.cpp',
+ 'platform/mediastream/PeerConnection00Handler.h',
+ 'platform/mediastream/PeerConnection00HandlerClient.h',
'platform/mediastream/SessionDescriptionDescriptor.cpp',
'platform/mediastream/SessionDescriptionDescriptor.h',
'platform/mock/DeviceOrientationClientMock.h',
Added: trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.cpp (0 => 111020)
--- trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.cpp (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.cpp 2012-03-16 16:56:57 UTC (rev 111020)
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2012 Google AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. 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"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "PeerConnection00Handler.h"
+
+#include "IceCandidateDescriptor.h"
+#include "MediaStreamDescriptor.h"
+#include "PeerConnection00HandlerClient.h"
+#include "SessionDescriptionDescriptor.h"
+
+namespace WebCore {
+
+// Dummy implementations below for ports that build with MEDIA_STREAM enabled by default.
+
+PassOwnPtr<PeerConnection00Handler> PeerConnection00Handler::create(PeerConnection00HandlerClient* client, const String& serverConfiguration, const String& username)
+{
+ return adoptPtr(new PeerConnection00Handler(client, serverConfiguration, username));
+}
+
+PeerConnection00Handler::PeerConnection00Handler(PeerConnection00HandlerClient* client, const String&, const String&)
+ : m_client(client)
+{
+}
+
+PeerConnection00Handler::~PeerConnection00Handler()
+{
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::createOffer(PassRefPtr<MediaHints>)
+{
+ return 0;
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::createAnswer(const String&, PassRefPtr<MediaHints>)
+{
+ return 0;
+}
+
+bool PeerConnection00Handler::setLocalDescription(int, PassRefPtr<SessionDescriptionDescriptor>)
+{
+ return false;
+}
+
+bool PeerConnection00Handler::setRemoteDescription(int, PassRefPtr<SessionDescriptionDescriptor>)
+{
+ return false;
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::localDescription()
+{
+ return 0;
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::remoteDescription()
+{
+ return 0;
+}
+
+bool PeerConnection00Handler::startIce(PassRefPtr<IceOptions>)
+{
+ return false;
+}
+
+bool PeerConnection00Handler::processIceMessage(PassRefPtr<IceCandidateDescriptor>)
+{
+ return false;
+}
+
+void PeerConnection00Handler::addStream(PassRefPtr<MediaStreamDescriptor>)
+{
+}
+
+void PeerConnection00Handler::removeStream(PassRefPtr<MediaStreamDescriptor>)
+{
+}
+
+void PeerConnection00Handler::stop()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h (0 => 111020)
--- trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h 2012-03-16 16:56:57 UTC (rev 111020)
@@ -0,0 +1,78 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. 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 PeerConnection00Handler_h
+#define PeerConnection00Handler_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "MediaStreamDescriptor.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class IceCandidateDescriptor;
+class IceOptions;
+class MediaHints;
+class PeerConnection00HandlerClient;
+class SessionDescriptionDescriptor;
+
+class PeerConnection00Handler {
+ WTF_MAKE_NONCOPYABLE(PeerConnection00Handler);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassOwnPtr<PeerConnection00Handler> create(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
+ ~PeerConnection00Handler();
+
+ PassRefPtr<SessionDescriptionDescriptor> createOffer(PassRefPtr<MediaHints>);
+ PassRefPtr<SessionDescriptionDescriptor> createAnswer(const String& offer, PassRefPtr<MediaHints>);
+ bool setLocalDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
+ bool setRemoteDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
+ PassRefPtr<SessionDescriptionDescriptor> localDescription();
+ PassRefPtr<SessionDescriptionDescriptor> remoteDescription();
+ bool startIce(PassRefPtr<IceOptions>);
+ bool processIceMessage(PassRefPtr<IceCandidateDescriptor>);
+ void addStream(PassRefPtr<MediaStreamDescriptor>);
+ void removeStream(PassRefPtr<MediaStreamDescriptor>);
+ void stop();
+
+private:
+ PeerConnection00Handler(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
+
+ PeerConnection00HandlerClient* m_client;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // PeerConnection00Handler_h
Added: trunk/Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h (0 => 111020)
--- trunk/Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h 2012-03-16 16:56:57 UTC (rev 111020)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 Google AB. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. 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 PeerConnection00HandlerClient_h
+#define PeerConnection00HandlerClient_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class IceCandidateDescriptor;
+class MediaStreamDescriptor;
+
+class PeerConnection00HandlerClient {
+public:
+ virtual ~PeerConnection00HandlerClient() { }
+
+ virtual void didGenerateIceCandidate(PassRefPtr<IceCandidateDescriptor>, bool moreToFollow) = 0;
+ virtual void didChangeReadyState(uint32_t state) = 0;
+ virtual void didChangeIceState(uint32_t state) = 0;
+ virtual void didAddRemoteStream(PassRefPtr<MediaStreamDescriptor>) = 0;
+ virtual void didRemoveRemoteStream(MediaStreamDescriptor*) = 0;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // PeerConnection00HandlerClient_h