Change compilation of cubeb to make it MinGW+webrtc friendly
Categories
(Core :: Audio/Video: cubeb, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fixed by bug 1744973])
Attachments
(1 obsolete file)
I'm working on compiling webrtc under MinGW.
libwebrtc uses KSCATEGORY_VIDEO_CAMERA, which MinGW didn't have, but they added it to ksuser.c which gets compiled into ksuser.lib
However - we fail xul linking because ksuser.lib isn't linked and KSCATEGORY_VIDEO_CAMERA is not defined.
I don't know why this doesn't fail our normal windows builds; I suspect it's because ksuser gets implicitly linked somewhere. Or ksuser.c gets compiled into another dll we do link for Windows - but a grep of the Windows SDK only found it in ksuser.lib
Anyway, if I link ksuser into xul, I get duplicate symbol errors for KSDATAFORMAT_SUBTYPE_IEEE_FLOAT and KSDATAFORMAT_SUBTYPE_PCM.
These are defined in cubeb: https://searchfox.org/mozilla-central/rev/25997ce8267ec9e3ea4b727e0973bd9ef02bba79/media/libcubeb/src/cubeb_winmm.c#76-85
If I undefine them in cubeb then I get undefined symbol KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, KSDATAFORMAT_SUBTYPE_PCM, and KSCATEGORY_VIDEO_CAMERA when linking xul. But then if I link ksuser into xul again, then everything works. So here's a patch that does that...
Assignee | ||
Comment 1•3 years ago
|
||
This fixes the MinGW compilation
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•