Commit Graph

19 Commits

Author SHA1 Message Date
Robin Raymond
7d97c9b5d3 Refactored samplebuilder logic
Many corner cases would cause samplebuilder to fail and return invalid
results. This refactoring is more reliable in all cases.

Fixed bug in H264 writer by reusing the packet object in  H264 writer.
2021-05-06 15:14:21 -04:00
mission-liao
f484fcbf6b Add option to add hook for packets released
This hook allow us to recycle the packet buffer via sync.Pool.
2020-12-03 09:49:28 -08:00
Sean DuBois
7edfb701e0 New Track API
The Pion WebRTC API has been dramatically redesigned. The design docs
are located here [0]

You can also read the release notes [1] on how to migrate your
application.

[0] https://github.com/pion/webrtc-v3-design
[1] https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0
2020-11-15 09:20:47 -08:00
Atsushi Watanabe
020aebd5f4 Fix SampleBuilder packet unref
It unexpectedly unreferenced all packets
when sequence number is decreased more than 2.
2020-07-07 21:59:54 -07:00
Sean DuBois
89d7de1787 Start /v3
See #9 for the features we have planned, and the breaking changes that
may occur.
2020-06-25 09:45:27 -07:00
Atsushi Watanabe
06156ba2be Unreference garbage in SampleBuilder buffer
SampleBuilder held reference to outdated packets when
the SequenceNumber is jumped.
2020-06-22 13:03:10 +09:00
Atsushi Watanabe
b361a21c54 Detect partition head in SampleBuilder
Add functional option to set PartitionHeadChecker to detect the
beginning of the frame partition and avoid dropping the first
packet.
2020-01-30 13:39:38 +09:00
Atsushi Watanabe
1d69a90d23 Fix seqnum distance in SampleBuilder
Fix overflow and underflow handling.
2019-12-19 10:24:32 +09:00
Atsushi Watanabe
accfca4575 Add SampleBuilder.PopWithTimestamp
PopWithTimestamp function is added to provide RTP timestamp
of the sample.
This makes it possible to detect frame drops in user application.
2019-12-14 20:35:52 +09:00
Sean DuBois
10d2ca3d88 Enable gochecknoglobals linter
Resolves #434
2019-07-09 23:31:56 +01:00
Sean DuBois
5e8e1f0869 Bump pion/rtp and pion/srtp
Update rtp.Depacketizer interface to match VP8 and H264 codec
2019-05-07 00:52:18 -07:00
Sean DuBois
dbde6114a2 Update import paths
Add /v2 to import paths everywhere
2019-04-07 02:17:15 -07:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
Max Hawkins
0e7086d37a Remove RTC prefix from all names
Let's pull off the bandaid!

* Reduces studdering: webrtc.RTCTrack -> webrtc.Track
* Makes it easier to find types by editor autocomplete
* Makes code read more fluently (less repetition)

Since we're breaking the API in 2.0, our only chance to
do this is now.

Relates to #408
2019-02-17 16:22:56 -08:00
Sean DuBois
5efb6b0b7f Fix SampleBuilder not respecting maxLate
SampleBuilder now respects maxLate after a buffer have been popped
2019-02-14 22:39:02 -08:00
Sean DuBois
2863555984 Export RTP/RTCP to unique packages
Resolves #272
2019-01-28 11:38:54 -08:00
Sean DuBois
bce2813b68 Update SRTP to allow in place operations
Relates to #272
2019-01-13 13:17:09 -08:00
Sean DuBois
f7c4fea4f5 Add RTP Depackatization to SampleBuilder
When constructing a SampleBuilder the caller now passes in a
Depacketizer. This allows the SampleBuilder to take a RTP packet
to a sample. This wasn't possible before because RTP payloads may carry
codec specific metadata in the payloads that need to be stripped

Relates to #63
2018-09-22 16:58:10 -07:00
Sean DuBois
e500917a6e Implement SampleBuilder
SampleBuilder provides a simple API to build an
RTCSample from RTP packets. This is useful when proxying
audio/video data to multiple peers. This is the alternative
to allowing users to push RTP Packets directly. This would be
confusing as we would throw away some of the information that users
give us and could lead to weird edge cases

Resolves #112
2018-09-09 23:16:19 -07:00