| Differences between
and this patch
- a/Source/WebCore/ChangeLog +46 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2014-10-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3
        Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
4
        https://bugs.webkit.org/show_bug.cgi?id=137765
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr with
9
        std::unique_ptr<>|std::make_unique<>. However MediaPlayer has used factory pattern, thus create() factory
10
        function should be kept to use factory pattern. Thus this patch sets contructor to private, and uses std::unique_ptr
11
        in the create() factory functions.
12
13
        No new tests, no behavior changes.
14
15
        * html/HTMLMediaElement.cpp:
16
        (WebCore::HTMLMediaElement::parseAttribute):
17
        * html/HTMLMediaElement.h:
18
        * platform/graphics/MediaPlayer.cpp:
19
        (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
20
        (WebCore::createNullMediaPlayer):
21
        * platform/graphics/MediaPlayer.h:
22
        (WebCore::MediaPlayer::create):
23
        * platform/graphics/MediaPlayerPrivate.h:
24
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
25
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
26
        (WebCore::MediaPlayerPrivateAVFoundationCF::create):
27
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
28
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
29
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
30
        (WebCore::MediaPlayerPrivateAVFoundationObjC::create):
31
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
32
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
33
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
34
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
35
        (WebCore::MediaPlayerPrivateGStreamer::create):
36
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
37
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
38
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
39
        (WebCore::MediaPlayerPrivateQTKit::create):
40
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
41
        (WebCore::MediaPlayerPrivateMediaFoundation::create):
42
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
43
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
44
        (WebCore::MockMediaPlayerMediaSource::create):
45
        * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
46
1
2014-10-28  Jer Noble  <jer.noble@apple.com>
47
2014-10-28  Jer Noble  <jer.noble@apple.com>
2
48
3
        [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
49
        [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
- a/Source/WebCore/WebCore.exp.in -1 / +1 lines
Lines 3414-3420 __ZN7WebCore16HTMLMediaElement22clearMediaCacheForSiteERKN3WTF6StringE a/Source/WebCore/WebCore.exp.in_sec1
3414
__ZN7WebCore16HTMLMediaElement4playEv
3414
__ZN7WebCore16HTMLMediaElement4playEv
3415
__ZN7WebCore16HTMLMediaElement5pauseEv
3415
__ZN7WebCore16HTMLMediaElement5pauseEv
3416
__ZN7WebCore16HTMLMediaElement8setMutedEb
3416
__ZN7WebCore16HTMLMediaElement8setMutedEb
3417
__ZN7WebCore25MediaPlayerFactorySupport23callRegisterMediaEngineEPFvPFvPFN3WTF10PassOwnPtrINS_27MediaPlayerPrivateInterfaceEEEPNS_11MediaPlayerEEPFvRNS1_7HashSetINS1_6StringENS1_10StringHashENS1_10HashTraitsISA_EEEEEPFNS5_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNS1_6VectorISA_Lm0ENS1_15CrashOnOverflowEEEEPFvvEPFvRKSA_EPFbSX_SX_EEE
3417
__ZN7WebCore25MediaPlayerFactorySupport23callRegisterMediaEngineEPFvPFvPFNSt3__110unique_ptrINS_27MediaPlayerPrivateInterfaceENS1_14default_deleteIS3_EEEEPNS_11MediaPlayerEEPFvRN3WTF7HashSetINSB_6StringENSB_10StringHashENSB_10HashTraitsISD_EEEEEPFNS7_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNSB_6VectorISD_Lm0ENSB_15CrashOnOverflowEEEEPFvvEPFvRKSD_EPFbS10_S10_EEE
3418
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10TimeRangesE
3418
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10TimeRangesE
3419
__ZNK7WebCore10TimeRanges7nearestEd
3419
__ZNK7WebCore10TimeRanges7nearestEd
3420
__ZNK7WebCore16HTMLMediaElement11currentTimeEv
3420
__ZNK7WebCore16HTMLMediaElement11currentTimeEv
- a/Source/WebCore/html/HTMLMediaElement.cpp -2 / +2 lines
Lines 4646-4652 void HTMLMediaElement::clearMediaPlayer(int flags) a/Source/WebCore/html/HTMLMediaElement.cpp_sec1
4646
        m_mediaSession->setHasPlaybackTargetAvailabilityListeners(*this, false);
4646
        m_mediaSession->setHasPlaybackTargetAvailabilityListeners(*this, false);
4647
#endif
4647
#endif
4648
4648
4649
    m_player.clear();
4649
    m_player = nullptr;
4650
4650
4651
    stopPeriodicTimers();
4651
    stopPeriodicTimers();
4652
    m_loadTimer.stop();
4652
    m_loadTimer.stop();
Lines 4693-4699 void HTMLMediaElement::stop() a/Source/WebCore/html/HTMLMediaElement.cpp_sec2
4693
    // Once an active DOM object has been stopped it can not be restarted, so we can deallocate
4693
    // Once an active DOM object has been stopped it can not be restarted, so we can deallocate
4694
    // the media player now. Note that userCancelledLoad will already have cleared the player
4694
    // the media player now. Note that userCancelledLoad will already have cleared the player
4695
    // if the media was not fully loaded. This handles all other cases.
4695
    // if the media was not fully loaded. This handles all other cases.
4696
    m_player.clear();
4696
    m_player = nullptr;
4697
4697
4698
    updateSleepDisabling();
4698
    updateSleepDisabling();
4699
}
4699
}
- a/Source/WebCore/html/HTMLMediaElement.h -1 / +1 lines
Lines 778-784 private: a/Source/WebCore/html/HTMLMediaElement.h_sec1
778
    MediaPlayer::VideoGravity m_videoFullscreenGravity;
778
    MediaPlayer::VideoGravity m_videoFullscreenGravity;
779
#endif
779
#endif
780
780
781
    OwnPtr<MediaPlayer> m_player;
781
    std::unique_ptr<MediaPlayer> m_player;
782
782
783
    MediaPlayer::Preload m_preload;
783
    MediaPlayer::Preload m_preload;
784
784
- a/Source/WebCore/platform/graphics/MediaPlayer.cpp -5 / +4 lines
Lines 78-84 const PlatformMedia NoPlatformMedia = { PlatformMedia::None, {0} }; a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec1
78
78
79
class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface {
79
class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface {
80
public:
80
public:
81
    NullMediaPlayerPrivate(MediaPlayer*) { }
81
    explicit NullMediaPlayerPrivate(MediaPlayer*) { }
82
82
83
    virtual void load(const String&) { }
83
    virtual void load(const String&) { }
84
#if ENABLE(MEDIA_SOURCE)
84
#if ENABLE(MEDIA_SOURCE)
Lines 144-155 public: a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec2
144
#endif
144
#endif
145
};
145
};
146
146
147
static PassOwnPtr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player) 
147
static std::unique_ptr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player)
148
{ 
148
{
149
    return adoptPtr(new NullMediaPlayerPrivate(player)); 
149
    return std::unique_ptr<NullMediaPlayerPrivate>(new NullMediaPlayerPrivate(player));
150
}
150
}
151
151
152
153
// engine support
152
// engine support
154
153
155
struct MediaPlayerFactory {
154
struct MediaPlayerFactory {
- a/Source/WebCore/platform/graphics/MediaPlayer.h -6 / +7 lines
Lines 277-287 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec1
277
class MediaPlayer {
277
class MediaPlayer {
278
    WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED;
278
    WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED;
279
public:
279
public:
280
280
    static std::unique_ptr<MediaPlayer> create(MediaPlayerClient& client)
281
    static PassOwnPtr<MediaPlayer> create(MediaPlayerClient& client)
282
    {
281
    {
283
        return adoptPtr(new MediaPlayer(client));
282
        return std::unique_ptr<MediaPlayer>(new MediaPlayer(client));
284
    }
283
    }
284
285
    virtual ~MediaPlayer();
285
    virtual ~MediaPlayer();
286
286
287
    // Media engine support.
287
    // Media engine support.
Lines 577-583 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec2
577
    String sourceApplicationIdentifier() const;
577
    String sourceApplicationIdentifier() const;
578
578
579
private:
579
private:
580
    MediaPlayer(MediaPlayerClient&);
580
    explicit MediaPlayer(MediaPlayerClient&);
581
581
    MediaPlayerFactory* nextBestMediaEngine(MediaPlayerFactory*) const;
582
    MediaPlayerFactory* nextBestMediaEngine(MediaPlayerFactory*) const;
582
    void loadWithNextMediaEngine(MediaPlayerFactory*);
583
    void loadWithNextMediaEngine(MediaPlayerFactory*);
583
    void reloadTimerFired(Timer<MediaPlayer>&);
584
    void reloadTimerFired(Timer<MediaPlayer>&);
Lines 586-592 private: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec3
586
587
587
    MediaPlayerClient& m_client;
588
    MediaPlayerClient& m_client;
588
    Timer<MediaPlayer> m_reloadTimer;
589
    Timer<MediaPlayer> m_reloadTimer;
589
    OwnPtr<MediaPlayerPrivateInterface> m_private;
590
    std::unique_ptr<MediaPlayerPrivateInterface> m_private;
590
    MediaPlayerFactory* m_currentMediaEngine;
591
    MediaPlayerFactory* m_currentMediaEngine;
591
    URL m_url;
592
    URL m_url;
592
    String m_contentMIMEType;
593
    String m_contentMIMEType;
Lines 608-614 private: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec4
608
#endif
609
#endif
609
};
610
};
610
611
611
typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*);
612
typedef std::unique_ptr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*);
612
typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types);
613
typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types);
613
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const MediaEngineSupportParameters& parameters);
614
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const MediaEngineSupportParameters& parameters);
614
typedef void (*MediaEngineGetSitesInMediaCache)(Vector<String>&);
615
typedef void (*MediaEngineGetSitesInMediaCache)(Vector<String>&);
- a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h -1 lines
Lines 31-37 a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h_sec1
31
#include "MediaPlayer.h"
31
#include "MediaPlayer.h"
32
#include "PlatformTimeRanges.h"
32
#include "PlatformTimeRanges.h"
33
#include <wtf/Forward.h>
33
#include <wtf/Forward.h>
34
#include <wtf/OwnPtr.h>
35
34
36
namespace WebCore {
35
namespace WebCore {
37
36
- a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h -2 / +1 lines
Lines 46-52 class GenericCueData; a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h_sec1
46
class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface, public AVFInbandTrackParent
46
class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface, public AVFInbandTrackParent
47
{
47
{
48
public:
48
public:
49
50
    virtual void repaint();
49
    virtual void repaint();
51
    virtual void metadataLoaded();
50
    virtual void metadataLoaded();
52
    virtual void playabilityKnown();
51
    virtual void playabilityKnown();
Lines 144-150 public: a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h_sec2
144
#endif
143
#endif
145
144
146
protected:
145
protected:
147
    MediaPlayerPrivateAVFoundation(MediaPlayer*);
146
    explicit MediaPlayerPrivateAVFoundation(MediaPlayer*);
148
    virtual ~MediaPlayerPrivateAVFoundation();
147
    virtual ~MediaPlayerPrivateAVFoundation();
149
148
150
    WeakPtr<MediaPlayerPrivateAVFoundation> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
149
    WeakPtr<MediaPlayerPrivateAVFoundation> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp -2 / +2 lines
Lines 335-343 static dispatch_queue_t globalLoaderDelegateQueue() a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec1
335
}
335
}
336
#endif
336
#endif
337
337
338
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player) 
338
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player) 
339
{ 
339
{ 
340
    return adoptPtr(new MediaPlayerPrivateAVFoundationCF(player));
340
    return std::unique_ptr<MediaPlayerPrivateAVFoundationCF>(new MediaPlayerPrivateAVFoundationCF(player));
341
}
341
}
342
342
343
void MediaPlayerPrivateAVFoundationCF::registerMediaEngine(MediaEngineRegistrar registrar)
343
void MediaPlayerPrivateAVFoundationCF::registerMediaEngine(MediaEngineRegistrar registrar)
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h -3 / +3 lines
Lines 41-46 class WebCoreAVCFResourceLoader; a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h_sec1
41
41
42
class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation {
42
class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation {
43
public:
43
public:
44
    // Engine support
45
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
44
    virtual ~MediaPlayerPrivateAVFoundationCF();
46
    virtual ~MediaPlayerPrivateAVFoundationCF();
45
47
46
    virtual void tracksChanged() override;
48
    virtual void tracksChanged() override;
Lines 58-67 public: a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h_sec2
58
    static void registerMediaEngine(MediaEngineRegistrar);
60
    static void registerMediaEngine(MediaEngineRegistrar);
59
61
60
private:
62
private:
61
    MediaPlayerPrivateAVFoundationCF(MediaPlayer*);
63
    explicit expliciMediaPlayerPrivateAVFoundationCF(MediaPlayer*);
62
64
63
    // Engine support
64
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
65
    static void getSupportedTypes(HashSet<String>& types);
65
    static void getSupportedTypes(HashSet<String>& types);
66
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
66
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
67
    static bool supportsKeySystem(const String& keySystem, const String& mimeType);
67
    static bool supportsKeySystem(const String& keySystem, const String& mimeType);
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h -2 / +2 lines
Lines 131-140 public: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h_sec1
131
    WeakPtr<MediaPlayerPrivateAVFoundationObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
131
    WeakPtr<MediaPlayerPrivateAVFoundationObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
132
132
133
private:
133
private:
134
    MediaPlayerPrivateAVFoundationObjC(MediaPlayer*);
134
    explicit MediaPlayerPrivateAVFoundationObjC(MediaPlayer*);
135
135
136
    // engine support
136
    // engine support
137
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
137
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
138
    static void getSupportedTypes(HashSet<String>& types);
138
    static void getSupportedTypes(HashSet<String>& types);
139
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
139
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
140
    static bool supportsKeySystem(const String& keySystem, const String& mimeType);
140
    static bool supportsKeySystem(const String& keySystem, const String& mimeType);
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm -2 / +2 lines
Lines 383-391 static dispatch_queue_t globalPullDelegateQueue() a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec1
383
}
383
}
384
#endif
384
#endif
385
385
386
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player)
386
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player)
387
{ 
387
{ 
388
    return adoptPtr(new MediaPlayerPrivateAVFoundationObjC(player));
388
    return std::unique_ptr<MediaPlayerPrivateAVFoundationObjC>(new MediaPlayerPrivateAVFoundationObjC(player));
389
}
389
}
390
390
391
void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistrar registrar)
391
void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistrar registrar)
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h -2 / +3 lines
Lines 50-62 class MediaSourcePrivateAVFObjC; a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h_sec1
50
50
51
class MediaPlayerPrivateMediaSourceAVFObjC : public MediaPlayerPrivateInterface {
51
class MediaPlayerPrivateMediaSourceAVFObjC : public MediaPlayerPrivateInterface {
52
public:
52
public:
53
    MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*);
54
    virtual ~MediaPlayerPrivateMediaSourceAVFObjC();
53
    virtual ~MediaPlayerPrivateMediaSourceAVFObjC();
55
54
56
    static void registerMediaEngine(MediaEngineRegistrar);
55
    static void registerMediaEngine(MediaEngineRegistrar);
57
56
58
    // MediaPlayer Factory Methods
57
    // MediaPlayer Factory Methods
59
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
58
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
60
    static bool isAvailable();
59
    static bool isAvailable();
61
    static void getSupportedTypes(HashSet<String>& types);
60
    static void getSupportedTypes(HashSet<String>& types);
62
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
61
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
Lines 93-98 public: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h_sec2
93
    WeakPtr<MediaPlayerPrivateMediaSourceAVFObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
92
    WeakPtr<MediaPlayerPrivateMediaSourceAVFObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
94
93
95
private:
94
private:
95
    explicit MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*);
96
96
    // MediaPlayerPrivateInterface
97
    // MediaPlayerPrivateInterface
97
    virtual void load(const String& url) override;
98
    virtual void load(const String& url) override;
98
    virtual void load(const String& url, MediaSourcePrivateClient*) override;
99
    virtual void load(const String& url, MediaSourcePrivateClient*) override;
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm -2 / +2 lines
Lines 206-214 void MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine(MediaEngineRegist a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm_sec1
206
        registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
206
        registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
207
}
207
}
208
208
209
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaSourceAVFObjC::create(MediaPlayer* player)
209
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaSourceAVFObjC::create(MediaPlayer* player)
210
{
210
{
211
    return adoptPtr(new MediaPlayerPrivateMediaSourceAVFObjC(player));
211
    return std::unique_ptr<MediaPlayerPrivateMediaSourceAVFObjC>(new MediaPlayerPrivateMediaSourceAVFObjC(player));
212
}
212
}
213
213
214
bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable()
214
bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable()
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp -2 / +2 lines
Lines 138-146 void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object) a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec1
138
    LOG_MEDIA_MESSAGE("Set media.role as %s at %s", role, elementName.get());
138
    LOG_MEDIA_MESSAGE("Set media.role as %s at %s", role, elementName.get());
139
}
139
}
140
140
141
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateGStreamer::create(MediaPlayer* player)
141
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateGStreamer::create(MediaPlayer* player)
142
{
142
{
143
    return adoptPtr(new MediaPlayerPrivateGStreamer(player));
143
    return std::unique_ptr<MediaPlayerPrivateGStreamer>(new MediaPlayerPrivateGStreamer(player));
144
}
144
}
145
145
146
void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar)
146
void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar)
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h -3 / +3 lines
Lines 57-63 class VideoTrackPrivateGStreamer; a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h_sec1
57
57
58
class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateGStreamerBase {
58
class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateGStreamerBase {
59
public:
59
public:
60
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
60
    ~MediaPlayerPrivateGStreamer();
61
    ~MediaPlayerPrivateGStreamer();
62
61
    static void registerMediaEngine(MediaEngineRegistrar);
63
    static void registerMediaEngine(MediaEngineRegistrar);
62
    gboolean handleMessage(GstMessage*);
64
    gboolean handleMessage(GstMessage*);
63
    void handlePluginInstallerResult(GstInstallPluginsReturn);
65
    void handlePluginInstallerResult(GstInstallPluginsReturn);
Lines 126-134 public: a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h_sec2
126
    bool changePipelineState(GstState);
128
    bool changePipelineState(GstState);
127
129
128
private:
130
private:
129
    MediaPlayerPrivateGStreamer(MediaPlayer*);
131
    explicit MediaPlayerPrivateGStreamer(MediaPlayer*);
130
131
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
132
132
133
    static void getSupportedTypes(HashSet<String>&);
133
    static void getSupportedTypes(HashSet<String>&);
134
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
134
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h -2 / +3 lines
Lines 50-55 namespace WebCore { a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h_sec1
50
    
50
    
51
class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface {
51
class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface {
52
public:
52
public:
53
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
54
53
    ~MediaPlayerPrivateQTKit();
55
    ~MediaPlayerPrivateQTKit();
54
    WEBCORE_EXPORT static void registerMediaEngine(MediaEngineRegistrar);
56
    WEBCORE_EXPORT static void registerMediaEngine(MediaEngineRegistrar);
55
57
Lines 63-72 public: a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h_sec2
63
    void layerHostChanged(PlatformLayer* rootLayer);
65
    void layerHostChanged(PlatformLayer* rootLayer);
64
66
65
private:
67
private:
66
    MediaPlayerPrivateQTKit(MediaPlayer*);
68
    explicit MediaPlayerPrivateQTKit(MediaPlayer*);
67
69
68
    // engine support
70
    // engine support
69
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
70
    static void getSupportedTypes(HashSet<String>& types);
71
    static void getSupportedTypes(HashSet<String>& types);
71
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
72
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
72
73
- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm -2 / +2 lines
Lines 166-174 using namespace WebCore; a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec1
166
166
167
namespace WebCore {
167
namespace WebCore {
168
168
169
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateQTKit::create(MediaPlayer* player)
169
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateQTKit::create(MediaPlayer* player)
170
{ 
170
{ 
171
    return adoptPtr(new MediaPlayerPrivateQTKit(player));
171
    return std::unique_ptr<MediaPlayerPrivateQTKit>(new MediaPlayerPrivateQTKit(player));
172
}
172
}
173
173
174
void MediaPlayerPrivateQTKit::registerMediaEngine(MediaEngineRegistrar registrar)
174
void MediaPlayerPrivateQTKit::registerMediaEngine(MediaEngineRegistrar registrar)
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp -2 / +2 lines
Lines 41-49 MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation(MediaPlayer a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp_sec1
41
{
41
{
42
}
42
}
43
43
44
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player)
44
std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player)
45
{
45
{
46
    return adoptPtr(new MediaPlayerPrivateMediaFoundation(player));
46
    return std::unique_ptr<MediaPlayerPrivateMediaFoundation>(new MediaPlayerPrivateMediaFoundation(player));
47
}
47
}
48
48
49
void MediaPlayerPrivateMediaFoundation::registerMediaEngine(MediaEngineRegistrar registrar)
49
void MediaPlayerPrivateMediaFoundation::registerMediaEngine(MediaEngineRegistrar registrar)
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h -3 / +2 lines
Lines 30-39 namespace WebCore { a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h_sec1
30
30
31
class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface {
31
class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface {
32
public:
32
public:
33
    MediaPlayerPrivateMediaFoundation(MediaPlayer*);
34
    static void registerMediaEngine(MediaEngineRegistrar);
33
    static void registerMediaEngine(MediaEngineRegistrar);
35
34
36
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
35
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
37
    static void getSupportedTypes(HashSet<String>& types);
36
    static void getSupportedTypes(HashSet<String>& types);
38
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
37
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
39
    static bool isAvailable();
38
    static bool isAvailable();
Lines 67-73 public: a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h_sec2
67
    virtual void paint(GraphicsContext*, const IntRect&);
66
    virtual void paint(GraphicsContext*, const IntRect&);
68
67
69
private:
68
private:
70
69
    explicit MediaPlayerPrivateMediaFoundation(MediaPlayer*);
71
    MediaPlayer* m_player;
70
    MediaPlayer* m_player;
72
71
73
};
72
};
- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp -2 / +2 lines
Lines 44-52 void MockMediaPlayerMediaSource::registerMediaEngine(MediaEngineRegistrar regist a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp_sec1
44
    registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
44
    registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
45
}
45
}
46
46
47
PassOwnPtr<MediaPlayerPrivateInterface> MockMediaPlayerMediaSource::create(MediaPlayer* player)
47
std::unique_ptr<MediaPlayerPrivateInterface> MockMediaPlayerMediaSource::create(MediaPlayer* player)
48
{
48
{
49
    return adoptPtr(new MockMediaPlayerMediaSource(player));
49
    return std::unique_ptr<MediaPlayerPrivateInterface>(new MockMediaPlayerMediaSource(player));
50
}
50
}
51
51
52
static HashSet<String> mimeTypeCache()
52
static HashSet<String> mimeTypeCache()
- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h -2 / +2 lines
Lines 40-46 class MockMediaPlayerMediaSource : public MediaPlayerPrivateInterface { a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h_sec1
40
public:
40
public:
41
    // MediaPlayer Engine Support
41
    // MediaPlayer Engine Support
42
    static void registerMediaEngine(MediaEngineRegistrar);
42
    static void registerMediaEngine(MediaEngineRegistrar);
43
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
43
    static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*);
44
    static void getSupportedTypes(HashSet<String>& types);
44
    static void getSupportedTypes(HashSet<String>& types);
45
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
45
    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&);
46
46
Lines 56-62 public: a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h_sec2
56
    void seekCompleted();
56
    void seekCompleted();
57
57
58
private:
58
private:
59
    MockMediaPlayerMediaSource(MediaPlayer*);
59
    explicit MockMediaPlayerMediaSource(MediaPlayer*);
60
60
61
    // MediaPlayerPrivate Overrides
61
    // MediaPlayerPrivate Overrides
62
    virtual void load(const String& url) override;
62
    virtual void load(const String& url) override;

Return to Bug 137765