DescriptionMac AVFoundation device monitor: clean removal of device observers
This CL fixes a crash happening when Chrome shuts down or a capture
device is removed from the system while there are observers observing
the "suspended" property of the AVCaptureDevice going out of scope --
basically leaving the observer observing a zombie.
For that, the CrAVFoundationSuspendObserver registers to observe both
"suspended" and "connected". In the case of "connected" received, it
can only mean disconnected, so both observers are removed. The |device|
pointer is passed to -addObserver:forKeyPath:options:context: as the
|context|, and is received then in the -observeValueForKeyPath:... .
CrAVFoundationSuspendObserver renamed to CrAVFoundationDeviceObserver.
BUG=288562, 348917
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255648
Patch Set 1 #
Total comments: 4
Patch Set 2 : rsesek@ comments #Messages
Total messages: 13 (0 generated)
|