Title: [123747] trunk/Source/WebCore
Revision
123747
Author
jer.no...@apple.com
Date
2012-07-26 08:10:00 -0700 (Thu, 26 Jul 2012)

Log Message

Add a MediaPlayer API to retrieve the description of the current media engine.
https://bugs.webkit.org/show_bug.cgi?id=92336

Reviewed by Eric Carlson.

Add a utility function which retrieves, for diagnostic purposes, a brief description
of the current media engine. Stubs have been added for each of the MediaPlayerPrivate
subclasses which return the name of the class.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::engineDescription):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::engineDescription):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::engineDescription):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(WebCore::MediaPlayerPrivate::engineDescription):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::engineDescription):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
(WebCore::MediaPlayerPrivateQTKit::engineDescription):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(WebCore::MediaPlayerPrivateQt::engineDescription):
* platform/graphics/wince/MediaPlayerPrivateWinCE.h:
(WebCore::MediaPlayerPrivate::engineDescription):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::engineDescription):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (123746 => 123747)


--- trunk/Source/WebCore/ChangeLog	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/ChangeLog	2012-07-26 15:10:00 UTC (rev 123747)
@@ -1,3 +1,34 @@
+2012-07-26  Jer Noble  <jer.no...@apple.com>
+
+        Add a MediaPlayer API to retrieve the description of the current media engine.
+        https://bugs.webkit.org/show_bug.cgi?id=92336
+
+        Reviewed by Eric Carlson.
+
+        Add a utility function which retrieves, for diagnostic purposes, a brief description
+        of the current media engine. Stubs have been added for each of the MediaPlayerPrivate
+        subclasses which return the name of the class.
+
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::engineDescription):
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/MediaPlayerPrivate.h:
+        (WebCore::MediaPlayerPrivateInterface::engineDescription):
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+        (WebCore::MediaPlayerPrivateAVFoundation::engineDescription):
+        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
+        (WebCore::MediaPlayerPrivate::engineDescription):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+        (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        (WebCore::MediaPlayerPrivateQTKit::engineDescription):
+        * platform/graphics/qt/MediaPlayerPrivateQt.h:
+        (WebCore::MediaPlayerPrivateQt::engineDescription):
+        * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
+        (WebCore::MediaPlayerPrivate::engineDescription):
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
+        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::engineDescription):
+
 2012-07-26  Pavel Feldman  <pfeld...@chromium.org>
 
         Web Inspector: Edits of styles declared after invalid selector are not applied

Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2012-07-26 15:10:00 UTC (rev 123747)
@@ -1068,6 +1068,14 @@
     return m_mediaPlayerClient->mediaPlayerUserAgent();
 }
 
+String MediaPlayer::engineDescription() const
+{
+    if (!m_private)
+        return String();
+
+    return m_private->engineDescription();
+}
+
 #if PLATFORM(WIN) && USE(AVFOUNDATION)
 GraphicsDeviceAdapter* MediaPlayer::graphicsDeviceAdapter() const
 {

Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -402,6 +402,8 @@
     String referrer() const;
     String userAgent() const;
 
+    String engineDescription() const;
+
 private:
     MediaPlayer(MediaPlayerClient*);
     void loadWithNextMediaEngine(MediaPlayerFactory*);

Modified: trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -161,6 +161,7 @@
 
     virtual void setPrivateBrowsingMode(bool) { }
 
+    virtual String engineDescription() const { return emptyString(); }
 
 #if ENABLE(WEB_AUDIO)
     virtual AudioSourceProvider* audioSourceProvider() { return 0; }

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -243,6 +243,8 @@
 
     MediaPlayer* player() { return m_player; }
 
+    virtual String engineDescription() const { return "AVFoundation"; }
+
 private:
     MediaPlayer* m_player;
 

Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -146,6 +146,8 @@
     void updateStates();
     String userAgent(const String&) const;
 
+    virtual String engineDescription() const { return "BlackBerry"; }
+
     MediaPlayer* m_webCorePlayer;
     BlackBerry::Platform::MMRPlayer* m_platformPlayer;
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -150,6 +150,8 @@
 
             void processBufferingStats(GstMessage*);
 
+            virtual String engineDescription() const { return "GStreamer"; }
+
         private:
             MediaPlayer* m_player;
             GstElement* m_playBin;

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -187,6 +187,8 @@
     
     NSMutableDictionary* commonMovieAttributes();
 
+    virtual String engineDescription() const { return "QTKit"; }
+
     MediaPlayer* m_player;
     RetainPtr<QTMovie> m_qtMovie;
     RetainPtr<QTMovieView> m_qtMovieView;

Modified: trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -131,6 +131,8 @@
 private:
     void updateStates();
 
+    virtual String engineDescription() const { return "Qt"; }
+
 private:
     MediaPlayerPrivateQt(MediaPlayer*);
 

Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -156,6 +156,8 @@
 
     virtual void setPrivateBrowsingMode(bool);
 
+    virtual String engineDescription() const { return "QuickTime"; }
+
     class MovieClient;
     friend class MovieClient;
     OwnPtr<MovieClient> m_movieClient;

Modified: trunk/Source/WebCore/platform/graphics/wince/MediaPlayerPrivateWinCE.h (123746 => 123747)


--- trunk/Source/WebCore/platform/graphics/wince/MediaPlayerPrivateWinCE.h	2012-07-26 15:08:14 UTC (rev 123746)
+++ trunk/Source/WebCore/platform/graphics/wince/MediaPlayerPrivateWinCE.h	2012-07-26 15:10:00 UTC (rev 123747)
@@ -103,6 +103,8 @@
         static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
         static bool isAvailable();
 
+        virtual String engineDescription() const { return "WinCE"; }
+
         MediaPlayer* m_player;
         float m_seekTo;
         float m_endTime;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to