pion / mediadevices

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

Add shell command media source drivers #468

Open KW-M opened 1 year ago

KW-M commented 1 year ago

Description

New drivers to allow the use of shell command output as a video or audio source (+ tests and example code).

Reference issue

Workaround for #407

codecov[bot] commented 1 year ago

Codecov Report

Base: 58.21% // Head: 54.84% // Decreases project coverage by -3.38% :warning:

Coverage data is based on head (1d228e0) compared to base (f8f8511). Patch coverage: 0.86% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #468 +/- ## ========================================== - Coverage 58.21% 54.84% -3.38% ========================================== Files 62 66 +4 Lines 3683 3913 +230 ========================================== + Hits 2144 2146 +2 - Misses 1412 1640 +228 Partials 127 127 ``` | [Impacted Files](https://codecov.io/gh/pion/mediadevices/pull/468?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | | |---|---|---| | [pkg/driver/cmdsource/audiocmd.go](https://codecov.io/gh/pion/mediadevices/pull/468?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL2RyaXZlci9jbWRzb3VyY2UvYXVkaW9jbWQuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/driver/cmdsource/videocmd.go](https://codecov.io/gh/pion/mediadevices/pull/468?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL2RyaXZlci9jbWRzb3VyY2UvdmlkZW9jbWQuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/frame/framesize.go](https://codecov.io/gh/pion/mediadevices/pull/468?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL2ZyYW1lL2ZyYW1lc2l6ZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/driver/cmdsource/cmdsource.go](https://codecov.io/gh/pion/mediadevices/pull/468?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL2RyaXZlci9jbWRzb3VyY2UvY21kc291cmNlLmdv) | `3.33% <3.33%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

KW-M commented 1 year ago

I'm not quite sure why the test cases for audiocmd.go and videocmd.go don't show up in Codecov. I'm fairly new to testing in go / testing in general, so any pointers would be much appreciated.

at-wat commented 1 year ago

I'm not quite sure why the test cases for audiocmd.go and videocmd.go don't show up in Codecov. I'm fairly new to testing in go / testing in general, so any pointers would be much appreciated.

https://github.com/pion/mediadevices/actions/runs/3964689614/jobs/6793835936#step:5:259

audiocmd_test.go:63: ffmpeg command not found in path. Skipping test. Err:  exec: "ffmpeg": executable file not found in $PATH