* wip
* wip
* Organize
* Remove unnecessary change in camera_darwin.go filtering
* wip
* Make observer stop safe during startup
* wip IsAvailable impl
* Fix non-darwin builds
* Lock bg loop to main thread and add comment
* Remove fmt prints
* Simplify isAvailable; Add timeout for Read darwin
* Match comment with code
* Change to singleton pattern; Add clearer safer state machine states; Change language from Stop to Destroy; Add new error for when observer is unavailable;
* Add stubs for linux
* Move cancel() up so its not dead code sometimes
* Add stubs for Windows too
* Remove StopObserver usage
* Add camera tests
* Add device observer tests
* Fix multiple destroy calls bug; Call setup in start
* Improve isAvailable
* Improve string handling in device observer c
* Add error handling in example
* Add comment about setup vs start
* Rename and organize device observer darwin
* Explicitly case initial state for setup
* Fix potential destroy goroutine leak; Use only modern build tag; Return err not nil for stubs; Improve comments
* Close startDone channel on device observer stop not wait
* Update webcam module to set the camera framerate
* Add framerate to property fitness function
* Set framerate to dummy VideoRecord
* Add tests about video constraints
* Set framerate only when a positive value is specified
Some cameras support a range of resolutions with step wise. The fix is
to not only capture the highest resolutions but uses the step wise to
determine if we can support the hardcoded standard resolutions,
https://commons.wikimedia.org/wiki/File:Vector_Video_Standards2.svg.
In the future, we should use a custom data structure to capture more
resolutions that are outside of the listed standard resolutions.
/dev/v4l/by-path doesn't return all available devices. So, to make sure
that we include all available devices, the list of devices will also
complement with /dev/video*.
- Treat camera read timeout as error and return detailed errors.
- Return io.EOF on Read after Close.
- Wait finishing video read loop to avoid memory violation
as the video frames might be alloced by C or on shared memory.
Resolves https://github.com/pion/mediadevices/issues/22
Created 2 new directories under driver, camera and microphone. Moved
camera_linux.go and microphone_linux.go appropriately. Imported
driver/camera and driver/microphone by default.