Skip to content

Commit

Permalink
ADTS and H265 stream types added; more specific H264 name (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Ilya Barbashov <[email protected]>
  • Loading branch information
barbashov and Ilya Barbashov authored Sep 26, 2020
1 parent e6d0f0d commit 1ac7a60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 6 additions & 2 deletions astits/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,18 @@ func (s Stream) String() (o string) {
// Get type
var t = fmt.Sprintf("unlisted stream type %d", s.Type)
switch s.Type {
case astits.StreamTypeLowerBitrateVideo:
t = "Lower bitrate video"
case astits.StreamTypeMPEG1Audio:
t = "MPEG-1 audio"
case astits.StreamTypeMPEG2HalvedSampleRateAudio:
t = "MPEG-2 halved sample rate audio"
case astits.StreamTypeMPEG2PacketizedData:
t = "DVB subtitles/VBI or AC-3"
case astits.StreamTypeADTS:
t = "ADTS"
case astits.StreamTypeH264Video:
t = "H264 video"
case astits.StreamTypeH265Video:
t = "H265 video"
}

// Output
Expand Down
10 changes: 6 additions & 4 deletions data_pmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import (

// Stream types
const (
StreamTypeLowerBitrateVideo = 27 // ITU-T Rec. H.264 and ISO/IEC 14496-10
StreamTypeMPEG1Audio = 3 // ISO/IEC 11172-3
StreamTypeMPEG2HalvedSampleRateAudio = 4 // ISO/IEC 13818-3
StreamTypeMPEG2PacketizedData = 6 // ITU-T Rec. H.222 and ISO/IEC 13818-1 i.e., DVB subtitles/VBI and AC-3
StreamTypeMPEG1Audio = 0x03 // ISO/IEC 11172-3
StreamTypeMPEG2HalvedSampleRateAudio = 0x04 // ISO/IEC 13818-3
StreamTypeMPEG2PacketizedData = 0x06 // Rec. ITU-T H.222 | ISO/IEC 13818-1 i.e., DVB subtitles/VBI and AC-3
StreamTypeADTS = 0x0F // ISO/IEC 13818-7 Audio with ADTS transport syntax
StreamTypeH264Video = 0x1B // Rec. ITU-T H.264 | ISO/IEC 14496-10
StreamTypeH265Video = 0x24 // Rec. ITU-T H.265 | ISO/IEC 23008-2
)

// PMTData represents a PMT data
Expand Down

0 comments on commit 1ac7a60

Please sign in to comment.