mirror of
https://github.com/pion/mediadevices.git
synced 2026-04-23 00:07:29 +08:00
Replace Name with RTPCodec in codec builder
Allowing users to implement RTPCodec will give users freedom to have a custom encoder with custom RTP payload.
This commit is contained in:
@@ -19,9 +19,9 @@ func NewParams() (Params, error) {
|
||||
return Params{}, nil
|
||||
}
|
||||
|
||||
// Name represents the codec name
|
||||
func (p *Params) Name() codec.Name {
|
||||
return codec.NameOpus
|
||||
// RTPCodec represents the codec metadata
|
||||
func (p *Params) RTPCodec() *codec.RTPCodec {
|
||||
return codec.NewRTPOpusCodec(48000)
|
||||
}
|
||||
|
||||
// BuildAudioEncoder builds opus encoder with given params
|
||||
|
||||
Reference in New Issue
Block a user