Skip to content

Commit

Permalink
doc: Add func comments for HEVC
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Jan 19, 2021
1 parent e2995b5 commit 9ad9b4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hevc/hevcdecoderconfigurationrecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ type HEVCDecConfRec struct {
NaluArrays []NaluArray
}

// NaluArray - HEVC NALU array including complete bit and type
type NaluArray struct {
completeAndType byte
Nalus [][]byte
}

// NewNaluArray - create an HEVC NaluArray
func NewNaluArray(complete bool, naluType NaluType, nalus [][]byte) *NaluArray {
var completeBit byte
if complete {
Expand All @@ -50,10 +52,12 @@ func NewNaluArray(complete bool, naluType NaluType, nalus [][]byte) *NaluArray {
}
}

// NaluType - return NaluType for NaluArray
func (n *NaluArray) NaluType() NaluType {
return NaluType(n.completeAndType & 0x3f)
}

// Complete - return 0x1 if complete
func (n *NaluArray) Complete() byte {
return n.completeAndType >> 7
}
Expand Down
1 change: 1 addition & 0 deletions mp4/hvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func (b *HvcCBox) Encode(w io.Writer) error {
return b.HEVCDecConfRec.Encode(w)
}

// Info - box-specific Info
func (b *HvcCBox) Info(w io.Writer, specificBoxLevels, indent, indentStep string) error {
bd := newInfoDumper(w, indent, b, -1)
hdcr := b.HEVCDecConfRec
Expand Down

0 comments on commit 9ad9b4f

Please sign in to comment.