示例#1
0
文件: TEncNAL.go 项目: hanjinze/GoHM
func NewNALUnitEBSP(nalu *OutputNALUnit) *NALUnitEBSP {
	naluEbsp := &NALUnitEBSP{}
	naluEbsp.NALUnit.SetNalUnitType(nalu.GetNalUnitType())
	naluEbsp.NALUnit.SetTemporalId(nalu.GetTemporalId())
	naluEbsp.NALUnit.SetReservedZero6Bits(nalu.GetReservedZero6Bits())
	naluEbsp.m_Bitstream = TLibCommon.NewTComOutputBitstream()
	naluEbsp.Write(nalu)

	return naluEbsp
}
示例#2
0
文件: TEncNAL.go 项目: hanjinze/GoHM
/**
 * construct an OutputNALunit structure with given header values and
 * storage for a bitstream.  Upon construction the NALunit header is
 * written to the bitstream.
 */
func NewOutputNALUnit(nalUnitType TLibCommon.NalUnitType, temporalID, reserved_zero_6bits uint) *OutputNALUnit {
	out := &OutputNALUnit{}

	out.NALUnit.SetNalUnitType(nalUnitType)
	out.NALUnit.SetTemporalId(temporalID)
	out.NALUnit.SetReservedZero6Bits(reserved_zero_6bits)
	out.m_Bitstream = TLibCommon.NewTComOutputBitstream() //nil

	return out
}