Closed Bug 1740606 Opened 3 years ago Closed 3 years ago

Change compilation of cubeb to make it MinGW+webrtc friendly

Categories

(Core :: Audio/Video: cubeb, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
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...

This fixes the MinGW compilation

Attachment #9250311 - Attachment is obsolete: true
Depends on: 1744973
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1744973]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: