Title: [195154] trunk/Source/WebCore
Revision
195154
Author
[email protected]
Date
2016-01-15 15:34:25 -0800 (Fri, 15 Jan 2016)

Log Message

Fix audio build with video disabled
https://bugs.webkit.org/show_bug.cgi?id=153134

Patch by Olivier Blin <[email protected]> on 2016-01-15
Reviewed by Michael Catanzaro.

Build fails when WebAudio is enabled but VIDEO disabled.

No new tests since this is a build fix only.

* platform/audio/PlatformMediaSession.cpp:
* platform/audio/PlatformMediaSession.h:
* platform/audio/PlatformMediaSessionManager.cpp:
* testing/Internals.cpp:
(WebCore::Internals::setAudioContextRestrictions):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (195153 => 195154)


--- trunk/Source/WebCore/ChangeLog	2016-01-15 23:22:45 UTC (rev 195153)
+++ trunk/Source/WebCore/ChangeLog	2016-01-15 23:34:25 UTC (rev 195154)
@@ -1,5 +1,22 @@
 2016-01-15  Olivier Blin  <[email protected]>
 
+        Fix audio build with video disabled
+        https://bugs.webkit.org/show_bug.cgi?id=153134
+
+        Reviewed by Michael Catanzaro.
+
+        Build fails when WebAudio is enabled but VIDEO disabled.
+
+        No new tests since this is a build fix only.
+
+        * platform/audio/PlatformMediaSession.cpp:
+        * platform/audio/PlatformMediaSession.h:
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        * testing/Internals.cpp:
+        (WebCore::Internals::setAudioContextRestrictions):
+
+2016-01-15  Olivier Blin  <[email protected]>
+
         [GTK] Fix build of RenderThemeGtk without VIDEO by including HTMLInputElement
         https://bugs.webkit.org/show_bug.cgi?id=153133
 

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp (195153 => 195154)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp	2016-01-15 23:22:45 UTC (rev 195153)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp	2016-01-15 23:34:25 UTC (rev 195154)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "PlatformMediaSession.h"
 
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) || ENABLE(WEB_AUDIO)
 #include "HTMLMediaElement.h"
 #include "Logging.h"
 #include "MediaPlayer.h"
@@ -205,6 +205,7 @@
     return m_client.presentationType();
 }
 
+#if ENABLE(VIDEO)
 String PlatformMediaSession::title() const
 {
     return m_client.mediaSessionTitle();
@@ -219,6 +220,7 @@
 {
     return m_client.mediaSessionCurrentTime();
 }
+#endif
     
 bool PlatformMediaSession::canReceiveRemoteControlCommands() const
 {
@@ -299,6 +301,7 @@
     PlatformMediaSessionManager::sharedManager().sessionCanProduceAudioChanged(*this);
 }
 
+#if ENABLE(VIDEO)
 String PlatformMediaSessionClient::mediaSessionTitle() const
 {
     return String();
@@ -313,6 +316,7 @@
 {
     return MediaPlayer::invalidTime();
 }
+#endif
 
 }
 #endif

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSession.h (195153 => 195154)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSession.h	2016-01-15 23:22:45 UTC (rev 195153)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSession.h	2016-01-15 23:34:25 UTC (rev 195154)
@@ -97,9 +97,11 @@
     
     void visibilityChanged();
 
+#if ENABLE(VIDEO)
     String title() const;
     double duration() const;
     double currentTime() const;
+#endif
 
     enum RemoteControlCommandType {
         NoCommand,
@@ -176,9 +178,11 @@
     virtual void mayResumePlayback(bool shouldResume) = 0;
     virtual void suspendPlayback() = 0;
 
+#if ENABLE(VIDEO)
     virtual String mediaSessionTitle() const;
     virtual double mediaSessionDuration() const;
     virtual double mediaSessionCurrentTime() const;
+#endif
     
     virtual bool canReceiveRemoteControlCommands() const = 0;
     virtual void didReceiveRemoteControlCommand(PlatformMediaSession::RemoteControlCommandType) = 0;

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (195153 => 195154)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2016-01-15 23:22:45 UTC (rev 195153)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2016-01-15 23:34:25 UTC (rev 195154)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "PlatformMediaSessionManager.h"
 
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) || ENABLE(WEB_AUDIO)
 
 #include "AudioSession.h"
 #include "Document.h"

Modified: trunk/Source/WebCore/testing/Internals.cpp (195153 => 195154)


--- trunk/Source/WebCore/testing/Internals.cpp	2016-01-15 23:22:45 UTC (rev 195153)
+++ trunk/Source/WebCore/testing/Internals.cpp	2016-01-15 23:34:25 UTC (rev 195154)
@@ -2949,7 +2949,7 @@
     AudioContext::BehaviorRestrictions restrictions = context->behaviorRestrictions();
     context->removeBehaviorRestriction(restrictions);
 
-    restrictions = MediaElementSession::NoRestrictions;
+    restrictions = AudioContext::NoRestrictions;
 
     Vector<String> restrictionsArray;
     restrictionsString.split(',', false, restrictionsArray);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to