Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
c9386eb6
Commit
c9386eb6
authored
Jul 12, 2023
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error reporting in CodecPayloadType.
parent
99a73027
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
group/group.go
group/group.go
+7
-3
No files found.
group/group.go
View file @
c9386eb6
...
...
@@ -3,6 +3,7 @@ package group
import
(
"encoding/json"
"errors"
"fmt"
"io/fs"
"log"
"net/url"
...
...
@@ -203,7 +204,8 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro
case
"2"
:
return
100
,
nil
default
:
return
0
,
errors
.
New
(
"unknown VP9 profile"
)
return
0
,
fmt
.
Errorf
(
"unknown VP9 profile %v"
,
profile
)
}
case
"video/av1"
:
return
35
,
nil
...
...
@@ -218,7 +220,9 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro
case
"42e0"
:
return
108
,
nil
default
:
return
0
,
errors
.
New
(
"unknown H.264 profile"
)
return
0
,
fmt
.
Errorf
(
"unknown H.264 profile %v"
,
profile
,
)
}
case
"audio/opus"
:
return
111
,
nil
...
...
@@ -229,7 +233,7 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro
case
"audio/pcma"
:
return
8
,
nil
default
:
return
0
,
errors
.
New
(
"unknown codec"
)
return
0
,
fmt
.
Errorf
(
"unknown codec %v"
,
codec
.
MimeType
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment