Expose MediaStream methods to be used in the MediaStream Engine
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 22:11:53 +0000 (22:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 22:11:53 +0000 (22:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146791
<rdar://problem/21747589>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-09
Reviewed by Brent Fulgham.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::getAudioTracks): Removed const
(WebCore::MediaStream::getVideoTracks): Ditto
* Modules/mediastream/MediaStream.h: Needed to change functions to
override
* platform/mediastream/MediaStreamPrivate.h: Added certain calls to
PrivateClient that exposes methods to be used in the engine

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStream.cpp
Source/WebCore/Modules/mediastream/MediaStream.h
Source/WebCore/platform/mediastream/MediaStreamPrivate.h

index 1504997..07aaa88 100644 (file)
@@ -1,3 +1,19 @@
+2015-07-09  Matthew Daiter  <mdaiter@apple.com>
+
+        Expose MediaStream methods to be used in the MediaStream Engine
+        https://bugs.webkit.org/show_bug.cgi?id=146791
+        <rdar://problem/21747589>
+
+        Reviewed by Brent Fulgham.
+
+        * Modules/mediastream/MediaStream.cpp: 
+        (WebCore::MediaStream::getAudioTracks): Removed const
+        (WebCore::MediaStream::getVideoTracks): Ditto
+        * Modules/mediastream/MediaStream.h: Needed to change functions to
+        override
+        * platform/mediastream/MediaStreamPrivate.h: Added certain calls to
+        PrivateClient that exposes methods to be used in the engine
+
 2015-07-09  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Fix shape-highlight layout tests
index 7aac5c0..9af9775 100644 (file)
@@ -140,12 +140,12 @@ MediaStreamTrack* MediaStream::getTrackById(String id)
     return nullptr;
 }
 
-Vector<RefPtr<MediaStreamTrack>> MediaStream::getAudioTracks() const
+Vector<RefPtr<MediaStreamTrack>> MediaStream::getAudioTracks()
 {
     return trackVectorForType(RealtimeMediaSource::Audio);
 }
 
-Vector<RefPtr<MediaStreamTrack>> MediaStream::getVideoTracks() const
+Vector<RefPtr<MediaStreamTrack>> MediaStream::getVideoTracks()
 {
     return trackVectorForType(RealtimeMediaSource::Video);
 }
index 0eed42b..0638c9d 100644 (file)
@@ -64,8 +64,8 @@ public:
     void removeTrack(MediaStreamTrack*);
     MediaStreamTrack* getTrackById(String);
 
-    Vector<RefPtr<MediaStreamTrack>> getAudioTracks() const;
-    Vector<RefPtr<MediaStreamTrack>> getVideoTracks() const;
+    Vector<RefPtr<MediaStreamTrack>> getAudioTracks() override final;
+    Vector<RefPtr<MediaStreamTrack>> getVideoTracks() override final;
     Vector<RefPtr<MediaStreamTrack>> getTracks() const;
 
     RefPtr<MediaStream> clone();
index 3e63f4c..f1e58b4 100644 (file)
@@ -39,6 +39,7 @@
 #include "MediaStreamTrackPrivate.h"
 #include <wtf/HashMap.h>
 #include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
@@ -52,6 +53,8 @@ public:
     virtual void activeStatusChanged() = 0;
     virtual void didAddTrackToPrivate(MediaStreamTrackPrivate&) = 0;
     virtual void didRemoveTrackFromPrivate(MediaStreamTrackPrivate&) = 0;
+    virtual Vector<RefPtr<MediaStreamTrack>> getVideoTracks() = 0;
+    virtual Vector<RefPtr<MediaStreamTrack>> getAudioTracks() = 0;
 };
 
 class MediaStreamPrivate : public RefCounted<MediaStreamPrivate> {