Bug 153134 - Fix audio build with video disabled
Summary: Fix audio build with video disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 153135
  Show dependency treegraph
 
Reported: 2016-01-15 10:27 PST by Olivier Blin
Modified: 2016-01-15 15:34 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.81 KB, patch)
2016-01-15 10:32 PST, Olivier Blin
no flags Details | Formatted Diff | Diff
Patch (4.75 KB, patch)
2016-01-15 14:34 PST, Olivier Blin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Blin 2016-01-15 10:27:41 PST
Build and link fails when WebAudio is enabled but VIDEO disabled.

WebKit/Source/WebCore/testing/Internals.cpp: In member function ‘void WebCore::Internals::setAudioContextRestrictions(WebCore::AudioContext*, const WTF::String&, WebCore::ExceptionCode&)’:
WebKit/Source/WebCore/testing/Internals.cpp:2952:20: error: ‘MediaElementSession’ has not been declared
     restrictions = MediaElementSession::NoRestrictions;

Linking CXX shared library ../../lib/libwebkit2gtk-4.0.so
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:function WebCore::AudioContext::AudioContext(WebCore::Document&): error: undefined reference to 'WebCore::PlatformMediaSession::create(WebCore::PlatformMediaSessionClient&)'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:function WebCore::AudioContext::AudioContext(WebCore::Document&, unsigned int, unsigned long, float): error: undefined reference to 'WebCore::PlatformMediaSession::create(WebCore::PlatformMediaSessionClient&)'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:function WebCore::AudioContext::constructCommon(): error: undefined reference to 'WebCore::PlatformMediaSession::setCanProduceAudio(bool)'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:function WebCore::AudioContext::willBeginPlayback(): error: undefined reference to 'WebCore::PlatformMediaSession::clientWillBeginPlayback()'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:function WebCore::AudioContext::willPausePlayback(): error: undefined reference to 'WebCore::PlatformMediaSession::clientWillPausePlayback()'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:vtable for WebCore::AudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionTitle() const'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:vtable for WebCore::AudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionDuration() const'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/AudioContext.cpp.o):AudioContext.cpp:vtable for WebCore::AudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime() const'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/OfflineAudioContext.cpp.o):OfflineAudioContext.cpp:vtable for WebCore::OfflineAudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionTitle() const'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/OfflineAudioContext.cpp.o):OfflineAudioContext.cpp:vtable for WebCore::OfflineAudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionDuration() const'
../../lib/libWebCoreGTK.a(../../lib/../Source/WebCore/CMakeFiles/WebCore.dir/Modules/webaudio/OfflineAudioContext.cpp.o):OfflineAudioContext.cpp:vtable for WebCore::OfflineAudioContext: error: undefined reference to 'WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime() const'
collect2: error: ld returned 1 exit status
Comment 1 Olivier Blin 2016-01-15 10:32:26 PST
Created attachment 269065 [details]
Patch
Comment 2 Olivier Blin 2016-01-15 10:33:30 PST
You may prefer guarding the method implementation instead of their whole declaration.

Though, MediaPlayer::invalidTime() would not be available when video is disabled.
Comment 3 Michael Catanzaro 2016-01-15 11:47:02 PST
Comment on attachment 269065 [details]
Patch

Thanks for your patch. If you don't have commit access, please set the cq? flag to request commit-queue.
Comment 4 Olivier Blin 2016-01-15 14:34:34 PST
Created attachment 269101 [details]
Patch
Comment 5 WebKit Commit Bot 2016-01-15 15:34:38 PST
Comment on attachment 269101 [details]
Patch

Clearing flags on attachment: 269101

Committed r195154: <http://trac.webkit.org/changeset/195154>
Comment 6 WebKit Commit Bot 2016-01-15 15:34:42 PST
All reviewed patches have been landed.  Closing bug.