From 4807b4fcb6a736852390e21acd431fdd870ed26b Mon Sep 17 00:00:00 2001 From: Saxon Date: Wed, 24 Jul 2019 00:17:57 +0930 Subject: [PATCH] container/mts/mpegts.go: added some commenting to MediaStreams --- container/mts/mpegts.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/container/mts/mpegts.go b/container/mts/mpegts.go index f2a9ae0b..420f6842 100644 --- a/container/mts/mpegts.go +++ b/container/mts/mpegts.go @@ -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]