Unreviewed, rollout r209860 OWR player shouldn't be selected for
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Dec 2016 19:32:45 +0000 (19:32 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Dec 2016 19:32:45 +0000 (19:32 +0000)
normal video playback

Source/WebCore:

* platform/GStreamer.cmake:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
(WebCore::MediaPlayerPrivateGStreamerOwr::play):
(WebCore::MediaPlayerPrivateGStreamerOwr::pause):
(WebCore::MediaPlayerPrivateGStreamerOwr::load):
(WebCore::MediaPlayerPrivateGStreamerOwr::stop):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::createMutedRemoteSource):
* platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
* platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.

LayoutTests:

* platform/gtk/TestExpectations:

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

12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/GStreamer.cmake
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h
Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp
Source/WebCore/platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h [deleted file]
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp [deleted file]
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h
Source/WebCore/platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h [deleted file]

index 8333b62..ecba244 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-17  Philippe Normand  <pnormand@igalia.com>
+
+        Unreviewed, rollout r209860 OWR player shouldn't be selected for normal video playback
+
+        * platform/gtk/TestExpectations:
+
 2016-12-17  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Visual viewports: bottom fixed elements disappear behind the keyboard
index 91d849f..98e156c 100644 (file)
@@ -314,6 +314,7 @@ webkit.org/b/79203 fast/events/constructors/media-stream-event-constructor.html
 webkit.org/b/79203 webaudio/mediastreamaudiodestinationnode.html [ Skip ]
 webkit.org/b/79203 webaudio/mediastreamaudiosourcenode.html [ Skip ]
 webkit.org/b/79203 fast/mediastream/MediaStream-video-element.html [ Skip ]
+webkit.org/b/79203 fast/mediastream/MediaStream-video-element-track-stop.html [ Skip ]
 webkit.org/b/151344 fast/mediastream/MediaStream-add-ended-tracks.html [ Skip ]
 webkit.org/b/151344 fast/mediastream/MediaStream-add-remove-tracks.html [ Skip ]
 webkit.org/b/79203 fast/mediastream/mock-media-source.html [ Skip ]
@@ -322,7 +323,6 @@ webkit.org/b/160996 fast/mediastream/MediaStream-video-element-video-tracks-disa
 webkit.org/b/160996 fast/mediastream/apply-constraints-advanced.html [ Skip ]
 webkit.org/b/160996 fast/mediastream/apply-constraints-audio.html [ Skip ]
 webkit.org/b/160996 fast/mediastream/apply-constraints-video.html [ Skip ]
-webkit.org/b/161956 fast/mediastream/MediaStream-video-element-displays-buffer.html [ Skip ]
 
 # Proximity Events is not supported.
 webkit.org/b/99060 proximity [ Failure ]
@@ -821,6 +821,8 @@ webkit.org/b/117756 media/track/media-element-enqueue-event-crash.html [ Timeout
 
 webkit.org/b/153937 http/tests/misc/detach-during-notifyDone.html [ Crash Pass ]
 
+webkit.org/b/161956 fast/mediastream/MediaStream-video-element-displays-buffer.html [ Timeout ]
+
 webkit.org/b/131546 media/track/track-in-band.html [ Crash Timeout Failure ]
 
 webkit.org/b/163782 media/video-played-ranges-1.html [ Crash Pass ]
index c75dee9..67fc460 100644 (file)
@@ -1,3 +1,27 @@
+2016-12-17  Philippe Normand  <pnormand@igalia.com>
+
+        Unreviewed, rollout r209860 OWR player shouldn't be selected for normal video playback
+
+        * platform/GStreamer.cmake:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::play):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::pause):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::load):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::stop):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::setSize):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
+        * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
+        (WebCore::MediaEndpointOwr::createMutedRemoteSource):
+        * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
+        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
+        (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
+        * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
+        * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
+        * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.
+
 2016-12-17  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
index b4cc096..76de085 100644 (file)
@@ -16,7 +16,6 @@ if (ENABLE_MEDIA_STREAM)
 
         platform/mediastream/openwebrtc/MediaEndpointOwr.cpp
         platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp
-        platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp
         platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
     )
 endif ()
index e3a0689..3f00e8d 100644 (file)
@@ -56,9 +56,6 @@ MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr()
     if (hasVideo())
         m_videoTrack->removeObserver(*this);
 
-    m_audioTrackMap.clear();
-    m_videoTrackMap.clear();
-
     stop();
 }
 
@@ -72,7 +69,6 @@ void MediaPlayerPrivateGStreamerOwr::play()
         return;
     }
 
-    m_ended = false;
     m_paused = false;
 
     GST_DEBUG("Connecting to live stream, descriptor: %p", m_streamPrivate.get());
@@ -88,7 +84,7 @@ void MediaPlayerPrivateGStreamerOwr::pause()
 {
     GST_DEBUG("Pause");
     m_paused = true;
-    disableMediaTracks();
+    stop();
 }
 
 bool MediaPlayerPrivateGStreamerOwr::hasVideo() const
@@ -205,9 +201,6 @@ void MediaPlayerPrivateGStreamerOwr::load(MediaStreamPrivate& streamPrivate)
                 String preSelectedDevice = getenv("WEBKIT_AUDIO_DEVICE");
                 if (!preSelectedDevice || (preSelectedDevice == track->label())) {
                     m_audioTrack = track;
-                    auto audioTrack = AudioTrackPrivateMediaStream::create(*m_audioTrack.get());
-                    m_player->addAudioTrack(*audioTrack);
-                    m_audioTrackMap.add(track->id(), audioTrack);
                     observeTrack = true;
                 }
             }
@@ -217,10 +210,6 @@ void MediaPlayerPrivateGStreamerOwr::load(MediaStreamPrivate& streamPrivate)
                 String preSelectedDevice = getenv("WEBKIT_VIDEO_DEVICE");
                 if (!preSelectedDevice || (preSelectedDevice == track->label())) {
                     m_videoTrack = track;
-                    auto videoTrack = VideoTrackPrivateMediaStream::create(*m_videoTrack.get());
-                    m_player->addVideoTrack(*videoTrack);
-                    videoTrack->setSelected(true);
-                    m_videoTrackMap.add(track->id(), videoTrack);
                     observeTrack = true;
                 }
             }
@@ -256,31 +245,20 @@ bool MediaPlayerPrivateGStreamerOwr::didLoadingProgress() const
     return true;
 }
 
-void MediaPlayerPrivateGStreamerOwr::disableMediaTracks()
+void MediaPlayerPrivateGStreamerOwr::stop()
 {
     if (m_audioTrack) {
         GST_DEBUG("Stop: disconnecting audio");
-        g_object_set(m_audioRenderer.get(), "disabled", true, nullptr);
+        g_object_set(m_audioRenderer.get(), "disabled", TRUE, nullptr);
         owr_media_renderer_set_source(OWR_MEDIA_RENDERER(m_audioRenderer.get()), nullptr);
     }
-
     if (m_videoTrack) {
         GST_DEBUG("Stop: disconnecting video");
-        g_object_set(m_videoRenderer.get(), "disabled", true, nullptr);
+        g_object_set(m_videoRenderer.get(), "disabled", TRUE, nullptr);
         owr_media_renderer_set_source(OWR_MEDIA_RENDERER(m_videoRenderer.get()), nullptr);
     }
 }
 
-void MediaPlayerPrivateGStreamerOwr::stop()
-{
-    disableMediaTracks();
-    if (m_videoTrack) {
-        auto videoTrack = m_videoTrackMap.get(m_videoTrack->id());
-        if (videoTrack)
-            videoTrack->setSelected(false);
-    }
-}
-
 void MediaPlayerPrivateGStreamerOwr::registerMediaEngine(MediaEngineRegistrar registrar)
 {
     if (initializeGStreamerAndGStreamerDebugging()) {
@@ -349,25 +327,9 @@ void MediaPlayerPrivateGStreamerOwr::trackEnded(MediaStreamTrackPrivate& track)
     }
 
     if (&track == m_audioTrack)
-        g_object_set(m_audioRenderer.get(), "disabled", true, nullptr);
-    else if (&track == m_videoTrack) {
-        g_object_set(m_videoRenderer.get(), "disabled", true, nullptr);
-        auto& realTimeMediaSource = static_cast<RealtimeMediaSourceOwr&>(m_videoTrack->source());
-        realTimeMediaSource.setWidth(0);
-        realTimeMediaSource.setHeight(0);
-        auto videoTrack = m_videoTrackMap.get(m_videoTrack->id());
-        if (videoTrack)
-            videoTrack->setSelected(false);
-    }
-
-    bool audioDisabled;
-    bool videoDisabled;
-    g_object_get(m_audioRenderer.get(), "disabled", &audioDisabled, nullptr);
-    g_object_get(m_videoRenderer.get(), "disabled", &videoDisabled, nullptr);
-    if (audioDisabled && videoDisabled) {
-        m_ended = true;
-        m_player->timeChanged();
-    }
+        g_object_set(m_audioRenderer.get(), "disabled", TRUE, nullptr);
+    else if (&track == m_videoTrack)
+        g_object_set(m_videoRenderer.get(), "disabled", TRUE, nullptr);
 }
 
 void MediaPlayerPrivateGStreamerOwr::trackMutedChanged(MediaStreamTrackPrivate& track)
@@ -417,17 +379,7 @@ void MediaPlayerPrivateGStreamerOwr::trackSettingsChanged(MediaStreamTrackPrivat
 void MediaPlayerPrivateGStreamerOwr::trackEnabledChanged(MediaStreamTrackPrivate& track)
 {
     GST_DEBUG("%s track now %s", track.type() == RealtimeMediaSource::Audio ? "audio":"video", track.enabled() ? "enabled":"disabled");
-
-    switch (track.type()) {
-    case RealtimeMediaSource::Audio:
-        g_object_set(m_audioRenderer.get(), "disabled", !track.enabled(), nullptr);
-        break;
-    case RealtimeMediaSource::Video:
-        g_object_set(m_videoRenderer.get(), "disabled", !track.enabled(), nullptr);
-        break;
-    case RealtimeMediaSource::None:
-        GST_WARNING("Trying to change enabled state of a track with None type");
-    }
+    maybeHandleChangeMutedState(track);
 }
 
 GstElement* MediaPlayerPrivateGStreamerOwr::createVideoSink()
@@ -474,23 +426,6 @@ void MediaPlayerPrivateGStreamerOwr::setSize(const IntSize& size)
     MediaPlayerPrivateGStreamerBase::setSize(size);
     if (m_videoRenderer)
         g_object_set(m_videoRenderer.get(), "width", size.width(), "height", size.height(), nullptr);
-
-    auto& realTimeMediaSource = static_cast<RealtimeMediaSourceOwr&>(m_videoTrack->source());
-    realTimeMediaSource.setWidth(size.width());
-    realTimeMediaSource.setHeight(size.height());
-}
-
-FloatSize MediaPlayerPrivateGStreamerOwr::naturalSize() const
-{
-    auto size = MediaPlayerPrivateGStreamerBase::naturalSize();
-
-    // In case we are not playing the video we return the size we set to the media source.
-    if (size.isZero()) {
-        auto& realTimeMediaSource = static_cast<RealtimeMediaSourceOwr&>(m_videoTrack->source());
-        return realTimeMediaSource.size();
-    }
-
-    return size;
 }
 
 } // namespace WebCore
index 334630e..e622d42 100644 (file)
 
 #if ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER) && USE(OPENWEBRTC)
 
-#include "AudioTrackPrivateMediaStream.h"
 #include "MediaPlayerPrivateGStreamerBase.h"
 #include "MediaStreamTrackPrivate.h"
-#include "VideoTrackPrivateMediaStream.h"
 
 typedef struct _OwrGstVideoRenderer OwrGstVideoRenderer;
 typedef struct _OwrGstAudioRenderer OwrGstAudioRenderer;
@@ -44,8 +42,6 @@ public:
 
     void setSize(const IntSize&) final;
 
-    FloatSize naturalSize() const final;
-
 private:
     GstElement* createVideoSink() final;
     GstElement* audioSink() const final { return m_audioSink.get(); }
@@ -91,7 +87,6 @@ private:
 
     bool canLoadPoster() const final { return false; }
     void setPoster(const String&) final { }
-    bool ended() const final { return m_ended; }
 
     // MediaStreamTrackPrivate::Observer implementation.
     void trackEnded(MediaStreamTrackPrivate&) final;
@@ -106,19 +101,14 @@ private:
     void loadingFailed(MediaPlayer::NetworkState error);
     void stop();
     void maybeHandleChangeMutedState(MediaStreamTrackPrivate&);
-    void disableMediaTracks();
 
     bool m_paused { true };
-    bool m_ended { false };
     RefPtr<MediaStreamTrackPrivate> m_videoTrack;
     RefPtr<MediaStreamTrackPrivate> m_audioTrack;
     GRefPtr<GstElement> m_audioSink;
     RefPtr<MediaStreamPrivate> m_streamPrivate;
     GRefPtr<OwrGstVideoRenderer> m_videoRenderer;
     GRefPtr<OwrGstAudioRenderer> m_audioRenderer;
-
-    HashMap<String, RefPtr<AudioTrackPrivateMediaStream>> m_audioTrackMap;
-    HashMap<String, RefPtr<VideoTrackPrivateMediaStream>> m_videoTrackMap;
 };
 
 } // namespace WebCore
index 44839d1..a7a21f4 100644 (file)
@@ -39,8 +39,7 @@
 #include "OpenWebRTCUtilities.h"
 #include "PeerConnectionStates.h"
 #include "RTCDataChannelHandler.h"
-#include "RealtimeAudioSourceOwr.h"
-#include "RealtimeVideoSourceOwr.h"
+#include "RealtimeMediaSourceOwr.h"
 #include <owr/owr.h>
 #include <owr/owr_audio_payload.h>
 #include <owr/owr_crypto_utils.h>
@@ -351,21 +350,15 @@ Ref<RealtimeMediaSource> MediaEndpointOwr::createMutedRemoteSource(const String&
 {
     String name;
     String id("not used");
-    RefPtr<RealtimeMediaSourceOwr> source;
 
     switch (type) {
-    case RealtimeMediaSource::Audio:
-        name = "remote audio";
-        source = adoptRef(new RealtimeAudioSourceOwr(nullptr, id, type, name));
-        break;
-    case RealtimeMediaSource::Video:
-        name = "remote video";
-        source = adoptRef(new RealtimeVideoSourceOwr(nullptr, id, type, name));
-        break;
+    case RealtimeMediaSource::Audio: name = "remote audio"; break;
+    case RealtimeMediaSource::Video: name = "remote video"; break;
     case RealtimeMediaSource::None:
         ASSERT_NOT_REACHED();
     }
 
+    RefPtr<RealtimeMediaSourceOwr> source = adoptRef(new RealtimeMediaSourceOwr(nullptr, id, type, name));
     m_mutedRemoteSources.set(mid, source);
 
     return *source;
diff --git a/Source/WebCore/platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h b/Source/WebCore/platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h
deleted file mode 100644 (file)
index 2349f05..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2015,2016 Igalia S.L
- * Copyright (C) 2015 Metrological
- *
- * 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 the copyright holder 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
- * HOLDER 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.
- */
-
-#pragma once
-
-#if ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
-
-#include "RealtimeMediaSourceOwr.h"
-
-namespace WebCore {
-
-class RealtimeAudioSourceOwr : public RealtimeMediaSourceOwr {
-public:
-RealtimeAudioSourceOwr(OwrMediaSource* mediaSource, const String& id, RealtimeMediaSource::Type type, const String& name)
-    : RealtimeMediaSourceOwr(mediaSource, id, type, name)
-    {
-    }
-
-RealtimeAudioSourceOwr(const String& id, RealtimeMediaSource::Type type, const String& name)
-    : RealtimeMediaSourceOwr(id, type, name)
-    {
-    }
-
-    virtual ~RealtimeAudioSourceOwr() { }
-
-    bool applySize(const IntSize&) final { return false; }
-
-protected:
-    void initializeSettings() final {
-        if (m_currentSettings.deviceId().isEmpty())
-            m_currentSettings.setSupportedConstraits(supportedConstraints());
-
-        m_currentSettings.setDeviceId(id());
-    }
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
index f3e6f1f..67c91b8 100644 (file)
@@ -40,9 +40,7 @@
 #include "MediaStreamPrivate.h"
 #include "NotImplemented.h"
 #include "OpenWebRTCUtilities.h"
-#include "RealtimeAudioSourceOwr.h"
 #include "RealtimeMediaSourceCapabilities.h"
-#include "RealtimeVideoSourceOwr.h"
 #include "UUID.h"
 #include <owr/owr.h>
 #include <owr/owr_local.h>
@@ -151,21 +149,16 @@ void RealtimeMediaSourceCenterOwr::mediaSourcesAvailable(GList* sources)
             ASSERT_NOT_REACHED();
         }
 
-        RefPtr<RealtimeMediaSourceOwr> mediaSource;
-        if (mediaSourceType == RealtimeMediaSource::Audio)
-            mediaSource = adoptRef(new RealtimeAudioSourceOwr(source, id, mediaSourceType, sourceName));
-        else
-            mediaSource = adoptRef(new RealtimeVideoSourceOwr(source, id, mediaSourceType, sourceName));
+        auto mediaSource = adoptRef(*new RealtimeMediaSourceOwr(source, id, mediaSourceType, sourceName));
 
         RealtimeMediaSourceOwrMap::iterator sourceIterator = m_sourceMap.find(id);
         if (sourceIterator == m_sourceMap.end())
             m_sourceMap.add(id, mediaSource.copyRef());
 
         if (mediaType & OWR_MEDIA_TYPE_AUDIO)
-            audioSources.append(mediaSource.releaseNonNull());
+            audioSources.append(WTFMove(mediaSource));
         else if (mediaType & OWR_MEDIA_TYPE_VIDEO)
-            videoSources.append(mediaSource.releaseNonNull());
-
+            videoSources.append(WTFMove(mediaSource));
     }
 
     if (videoSources.isEmpty() && audioSources.isEmpty())
diff --git a/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp b/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp
deleted file mode 100644 (file)
index ee7499d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2016 Igalia S.L
- *
- * 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 the copyright holder 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
- * HOLDER 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) && USE(OPENWEBRTC)
-#include "RealtimeMediaSourceOwr.h"
-
-namespace WebCore {
-
-const RealtimeMediaSourceSettings& RealtimeMediaSourceOwr::settings() const
-{
-    const_cast<RealtimeMediaSourceOwr&>(*this).initializeSettings();
-    return m_currentSettings;
-}
-
-RealtimeMediaSourceSupportedConstraints& RealtimeMediaSourceOwr::supportedConstraints()
-{
-    if (m_supportedConstraints.supportsDeviceId())
-        return m_supportedConstraints;
-
-    m_supportedConstraints.setSupportsDeviceId(true);
-    initializeSupportedConstraints(m_supportedConstraints);
-
-    return m_supportedConstraints;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
index b9899f1..1bf5128 100644 (file)
@@ -73,22 +73,13 @@ RealtimeMediaSourceOwr(const String& id, RealtimeMediaSource::Type type, const S
     }
 
     RefPtr<RealtimeMediaSourceCapabilities> capabilities() const override { return m_capabilities; }
-    const RealtimeMediaSourceSettings& settings() const override;
+    const RealtimeMediaSourceSettings& settings() const override { return m_currentSettings; }
 
     OwrMediaSource* mediaSource() const { return m_mediaSource; }
 
-protected:
-    virtual void initializeSettings() { };
-    virtual void initializeSupportedConstraints(RealtimeMediaSourceSupportedConstraints&) { };
-    RealtimeMediaSourceSupportedConstraints& supportedConstraints();
-
-    RealtimeMediaSourceSettings m_currentSettings;
-
 private:
-
-    RealtimeMediaSourceSupportedConstraints m_supportedConstraints;
     RefPtr<RealtimeMediaSourceCapabilities> m_capabilities;
-
+    RealtimeMediaSourceSettings m_currentSettings;
     OwrMediaSource* m_mediaSource;
 };
 
diff --git a/Source/WebCore/platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h b/Source/WebCore/platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h
deleted file mode 100644 (file)
index dc66a3e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2015,2016 Igalia S.L
- * Copyright (C) 2015 Metrological
- *
- * 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 the copyright holder 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
- * HOLDER 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.
- */
-
-#pragma once
-
-#if ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
-
-#include "RealtimeMediaSourceOwr.h"
-
-namespace WebCore {
-
-class RealtimeVideoSourceOwr : public RealtimeMediaSourceOwr {
-public:
-RealtimeVideoSourceOwr(OwrMediaSource* mediaSource, const String& id, RealtimeMediaSource::Type type, const String& name)
-    : RealtimeMediaSourceOwr(mediaSource, id, type, name)
-    {
-    }
-
-RealtimeVideoSourceOwr(const String& id, RealtimeMediaSource::Type type, const String& name)
-    : RealtimeMediaSourceOwr(id, type, name)
-    {
-    }
-
-    virtual ~RealtimeVideoSourceOwr() { }
-
-    bool applySize(const IntSize&) final { return true; }
-
-protected:
-    void initializeSettings() final {
-        if (m_currentSettings.deviceId().isEmpty())
-            m_currentSettings.setSupportedConstraits(supportedConstraints());
-
-        m_currentSettings.setDeviceId(id());
-
-        m_currentSettings.setFrameRate(frameRate());
-        m_currentSettings.setWidth(size().width());
-        m_currentSettings.setHeight(size().height());
-    }
-
-    void initializeSupportedConstraints(RealtimeMediaSourceSupportedConstraints& supportedConstraints) final {
-        supportedConstraints.setSupportsFacingMode(RealtimeMediaSourceSettings::Unknown);
-        supportedConstraints.setSupportsWidth(true);
-        supportedConstraints.setSupportsHeight(true);
-        supportedConstraints.setSupportsAspectRatio(true);
-        supportedConstraints.setSupportsFrameRate(true);
-    }
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)