Bug 153134

Summary: Fix audio build with video disabled
Product: WebKit Reporter: Olivier Blin <olivier.blin>
Component: Web AudioAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, eric.carlson, jer.noble, mcatanzaro, zan
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 153135    
Attachments:
Description Flags
Patch
none
Patch none

Olivier Blin
Reported 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
Attachments
Patch (4.81 KB, patch)
2016-01-15 10:32 PST, Olivier Blin
no flags
Patch (4.75 KB, patch)
2016-01-15 14:34 PST, Olivier Blin
no flags
Olivier Blin
Comment 1 2016-01-15 10:32:26 PST
Olivier Blin
Comment 2 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.
Michael Catanzaro
Comment 3 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.
Olivier Blin
Comment 4 2016-01-15 14:34:34 PST
WebKit Commit Bot
Comment 5 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>
WebKit Commit Bot
Comment 6 2016-01-15 15:34:42 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.