mirror of https://bitbucket.org/ausocean/av.git
Just updating remote
This commit is contained in:
parent
42b53917b9
commit
bfd0313776
|
@ -70,12 +70,14 @@ type MpegTsPacket struct {
|
||||||
Payload []byte
|
Payload []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func boolToUint( in bool ) (out uint){
|
func boolToByte( in bool ) (out uint){
|
||||||
if in { out = 1 }
|
if in { out = 1 }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *MpegTsPacket) toByteSlice() (output []byte) {
|
// bool to int, shift accordigly, int to string, string binary to int
|
||||||
|
func (p *MpegTsPacket) toByteSlice() (output [188]byte) {
|
||||||
output[0] = p.SyncByte
|
output[0] = p.SyncByte
|
||||||
output[1] =
|
output[1] =( boolToByte(TEI) << (8-TEIIndex%8) ) | ( boolToByte(PUSI) << (8-PUSIIndex%8) ) |
|
||||||
|
( boolToByte(Priority) << (8-PriorityIndex%8) )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue