Changeset 181893 in webkit


Ignore:
Timestamp:
Mar 24, 2015 8:18:21 AM (9 years ago)
Author:
Philippe Normand
Message:

[OpenWebRTC] RealtimeMediaSourceCenter implementation
https://bugs.webkit.org/show_bug.cgi?id=142476

Reviewed by Eric Carlson.

The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
RealtimeMediaSourceCenter. It is not yet able to correctly assess
MediaConstraints so it selects the first audio/video sources
available through OpenWebRTC.

  • PlatformEfl.cmake: Add new files to the build.
  • PlatformGTK.cmake: Ditto.
  • platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
  • platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.

(WebCore::initializeOpenWebRTC): Simple function to initialize the
framework, it is going to be used by the PeerConnection backend as well.

  • platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.

(WebCore::mediaSourcesAvailableCallback): Function invoked once
the media sources discovery succeeded within OpenWebRTC.
(WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
the OpenWebRTC RealtimeMediaSourceCenter.
(WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
(WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
Schedule a discovery process for the capture sources.
(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
the first audio/video sources and create a MediaStream accordingly.
(WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
Not yet implemented.
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
Method invoked once the capture sources process succeeded. Parse
them and create an internal cache of RealtimeMediaSources accordingly.
(WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
function to fetch the first source of the given type from the
RealtimeMediaSources cache.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
Location:
trunk/Source/WebCore
Files:
5 added
1 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181892 r181893  
     12015-03-17  Philippe Normand  <pnormand@igalia.com>
     2
     3        [OpenWebRTC] RealtimeMediaSourceCenter implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=142476
     5
     6        Reviewed by Eric Carlson.
     7
     8        The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
     9        RealtimeMediaSourceCenter. It is not yet able to correctly assess
     10        MediaConstraints so it selects the first audio/video sources
     11        available through OpenWebRTC.
     12
     13        * PlatformEfl.cmake: Add new files to the build.
     14        * PlatformGTK.cmake: Ditto.
     15        * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
     16        * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
     17        (WebCore::initializeOpenWebRTC): Simple function to initialize the
     18        framework, it is going to be used by the PeerConnection backend as well.
     19        * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
     20        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
     21        (WebCore::mediaSourcesAvailableCallback): Function invoked once
     22        the media sources discovery succeeded within OpenWebRTC.
     23        (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
     24        the OpenWebRTC RealtimeMediaSourceCenter.
     25        (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
     26        (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
     27        (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
     28        Schedule a discovery process for the capture sources.
     29        (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
     30        the first audio/video sources and create a MediaStream accordingly.
     31        (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
     32        Not yet implemented.
     33        (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
     34        Method invoked once the capture sources process succeeded. Parse
     35        them and create an internal cache of RealtimeMediaSources accordingly.
     36        (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
     37        function to fetch the first source of the given type from the
     38        RealtimeMediaSources cache.
     39        * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
     40        * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
     41
    1422015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
    243
  • trunk/Source/WebCore/PlatformEfl.cmake

    r181892 r181893  
    1919    "${WEBCORE_DIR}/platform/graphics/texmap/coordinated"
    2020    "${WEBCORE_DIR}/platform/linux"
    21     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
     21    "${WEBCORE_DIR}/platform/mediastream/openwebrtc"
    2222    "${WEBCORE_DIR}/platform/mock/mediasource"
    2323    "${WEBCORE_DIR}/platform/network/soup"
     
    214214    platform/linux/MemoryPressureHandlerLinux.cpp
    215215
    216     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
     216    platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp
     217    platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
    217218
    218219    platform/network/efl/NetworkStateNotifierEfl.cpp
  • trunk/Source/WebCore/PlatformGTK.cmake

    r181624 r181893  
    1717    "${WEBCORE_DIR}/platform/graphics/wayland"
    1818    "${WEBCORE_DIR}/platform/linux"
    19     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
     19    "${WEBCORE_DIR}/platform/mediastream/openwebrtc"
    2020    "${WEBCORE_DIR}/platform/mock/mediasource"
    2121    "${WEBCORE_DIR}/platform/network/gtk"
     
    154154    platform/linux/MemoryPressureHandlerLinux.cpp
    155155
    156     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
     156    platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp
     157    platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
    157158
    158159    platform/network/soup/AuthenticationChallengeSoup.cpp
  • trunk/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h

    r181892 r181893  
    22 * Copyright (C) 2011 Ericsson AB. All rights reserved.
    33 * Copyright (C) 2012 Google Inc. All rights reserved.
     4 * Copyright (C) 2015 Igalia S.L. All rights reserved.
     5 * Copyright (C) 2015 Metrological. All rights reserved.
    46 *
    57 * Redistribution and use in source and binary forms, with or without
     
    3032 */
    3133
    32 #ifndef MediaStreamCenterGStreamer_h
    33 #define MediaStreamCenterGStreamer_h
     34#ifndef RealtimeMediaSourceCenterOwr_h
     35#define RealtimeMediaSourceCenterOwr_h
    3436
    35 #if ENABLE(MEDIA_STREAM)
     37#if ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
    3638
    3739#include "RealtimeMediaSourceCenter.h"
    3840
     41#include "RealtimeMediaSourceOwr.h"
    3942#include <wtf/PassRefPtr.h>
    40 #include <wtf/text/WTFString.h>
    4143
    4244namespace WebCore {
     
    4648class MediaStreamSourcesQueryClient;
    4749
    48 class MediaStreamCenterGStreamer : public RealtimeMediaSourceCenter {
     50class RealtimeMediaSourceCenterOwr final : public RealtimeMediaSourceCenter {
    4951public:
    50     MediaStreamCenterGStreamer();
    51     ~MediaStreamCenterGStreamer();
     52    RealtimeMediaSourceCenterOwr();
     53    ~RealtimeMediaSourceCenterOwr();
    5254
    5355    virtual void validateRequestConstraints(PassRefPtr<MediaStreamCreationClient>, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints);
    5456    virtual void createMediaStream(PassRefPtr<MediaStreamCreationClient>, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints);
    5557    virtual bool getMediaStreamTrackSources(PassRefPtr<MediaStreamTrackSourcesRequestClient>) override;
     58
     59    void mediaSourcesAvailable(GList* sources);
     60
     61private:
     62    PassRefPtr<RealtimeMediaSource> firstSource(RealtimeMediaSource::Type);
     63    RealtimeMediaSourceOwrMap m_sourceMap;
     64    RefPtr<MediaStreamCreationClient> m_client;
    5665};
    5766
    5867} // namespace WebCore
    5968
    60 #endif // ENABLE(MEDIA_STREAM)
     69#endif // ENABLE(MEDIA_STREAM) && USE(OPENWEBRTC)
    6170
    62 #endif // MediaStreamCenterGStreamer_h
     71#endif // RealtimeMediaSourceCenterOwr_h
Note: See TracChangeset for help on using the changeset viewer.