Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Aug 11, 2023
1 parent 56df70f commit ced0397
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/rtcp/XrPacket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import {
} from './RtcpPacket';
import { Serializable } from '../Serializable';
import { padTo4Bytes, assertUnreachable } from '../utils';
import { readBit, writeBit, readBits, writeBits } from '../bitOps';
import {
readBit,
writeBit,
readBitsInDataView,
writeBitsInDataView
} from '../bitOps';

/*
* https://tools.ietf.org/html/rfc3611
Expand Down Expand Up @@ -834,15 +839,17 @@ export class ExtendedReportLRLE extends ExtendedReport
*/
getThinning(): number
{
return readBits({ view: this.view, byte: 1, mask: 0x0F0 });
return readBitsInDataView({ view: this.view, byte: 1, mask: 0x0F0 });
}

/**
* Set thinning.
*/
setThinning(thinning: number): void
{
writeBits({ view: this.view, byte: 1, mask: 0x0F0, value: thinning });
writeBitsInDataView(
{ view: this.view, byte: 1, mask: 0x0F0, value: thinning }
);

this.setSerializationNeeded(true);
}
Expand Down

0 comments on commit ced0397

Please sign in to comment.