Closed Bug 1300468 Opened 8 years ago Closed 8 years ago

Implement mediaDevices.ondevicechange for Windows

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: mchiang, Assigned: mchiang, NeedInfo)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

No description provided.
It seems we need to migrate to Media Foundation to support this feature.
Rank: 27
Priority: -- → P2
Assignee: nobody → mchiang
It turns out comment 1 was wrong. We don't need to migrate to Media foundation to support this api.
Comment on attachment 8797541 [details] Bug 1300468 - implement mediaDevices.ondevicechange for Windows; https://reviewboard.mozilla.org/r/83232/#review82090 r+ with nits. Note I'm not really a windows-API guy ::: media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc:51 (Diff revision 1) > +LRESULT CALLBACK WndProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) > +{ > + if (uiMsg == WM_DEVICECHANGE) > + { > + DeviceInfoDS* dsInfo = DeviceInfoDSSingleton::GetInfo(); > + if (dsInfo != NULL) { dsInfo->DeviceChange(); } no single-line if's (see below) ::: media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc:139 (Diff revision 1) > + _wndClass.lpszClassName = TEXT("DeviceInfoDS"); > + _wndClass.hInstance = _hInstance; > + > + if (RegisterClass(&_wndClass)) > + { > + _hwnd = CreateWindow(_wndClass.lpszClassName, NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, _hInstance, NULL); please wrap the line ::: media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc:150 (Diff revision 1) > RELEASE_AND_CLEAR(_dsDevEnum); > if (_CoUninitializeIsRequired) > { > CoUninitialize(); > } > + if (_hwnd != NULL) { DestroyWindow(_hwnd); } No single-line if's please. In this file, use: if (...) { ... }
Attachment #8797541 - Flags: review?(rjesup) → review+
has problems to apply: patching file dom/media/tests/mochitest/mochitest.ini Hunk #1 FAILED at 35 1 out of 1 hunks FAILED -- saving rejects to file dom/media/tests/mochitest/mochitest.ini.rej patch failed to apply abort: fix up the working directory and run hg transplant --continue
Flags: needinfo?(mchiang)
Keywords: checkin-needed
Please apply the rebased patch.
Attachment #8797541 - Attachment is obsolete: true
Flags: needinfo?(mchiang) → needinfo?(cbook)
Attachment #8798282 - Flags: review+
will do, thanks for the rebased patch!
Flags: needinfo?(cbook)
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/18722be58f18 implement mediaDevices.ondevicechange for Windows; r=jesup
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Fyi, I think this is still behind a pref? media.ondevicechange.enabled
Flags: needinfo?(eshepherd)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: