Closed Bug 1344909 Opened 8 years ago Closed 8 years ago

mingw build broken with VideoDecoder.cpp error: 'std::thread' has not been declared

Categories

(Core :: Audio/Video: GMP, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tor])

Attachments

(1 file)

mingw does not understand std::thread: > 0:13.12 In file included from /tmp/workspace/mingw-w64-build/mozilla-mingw/media/gmp-clearkey/0.1/Unified_cpp_gmp-clearkey_0.10.cpp:74:0: > 0:13.12 /tmp/workspace/mingw-w64-build/firefox/media/gmp-clearkey/0.1/VideoDecoder.cpp: In constructor 'VideoDecoder::VideoDecoder(cdm::Host_8*)': > 0:13.12 /tmp/workspace/mingw-w64-build/firefox/media/gmp-clearkey/0.1/VideoDecoder.cpp:40:38: error: 'std::thread' has not been declared > 0:13.12 uint32_t cores = std::max(1u, std::thread::hardware_concurrency()); In a related bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1317642) we commented out the code on MinGW because it was in Error Reporting and not strictly necessary. Here we could use something like the below, or just hardcode it. > #ifdef _WIN32 > SYSTEM_INFO sysinfo; > GetSystemInfo(&sysinfo); > return sysinfo.dwNumberOfProcessors;
Rank: 25
Priority: -- → P2
Blocks: 1349912
Assignee: nobody → tom
Attachment #8850640 - Flags: review?(cpearce)
Comment on attachment 8850640 [details] Bug 1344909 When compiled with MinGW, use only a single core in gmp-clearkey https://reviewboard.mozilla.org/r/123184/#review127122 Thanks for the patch. It's a shame mingw doesn't have std::thread yet. I'd be happy to for us to get the number of processors from a call to GetSystemInfo() as well, as it would mean mingw builds would have better parallelism for ClearKey video. There's very little ClearKey content out there through, so it's not super important.
Attachment #8850640 - Flags: review?(cpearce) → review+
(In reply to Chris Pearce (:cpearce) from comment #2) > Comment on attachment 8850640 [details] > Bug 1344909 When compiled with MinGW, use only a single core in gmp-clearkey > > https://reviewboard.mozilla.org/r/123184/#review127122 > > Thanks for the patch. It's a shame mingw doesn't have std::thread yet. I'd > be happy to for us to get the number of processors from a call to > GetSystemInfo() as well, as it would mean mingw builds would have better > parallelism for ClearKey video. There's very little ClearKey content out > there through, so it's not super important. Thanks! The plan is to add pthreads in mingw to get std::thread support at which point I'll be undoing the few patches like these we've accumulated, so the GetSystemInfo() approach isn't really worth the complexity of having that code in FF without it being exercised by our tests right now.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/142baaabe917 When compiled with MinGW, use only a single core in gmp-clearkey r=cpearce
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Guessing this is wontfix for 54 as tor builds aren't based off that version.
See Also: → 1395418
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: