Lukas Herman
ee6cf08c44
Use miniaudio in favor of implementing ourselves
...
miniaudio supports various backends. This will help reducing code
surface
2020-11-01 00:48:54 -07:00
Lukas Herman
1720eee38c
Fix unpropagated audio sampling rate from microphones
2020-10-29 22:41:10 -07: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
e87f899777
driver/microphone: use int16 format
2020-06-08 20:43:12 -04:00
Lukas Herman
fad6c3ec4b
Add darwin camera support
...
* Add avfoundation Go and C bindings
* Add darwin camera adapter
* Add darwin camera support to README
2020-06-03 10:18:06 -04:00
Atsushi Watanabe
00eca231a7
Select by DeviceID using StringConstraint
2020-05-24 11:15:29 -04:00
Atsushi Watanabe
e940ad6017
Migrate to new API of jfreymuth/pulse
2020-04-30 10:40:35 +09:00
Atsushi Watanabe
a7c3d403ba
Use wave.Audio in driver/microphone
2020-04-26 10:10:15 -07:00
Atsushi Watanabe
510deed2e3
Use wave.Audio in driver/audiotest
2020-04-26 10:10:15 -07:00
Atsushi Watanabe
a97be1b1c6
driver/screen: support X11 16 bit color frame buffer
2020-03-30 19:15:59 -04:00
Atsushi Watanabe
a3dae07854
driver/camera: support UYVY camera
2020-03-30 13:49:02 -04:00
Atsushi Watanabe
5617f478af
Get Windows camera props
...
Enumerate frame formats and use YUY2 format.
2020-02-25 18:43:14 -08:00
Atsushi Watanabe
e1ac08d484
Add initial version of windows camera driver
...
Image size is fixed to 640x480.
Pixel format is fixed to RGB.
2020-02-25 18:43:14 -08:00
Atsushi Watanabe
c6788d8f44
Add comments about buffering on Windows audio recording
2020-02-23 23:45:20 -08:00
Atsushi Watanabe
443a439915
Add microphone driver for Windows
...
Using classic waveInOpen API.
2020-02-23 23:45:20 -08:00
Shinichi Ishimura
5b5d0152bd
Add default package file for drivers
2020-02-21 15:48:10 +09:00
Lukas Herman
cef156ed79
Add unit tests for automatic close for VideoRecord and AudioRecord
2020-02-19 21:01:33 -08:00
Lukas Herman
24773e968b
Add automatic close for AudioRecord when failed
2020-02-19 21:01:33 -08:00
Atsushi Watanabe
33b2964733
Fix data race in drivers
2020-02-19 20:21:21 -08:00
Atsushi Watanabe
2bac44aa8a
Close drivers on stream initialization failure
...
In GetUserMedia and GetDisplayMedia, driver was left opened if
initialization failure. Since Trackers are not returned on error,
there was no way to close them.
This commit closes Trackers on GetUserMedia/GetDisplayMedia failure.
2020-02-19 20:21:21 -08:00
Atsushi Watanabe
0c6c27186c
Refactor videotest driver
...
Cache fixed region to reduce CPU usage.
2020-02-17 22:42:23 -08:00
Atsushi Watanabe
a2d6c6bb58
Optimize x11 screen capture buffer handling
2020-02-17 14:55:49 +09:00
Lukas Herman
b0f0673c13
Update x11 to keep RGBA format
2020-02-16 17:12:37 -08:00
Lukas Herman
22c76a2ad1
Add Video/Audio adapter wrapper state tests
2020-02-15 17:34:27 -08:00
Lukas Herman
75756d3cf7
Properties returns nil when driver is closed
2020-02-15 17:34:27 -08:00
Lukas Herman
b13841688f
Fix unguarded VideoRecord and AudioRecord
2020-02-15 17:34:27 -08:00
Atsushi Watanabe
bc3882644e
Fix color conversions
...
- Fix R-B byte order in screen capture
- Set image metadata everytime in screen capture
- Fix pixel format conversion from I444
- Fix ToI420 output slice length
2020-02-15 09:52:25 -08:00
Atsushi Watanabe
e3dbac1458
Add audiotest and videotest driver
...
They work similar to GStreamer audiotestsrc and videotestsrc.
2020-02-15 15:52:10 +09:00
Atsushi Watanabe
53d55a30e5
Add driver priority information
...
Make system default device selected by default.
2020-02-14 21:08:47 -08:00
Atsushi Watanabe
c501f06326
Add driver.FilterAnd/Not
...
Simplify the logical operations in driver selection.
2020-02-14 12:22:03 -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
9d598e21cb
Add screen capture device for Linux
2020-02-14 12:22:03 -08:00
Atsushi Watanabe
993c23ee90
Use Mutex instead of WaitGroup
2020-02-13 19:35:52 -08:00
Atsushi Watanabe
29d0299c5c
Add CPU usage bench
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
99af57a42a
Select media with DeviceID property
2020-02-12 22:24:09 -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
Atsushi Watanabe
57ae1b91a7
Fix camera close
...
Stop stream only if started and close webcam.Webcam.
2020-02-08 22:03:21 -08:00
Lukas Herman
aece2b94c6
Refractor, unify some APIs to be more DRY
2020-02-06 22:44:29 -08:00
Lukas Herman
2640f6c1f4
Move all settings to video/audio under io
2020-02-06 22:44:29 -08:00
Lukas Herman
2d9bfcda4d
Remove Kind in favor of type assertion
2020-02-06 22:44:29 -08:00
Lukas Herman
51efa0fe2d
Simplify driver's state management
2020-02-06 22:44:29 -08:00