container/mts/mpegts.go: added some commenting to MediaStreams

This commit is contained in:
Saxon 2019-07-24 00:17:57 +09:30
parent bdc3b4cfc5
commit 4807b4fcb6
1 changed files with 14 additions and 0 deletions

View File

@ -636,6 +636,20 @@ func Streams(p []byte) ([]gotspsi.PmtElementaryStream, error) {
// after. We also assume that this MPEG-TS stream contains just one program,
// but this program may contain different streams, i.e. a video stream + audio
// stream.
//
// A gotspsi.PmtElementaryStream will give stream type from
// gotspsi.PmtElementaryStream.StreamType() and PID from
// gotspsi.PmtElementaryStream.ElementaryPid().
//
// PmtStreamTypes from gots/psi are defined as follows:
// PmtStreamTypeMpeg2VideoH262 uint8 = 2 // H262
// PmtStreamTypeMpeg4Video uint8 = 27 // H264
// PmtStreamTypeMpeg4VideoH264 uint8 = 27 // H264
// PmtStreamTypeMpeg4VideoH265 uint8 = 36 // H265
// PmtStreamTypeAac uint8 = 15 // AAC
// PmtStreamTypeAc3 uint8 = 129 // DD
// PmtStreamTypeEc3 uint8 = 135 // DD+
// PmtStreamTypeScte35 uint8 = 134 // SCTE-35
func MediaStreams(p []byte) ([]gotspsi.PmtElementaryStream, error) {
pat := p[:PacketSize]
pmt := p[PacketSize : 2*PacketSize]