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 }
/** * 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 }