RESOLVED FIXED 65725
Soft link against AVFoundationCF and CoreMedia
https://bugs.webkit.org/show_bug.cgi?id=65725
Summary Soft link against AVFoundationCF and CoreMedia
Jeff Miller
Reported 2011-08-04 15:24:47 PDT
MediaPlayerPrivateAVFoundationCF.cpp currently pulls in AVCF using #pragma comment(lib), it should soft link to the routines it needs instead. Even though we delay load AVCF and related DLLS (see <http://trac.webkit.org/changeset/92035>), because we statically link against the libraries the DLLs are loaded at startup, which likely impacts performance. There's no need to load these until we encounter a media element and even then only if AVFoundation is enabled.
Attachments
Don't soft link to libdispatch (2.37 KB, patch)
2011-08-17 16:22 PDT, Jeff Miller
no flags
Soft link against AVFoundationCF and CoreMedia (27.77 KB, patch)
2011-08-18 15:19 PDT, Jeff Miller
eric.carlson: review+
Jeff Miller
Comment 1 2011-08-04 15:25:08 PDT
Jeff Miller
Comment 2 2011-08-05 18:12:14 PDT
Unfortunately, all of these functions are declared as __declspec(dllimport), and the existing SOFT_LINK() macro doesn't handle this. For example, if the DLL exports a function named "foo()", the name of the function implemented by SOFT_LINK() has to be called __imp__foo, but we have to use GetProcAddress("foo"). I'll have to create a new flavor of the SOFT_LINK() macro for this. I'll also need a new macro to get at global variables, e.g. __declspec(dllimport) int fooBar.
Jeff Miller
Comment 3 2011-08-17 15:16:58 PDT
I don't think soft linking to libdispatch is helpful, since the libdispatch DLL doesn't appear to be delay loaded. I verified using Process Explorer that even with AVFoundation support off, libdispatch.dll is loaded in the web process. I'm guessing that something else in AAS requires it. Updating bug title to reflect this.
Jeff Miller
Comment 4 2011-08-17 16:22:20 PDT
Created attachment 104271 [details] Don't soft link to libdispatch
Jeff Miller
Comment 5 2011-08-17 16:33:22 PDT
Don't soft link to libdispatch - r93260 <http://trac.webkit.org/changeset/93260>
Jeff Miller
Comment 6 2011-08-18 15:19:31 PDT
Created attachment 104407 [details] Soft link against AVFoundationCF and CoreMedia Soft link against AVFoundationCF and CoreMedia
WebKit Review Bot
Comment 7 2011-08-18 15:22:52 PDT
Attachment 104407 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:55: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/platform/win/SoftLinking.h:95: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jeff Miller
Comment 8 2011-08-18 15:37:08 PDT
Comment on attachment 104407 [details] Soft link against AVFoundationCF and CoreMedia View in context: https://bugs.webkit.org/attachment.cgi?id=104407&action=review >> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:55 >> +#include "AVFoundationCFSoftLinking.h" > > Alphabetical sorting problem. [build/include_order] [4] As noted in the comment above, this is intentional. >> Source/WebCore/platform/win/SoftLinking.h:95 > > Extra space before ( in function call [whitespace/parens] [4] False positive, but this is a complex macro so I'm not sure there's a way to fix this in check-webkit-style.
Jeff Miller
Comment 9 2011-08-18 15:57:09 PDT
Note You need to log in before you can comment on or make changes to this bug.