mirror of https://bitbucket.org/ausocean/av.git
codec/codecutil/helpers.go: added ADPCM support to SIDToMIMEType
This commit is contained in:
parent
2acc729676
commit
2d5d8f3bdd
|
@ -31,17 +31,20 @@ const (
|
|||
H264SID = 27
|
||||
H265SID = 36
|
||||
MJPEGSID = 28
|
||||
ADPCMSID = 192
|
||||
)
|
||||
|
||||
// SIDToMIMEType will return the corresponding MIME type for passed stream ID.
|
||||
func SIDToMIMEType(id int) (string, error) {
|
||||
switch id {
|
||||
case H264SID:
|
||||
return "video/H264", nil
|
||||
return "video/h264", nil
|
||||
case H265SID:
|
||||
return "video/H265", nil
|
||||
return "video/h265", nil
|
||||
case MJPEGSID:
|
||||
return "video/x-motion-jpeg", nil
|
||||
case ADPCMSID:
|
||||
return "audio/adpcm", nil
|
||||
default:
|
||||
return "", errors.New("unkown stream ID")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue