DescriptionAndroid: Add initialize() function to VideoCapturer interface
This CL moves some arguments, e.g. the camera thread, from the startCapture() function to a new initialize() function. These arguments are constant during the lifetime of the VideoCapturer, and are not changed for different startCapture() calls. Setting them once allows for simplifications in the code.
This CL also fixes a bug for camera2 where pendingCameraSwitchSemaphore might not be released when switchEventsHandler is null.
In camera1, the handler lock and 'cameraThreadHandler == null' check is replaced with an atomic boolean to check if the camera is stopped.
BUG=webrtc:5519
R=sakal@webrtc.org
Committed: https://crrev.com/27dcacdbc137e4b49c3e75f17b5a36cdd1ad73ba
Cr-Commit-Position: refs/heads/master@{#13404}
Patch Set 1 : . #Patch Set 2 : Check if surfaceTextureHandler is null in initialize #Patch Set 3 : Store requsted format in switchCamera(), and check thread in setCameraState #Patch Set 4 : Move init member variables to separate section #
Dependent Patchsets: Messages
Total messages: 21 (16 generated)
|