codec/codecutil/helpers.go: added ADPCM support to SIDToMIMEType

This commit is contained in:
Saxon 2019-09-25 21:29:19 +09:30
parent 2acc729676
commit 2d5d8f3bdd
1 changed files with 5 additions and 2 deletions

View File

@ -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")
}