Commit Graph

197 Commits

Author SHA1 Message Date
Atsushi Watanabe 27d9bbb7bd Upgrade golangci-lint to 1.19.1
Fix whitespace and stylecheck errors.
Disable godox.
2020-01-11 22:59:33 -08: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
Guilherme 7f565d32a3 Fix description of IVF headers
Update comments in IVFWriter to properly document IVF members
2019-10-23 23:48:15 -07:00
Vicken Simonian 5f25df2209 Various spell fixes
For error types, vars, docs and comments
2019-10-17 23:31:21 -07:00
Hugo Arregui 6997cc792c Linter fixes
Disable funlen and some fixes

Co-authored-by: Sean DuBois <sean@siobud.com>
2019-09-10 21:48:25 -07:00
Sebastian Waisbrot 3766da35a1 Update IVF Writer frame count when possible
Discussion in issue #731
2019-08-29 09:31:56 -07:00
Sean DuBois 6209597312 Fix OpusWriter issues that break VLC
* Correctly calculate page CRC
Ogg uses slightly non-standard version of CRC, we are unable to
use the Go's version. You can see the details here[0], in summary
"direct algorithm, initial val and final XOR = 0,
generator polynomial=0x04c11db7"

[0] https://xiph.org/vorbis/doc/framing.html

* Properly set EOS value
Before we created a new page with an EOS. Instead seek backwards
and update the last page with valid Opus to have EOS header and
re-generate the CRC

* Only use 0 timestamp/granule for headers
Audio itself should start from 0

* Rename OpusWriter -> OggWriter
Ogg supports more then just Opus, renaming gives us the flexibility to
expand in the future.
2019-08-15 17:12:01 -07:00
Sean DuBois 0d585106c0 Add examples/play-from-disk
Using IVFReader demonstrate how users can stream a video
from hard disk to browser.

Relates to #636
2019-08-08 16:44:50 -07:00
Justin Okamoto 03308449a7 Add IVFReader
We have IVFWriter but no reader. This can be helpful
for some of the use cases described in #636.

Fixes #636
2019-08-04 02:05:55 -04:00
Sean DuBois 10d2ca3d88 Enable gochecknoglobals linter
Resolves #434
2019-07-09 23:31:56 +01:00
Sean DuBois 9014863dc5 Revert "Moved internal/ice package to pkg/ice"
I made this change because I assumed godoc doesn't support
internal packages, this is not true. Godoc is actually having
issues because it doesn't support modules yet. So reverting
this change because we would prefer this be internal.

This reverts commit 8b09ced24b.
2019-06-06 11:42:49 -07:00
Adam Kiss 8b09ced24b Moved internal/ice package to pkg/ice
Moved internal/ice package to pkg/ice so godocs is properly generated
for it.
2019-06-06 00:52:45 -07: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 d7639778cc Use time.Duration in rtpdump.Packet
Makes it easier to use with the Go time package. Simplifies writing
a sample recorder/player.

Related to #522
2019-04-04 10:01:52 -07:00
Max Hawkins 2b2550696a Implement RTPDump Reader/Writer
RTPDump is a widely-implemented file format for saving RTP
packet dumps without the overhead of UDP and IP headers found
in pcap dumps. libWebRTC, Wireshark, and RTPTools all have
an implementation.

For more information see:
https://www.cs.columbia.edu/irt/software/rtptools

Relates to #549
2019-04-04 10:01:52 -07:00
Max Hawkins 2a9d654143 Rename media.Writer AddPacket -> WriteRTP
Makes the name consistent with webrtc's WriteRTP
and makes webrtc.Track a Writer.

Fixes #566
2019-03-31 00:03:37 -07:00
backkem bcdbc35ce6 Reduce global state
Relates to #434
2019-03-21 12:48:57 +01:00
backkem fe0e4d692b Move logging out of tree
Relates to #361
2019-03-21 12:48:57 +01:00
Luke Curley 08a93d89ba Optimize Read by buffering
Increases the Read performance to acceptable levels. Packet loss went
from roughly 8% to 0.5% with this change.
2019-03-12 21:34:48 -07:00
Antoine Baché 6a68ca04a8 IVF records can now be longer than 30s
- Added timeout to save-to-disk example
- Writing number of IVF frames when closing the file
- Fixed typos

Relates to #471
2019-03-07 14:49:25 -08:00
Michael MacDonald 5084ad3370 Move pkg/ice to internal/ice
Avoid exposing any non-standard API.
2019-03-01 08:07:42 -05:00
Michael MacDonald b8f3e36b00 Add OnSelectedCandidatePairChange callback
Invoked when the selected ICE candidate pair changes.
2019-03-01 08:07:42 -05:00