Commit Graph

16 Commits

Author SHA1 Message Date
Lukas Herman
02d0cd3f44 Prioritize /dev/video0 on Linux camera 2020-11-21 12:44:42 -08:00
Lukas Herman
559c6a13a1 Update readers to be memory pool friendly 2020-10-29 00:04:12 -07:00
Lukas Herman
16bcd0b7dd Fix step wise resolutions in linux camera
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.
2020-10-26 21:26:03 -07:00
Lukas Herman
2022a4b7f7 Fix undiscovered some camera devices
/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*.
2020-10-26 20:22:40 -07:00
Lukas Herman
eb689a3c79 Remove buffer in linux camera 2020-10-15 00:12:55 -04:00
Lukas Herman
e4b1b1aaba Fix included unsupported formats 2020-10-14 12:18:17 -04:00
Lukas Herman
f7068296d3 Add V4L2_PIX_FMT_YUV420 support for Linux 2020-08-19 23:09:29 -07:00
Atsushi Watanabe
a3dae07854 driver/camera: support UYVY camera 2020-03-30 13:49:02 -04:00
Atsushi Watanabe
33b2964733 Fix data race in drivers 2020-02-19 20:21:21 -08:00
Lukas Herman
504b542376 Add DeviceType to Info and a filter function for it
* Add DeviceType to Info
* Update adapters to also register its device type
* Add FilterDeviceType
2020-02-14 12:22:03 -08:00
Lukas Herman
46c55deeb4 Change driver registration requirement to have an Info
* Move label to Info
* Replace label requirement to be an info
* Replace Label driver method to be an Info method
2020-02-14 12:22:03 -08:00
Atsushi Watanabe
993c23ee90 Use Mutex instead of WaitGroup 2020-02-13 19:35:52 -08:00
Lukas Herman
1635910909 Protect mmap allocated memory by copying it into Go heap
- Move closing synchronization to the driver level
- Create a buffer for copying the memory allocated by mmap to Go heap
2020-02-13 19:35:52 -08:00
Atsushi Watanabe
c8bba53148 Stop video track safely
- 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.
2020-02-13 19:35:52 -08:00
Atsushi Watanabe
5653cdf9e8 Implement EnumerateDevices and register all devices 2020-02-12 22:24:09 -08:00
Lukas Herman
d8eda2db81 Group Adapters by their categories
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.
2020-02-09 09:21:00 -08:00