pion / mediadevices

Go implementation of the MediaDevices API.
https://pion.ly/
MIT License
528 stars 121 forks source link

Camera timeout duration as parameter #408

Closed f-fl0 closed 2 years ago

f-fl0 commented 2 years ago

Description

This PR adds a field to the Video and VideoConstraints to be able to set the timeout duration when reading frames from the video source. This field is not used in fitnessDistance and is only considered when set to a positive value. These changes should not modify the original behavior as the default value is kept to 5 seconds.

codecov[bot] commented 2 years ago

Codecov Report

Merging #408 (a8e9096) into master (e371c0d) will increase coverage by 0.08%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master     #408      +/-   ##
==========================================
+ Coverage   47.15%   47.23%   +0.08%     
==========================================
  Files          67       67              
  Lines        4390     4401      +11     
==========================================
+ Hits         2070     2079       +9     
- Misses       2195     2197       +2     
  Partials      125      125              
Impacted Files Coverage Δ
pkg/driver/camera/camera_linux.go 29.67% <75.00%> (+3.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e371c0d...a8e9096. Read the comment docs.