pion / mediadevices

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

Allow to enable frame copy on a video track #405

Closed EmrysMyrddin closed 2 years ago

EmrysMyrddin commented 2 years ago

Description

This PR aims to give access to copy frame feature of Broadcaster in high level functions such as track.NewEncodedReader().

Today, track.New*Reader() functions forces to disable frames copy from Broadcaster. This is not convenient when you want to use high level API with multiple readers, leading to video artefacts on some codec/frame format combination.

This API is not very elegant but doesn't introduce any complex or breaking changes.

codecov[bot] commented 2 years ago

Codecov Report

Merging #405 (8887934) into master (82cc323) will decrease coverage by 0.21%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
- Coverage   47.45%   47.23%   -0.22%     
==========================================
  Files          67       67              
  Lines        4419     4452      +33     
==========================================
+ Hits         2097     2103       +6     
- Misses       2197     2224      +27     
  Partials      125      125              
Impacted Files Coverage Δ
track.go 20.06% <0.00%> (-2.24%) :arrow_down:
ioreader.go 0.00% <0.00%> (ø)
rtpreader.go 0.00% <0.00%> (ø)
pkg/codec/vaapi/vp8.go 0.00% <0.00%> (ø)
pkg/codec/vaapi/vp9.go 0.00% <0.00%> (ø)
pkg/codec/x264/x264.go 63.95% <0.00%> (ø)
pkg/codec/vpx/vpx.go 82.97% <0.00%> (+1.06%) :arrow_up:
pkg/codec/opus/opus.go 65.11% <0.00%> (+2.32%) :arrow_up:
pkg/codec/openh264/openh264.go 79.71% <0.00%> (+2.89%) :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 82cc323...8887934. Read the comment docs.

maeln commented 2 years ago

Will this PR be merged ? If not what is holding it from being merged ?