Skip to content

Commit

Permalink
Remove PCMU for two way for DVRIP source #1111
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed May 18, 2024
1 parent 2b3e6a2 commit 686fb37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/dvrip/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (c *Client) Play() error {
}

func (c *Client) Talk() error {
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s","AudioFormat":{"EncodeType":"G711_ALAW"}}}` + "\x0A\x00"
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s","AudioFormat":{"EncodeType":"G711_ALAW"}}}` + "\x0A\x00"

data := fmt.Sprintf(format, c.session, "Claim")
if _, err := c.WriteCmd(OPTalkClaim, []byte(data)); err != nil {
Expand Down
3 changes: 2 additions & 1 deletion pkg/dvrip/dvrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ func Dial(url string) (core.Producer, error) {
Kind: core.KindAudio,
Direction: core.DirectionSendonly,
Codecs: []*core.Codec{
// leave only one codec here for better compatibility with cameras
// https://github.com/AlexxIT/go2rtc/issues/1111
{Name: core.CodecPCMA, ClockRate: 8000, PayloadType: 8},
{Name: core.CodecPCMU, ClockRate: 8000, PayloadType: 0},
},
},
}
Expand Down

0 comments on commit 686fb37

Please sign in to comment.