mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-26 20:41:46 +08:00
Add custom video/audio transforms
Resolves https://github.com/pion/mediadevices/issues/31
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package mediadevices
|
||||
|
||||
import (
|
||||
"github.com/pion/mediadevices/pkg/io/audio"
|
||||
"github.com/pion/mediadevices/pkg/io/video"
|
||||
"github.com/pion/mediadevices/pkg/prop"
|
||||
)
|
||||
|
||||
@@ -13,6 +15,12 @@ type MediaStreamConstraints struct {
|
||||
type MediaTrackConstraints struct {
|
||||
prop.Media
|
||||
Enabled bool
|
||||
// VideoTransform will be used to transform the video that's coming from the driver.
|
||||
// So, basically it'll look like following: driver -> VideoTransform -> codec
|
||||
VideoTransform video.TransformFunc
|
||||
// AudioTransform will be used to transform the audio that's coming from the driver.
|
||||
// So, basically it'll look like following: driver -> AudioTransform -> code
|
||||
AudioTransform audio.TransformFunc
|
||||
}
|
||||
|
||||
type MediaOption func(*MediaTrackConstraints)
|
||||
|
Reference in New Issue
Block a user