joy4: github.com/nareix/joy4/codec/h264parser Index | Files

package h264parser

import "github.com/nareix/joy4/codec/h264parser"

Index

Package Files

parser.go

Constants

const (
    NALU_SEI = 6
    NALU_PPS = 7
    NALU_SPS = 8
    NALU_AUD = 9
)
const (
    NALU_RAW = iota
    NALU_AVCC
    NALU_ANNEXB
)
const (
    SLICE_P = iota + 1
    SLICE_B
    SLICE_I
)

Variables

var AUDBytes = []byte{0, 0, 0, 1, 0x9, 0xf0, 0, 0, 0, 1} // AUD
var ErrDecconfInvalid = fmt.Errorf("h264parser: AVCDecoderConfRecord invalid")
var StartCodeBytes = []byte{0, 0, 1}

func CheckNALUsType Uses

func CheckNALUsType(b []byte) (typ int)

func IsDataNALU Uses

func IsDataNALU(b []byte) bool

func SplitNALUs Uses

func SplitNALUs(b []byte) (nalus [][]byte, typ int)

type AVCDecoderConfRecord Uses

type AVCDecoderConfRecord struct {
    AVCProfileIndication uint8
    ProfileCompatibility uint8
    AVCLevelIndication   uint8
    LengthSizeMinusOne   uint8
    SPS                  [][]byte
    PPS                  [][]byte
}

func (AVCDecoderConfRecord) Len Uses

func (self AVCDecoderConfRecord) Len() (n int)

func (AVCDecoderConfRecord) Marshal Uses

func (self AVCDecoderConfRecord) Marshal(b []byte) (n int)

func (*AVCDecoderConfRecord) Unmarshal Uses

func (self *AVCDecoderConfRecord) Unmarshal(b []byte) (n int, err error)

type CodecData Uses

type CodecData struct {
    Record     []byte
    RecordInfo AVCDecoderConfRecord
    SPSInfo    SPSInfo
}

func NewCodecDataFromAVCDecoderConfRecord Uses

func NewCodecDataFromAVCDecoderConfRecord(record []byte) (self CodecData, err error)

func NewCodecDataFromSPSAndPPS Uses

func NewCodecDataFromSPSAndPPS(sps, pps []byte) (self CodecData, err error)

func (CodecData) AVCDecoderConfRecordBytes Uses

func (self CodecData) AVCDecoderConfRecordBytes() []byte

func (CodecData) Height Uses

func (self CodecData) Height() int

func (CodecData) PPS Uses

func (self CodecData) PPS() []byte

func (CodecData) SPS Uses

func (self CodecData) SPS() []byte

func (CodecData) Type Uses

func (self CodecData) Type() av.CodecType

func (CodecData) Width Uses

func (self CodecData) Width() int

type SPSInfo Uses

type SPSInfo struct {
    ProfileIdc uint
    LevelIdc   uint

    MbWidth  uint
    MbHeight uint

    CropLeft   uint
    CropRight  uint
    CropTop    uint
    CropBottom uint

    Width  uint
    Height uint
}

func ParseSPS Uses

func ParseSPS(data []byte) (self SPSInfo, err error)

type SliceType Uses

type SliceType uint

func ParseSliceHeaderFromNALU Uses

func ParseSliceHeaderFromNALU(packet []byte) (sliceType SliceType, err error)

func (SliceType) String Uses

func (self SliceType) String() string

Package h264parser imports 5 packages (graph) and is imported by 31 packages. Updated 2017-11-06. Refresh now. Tools for package owners.