Skip to content

Commit

Permalink
feat(jitter): Report sequence numbers in JitterFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-tutor committed Jun 24, 2024
1 parent 58b21b7 commit 95df488
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vpx_rtp/jitterbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@


class JitterFrame:
def __init__(self, data: bytes, timestamp: int) -> None:
def __init__(
self, data: bytes, timestamp: int, sequence_numbers: list[int]
) -> None:
self.data = data
self.timestamp = timestamp
self.sequence_numbers = sequence_numbers


class JitterBuffer:
Expand Down Expand Up @@ -80,7 +83,9 @@ def _remove_frame(self, sequence_number: int) -> Optional[JitterFrame]:
# we now have a complete frame, only store the first one
if frame is None:
frame = JitterFrame(
data=b"".join([x._data for x in packets]), timestamp=timestamp
data=b"".join([x._data for x in packets]),
timestamp=timestamp,
sequence_numbers=[x.sequence_number for x in packets],
)
remove = count

Expand Down

0 comments on commit 95df488

Please sign in to comment.