Closed
Bug 823921
Opened 12 years ago
Closed 12 years ago
Fix WMF backend compilation on mingw
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: jacek, Assigned: jacek)
Details
Attachments
(3 files)
2.40 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
16.59 KB,
patch
|
padenot
:
review+
jacek
:
checkin+
|
Details | Diff | Splinter Review |
6.98 KB,
patch
|
padenot
:
review+
gkw
:
checkin+
|
Details | Diff | Splinter Review |
The attached patch uses linker options for specifying linked libraries. It also undefined GetCurrentTime in MediaDecoder.h. That part is not really mingw-dependent. It's a problem with a macro in windows headers and it's an accident that mingw trigers it. MSVC could just as well, depending on headers include orider. We already do this in a few places across the tree.
Attachment #694833 -
Flags: review?(khuey)
Assignee | ||
Comment 1•12 years ago
|
||
mingw has limited support for _com_ptr_t (aka. _COM_SMARTPTR_TYPEDEF). I started looking at fixing it there, but realized that it would be better (also for Mozilla) to fix it here. _com_ptr_t handles errors using exceptions, which are not used in Mozilla code. The attached patch replaces usage of _com_ptr_t by RefPtr, like most other code that deals with MS COM.
Attachment #694835 -
Flags: review?(cpearce)
Assignee | ||
Comment 2•12 years ago
|
||
Warning fixes. As separate patch for easier review and separation of less important part.
Assignee: nobody → jacek
Attachment #694836 -
Flags: review?(paul)
Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 694835 [details] [diff] [review] Use RefPtr instead of _com_ptr_t I forgot to mention, this is green on try: https://tbpl.mozilla.org/?tree=Try&rev=b53b4aa772a5
Attachment #694835 -
Flags: review?(cpearce) → review?(paul)
Comment 4•12 years ago
|
||
Comment on attachment 694836 [details] [diff] [review] warning fixes Review of attachment 694836 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #694836 -
Flags: review?(paul) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9059edd199b2
Whiteboard: [leave open]
Comment 6•12 years ago
|
||
Comment on attachment 694835 [details] [diff] [review] Use RefPtr instead of _com_ptr_t Review of attachment 694835 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, this aligns better with other Windows specific code we have in the tree (mainly D2D draw target, from what I read). Thanks. ::: content/media/wmf/WMFByteStream.cpp @@ +180,2 @@ > NS_ENSURE_TRUE(SUCCEEDED(hr), hr); > + hr = unknown->QueryInterface((IMFAsyncResult**)byRef(callerResult)); Can you |static_cast<IMFAsyncResult**>(byRef(callerResult))| here instead? ::: content/media/wmf/WMFReader.cpp @@ +512,5 @@ > // but only some systems (Windows 8?) support it. > BYTE* data = nullptr; > LONG stride = 0; > + RefPtr<IMF2DBuffer> twoDBuffer; > + hr = buffer->QueryInterface((IMF2DBuffer**)byRef(twoDBuffer)); Same thing, prefer C++ style casts. static_cast<> also works in this case.
Attachment #694835 -
Flags: review?(paul) → review+
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9059edd199b2
Updated•12 years ago
|
Attachment #694836 -
Flags: checkin+
Assignee | ||
Comment 8•12 years ago
|
||
Thanks for the review, pushed a version with static_casts: https://hg.mozilla.org/integration/mozilla-inbound/rev/158a9c8668bb
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/158a9c8668bb
Assignee | ||
Updated•12 years ago
|
Attachment #694835 -
Flags: checkin+
Assignee | ||
Updated•12 years ago
|
Whiteboard: [leave open]
Attachment #694833 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/21d5fbda37b8
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/21d5fbda37b8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 12•11 years ago
|
||
(In reply to Jacek Caban from comment #3) > Comment on attachment 694835 [details] [diff] [review] > Use RefPtr instead of _com_ptr_t > > I forgot to mention, this is green on try: > https://tbpl.mozilla.org/?tree=Try&rev=b53b4aa772a5 Note that the WMF backend is currently disabled on m-c by default, so unless you toggle the pref in modules/libpref/src/init/all.js, WMF won't actually be tested... And currently the tests still randomly fail for WMF anyway... BTW, we're still using _com_ptr_t in webrtc: http://mxr.mozilla.org/mozilla-central/search?string=_COM_SMARTPTR_TYPEDEF (I wrote at least some of that code too, sorry!)
You need to log in
before you can comment on or make changes to this bug.
Description
•