joy4/format/ts/handler.go
Ingo Oppermann 01b5cd703f go fmt
2022-07-28 18:31:52 +02:00

26 lines
411 B
Go

package ts
import (
"github.com/datarhei/joy4/av"
"github.com/datarhei/joy4/av/avutil"
"io"
)
func Handler(h *avutil.RegisterHandler) {
h.Ext = ".ts"
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)
}
h.CodecTypes = CodecTypes
}