mkv in progress

This commit is contained in:
deepch
2022-01-27 04:10:06 +03:00
parent e0fc50b09e
commit 13fad59f2c
9 changed files with 828 additions and 0 deletions

29
format/mkv/handler.go Normal file
View File

@@ -0,0 +1,29 @@
package mkv
import (
"io"
"github.com/deepch/vdk/av"
"github.com/deepch/vdk/av/avutil"
)
var CodecTypes = []av.CodecType{av.H264, av.AAC}
func Handler(h *avutil.RegisterHandler) {
h.Ext = ".mkv"
h.Probe = func(b []byte) bool {
return b[0] == 0x47 && b[188] == 0x47
}
h.ReaderDemuxer = func(r io.Reader) av.Demuxer {
return NewDemuxer(r)
}
h.WriterMuxer = func(w io.Writer) av.Muxer {
//return NewMuxer(w)
return nil
}
h.CodecTypes = CodecTypes
}