Commit Graph

739 Commits

Author SHA1 Message Date
Max Hawkins
1e80cb7e46 Upgrade pion/rtcp to v1.1.5
Closes #581
2019-04-07 13:23:35 -07:00
Sean DuBois
dbde6114a2 Update import paths
Add /v2 to import paths everywhere
2019-04-07 02:17:15 -07:00
Sean DuBois
cb6d67aecf Update README for v2
🎉
2019-04-07 01:31:24 -07:00
Sean DuBois
158e1a0751 Bump module to /v2
🎉
2019-04-07 01:25:37 -07:00
Antoine Baché
8616aff70b Updated wasm DataChannel
- Added SetBufferedAmountLowThreshold
- Added OnBufferedAmountLow

Fixes #591
2019-04-07 01:14:48 -07:00
Sean DuBois
596ef378b0 Extract examples that use 3rd party libraries
We are moving all examples that use 3rd party libraries to
https://github.com/pion/example-webrtc-applications

Resolves #561
2019-04-07 01:14:32 -07:00
Sean DuBois
620bd36687 Pass LoggerFactory to DTLS and SRTP
Resolves #361
2019-04-06 19:57:34 -07:00
Yutaka Takeda
78cb3ee744 Update sctp and datachannel
Resolves #569
2019-04-06 15:52:49 -07:00
Yutaka Takeda
8576a6ca09 Updated sctp, datachannel, logging
Resolves #569
2019-04-06 15:52:49 -07:00
Yutaka Takeda
3884c8c32c Pass the logger factory to sctp and datachannel
Resolves #569
2019-04-06 15:52:49 -07:00
Yutaka Takeda
c7a5c7b0c1 Impleted bufferedAmount interface
Resolves #569
2019-04-06 15:52:49 -07:00
Michael MacDonald
64eecd6d39 Disable quic by default; enable with build tag
Taking a more extreme approach than #588... This patch
disables quic by default. The advantage here would be
that webrtc builds with older versions of go than
quic-go supports (currently 1.12+).
2019-04-05 15:32:40 -04:00
Sean DuBois
b49d45d243 Disallow stdlib functions that print to stdio
All printing to stdio must be done via pion/logging,
all calls to common printing functions will not cause CI
to fail

Relates to pion/webrtc#361
2019-04-05 11:11:16 -07:00
Sean DuBois
4c781e64d9 Return error on certificate fingerprint failure
Instead of printing the error to stdout return the error to the user.
This may not be a hard error (as later certificates would have passed)
but it never is good to be in a state where you have certificates in a
broken state.

Resolves #586
2019-04-05 00:48:22 -07:00
Sean DuBois
6e26cd208f Make SCTPTransport thread safe
Relates to #525
2019-04-04 21:28:37 -07:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
Sean DuBois
1202dbaa06 Migrate SDP generation to Unified Plan
This commit has breaking changes. This API change means we
can no longer support an arbitrary number of receivers. For every track
you want to receive you MUST call PeerConnection.AddTransceiver

We do now support sending an multiple audio/video feeds. You can see
this behavior via gstreamer-receive and gstreamer-send currently.

Resolves #54
2019-04-04 12:55:36 -07:00
Sean DuBois
bc94eaa968 Rewrite gstreamer-src/Pipeline for multi-track
This allows us to demonstrate multi-track easier, without having to
worry about encoding multiple times

Relates to #54
2019-04-04 12:55:36 -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
Hugo Arregui
bb83935773 Use newDataChannel in sctp transport
Replace direct instantiation. Replace some print lines too.
2019-04-03 15:26:30 -03:00
backkem
e4e908839e Bump pions/quic
This version removes the need for our quic-go fork.
2019-04-02 23:59:54 +02:00
Sean DuBois
0884380abc Update pion-to-pion Dockerfile
Remove OpenSSL dependency, also update to Go 1.12

Resolves #576
2019-04-01 18:35:06 -07:00
backkem
d906c2b43b Detach: WASM Shim
JS/WASM shim for Detach API
2019-04-01 21:00:41 +02:00
backkem
57a3296cf0 WASM: Port API object
Port the API object to the JS/WASM target. This allows more
code to work for both targets.
2019-04-01 21:00:41 +02:00
Hugo Arregui
87897285b1 Custom Loggers
Define LoggerFactory as part of the SettingEngine
2019-04-01 11:14:13 -03:00
backkem
f1c3fb8e81 Change detach to interface
This is in preparation of a JS/WASM shim.
2019-04-01 15:40:45 +02:00
Sean DuBois
fe3d7ce5e4 Don't allow answer without RemoteDescription
Resolves #563
2019-03-31 15:58:50 -07:00
Sean DuBois
cc25f30bdb Don't iterate Transceivers without lock
Properly use locks when accessing Transceivers

Resolves #431
2019-03-31 12:14:40 -07:00
Sean DuBois
6c0e8b8851 Return io.EOF when Track has no RTPSenders
Using this enum allows people to more gracefully handle shutdown,
also add a test to assert io.EOF is returned in other places

Resolves #511
2019-03-31 12:00:40 -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
Max Hawkins
4298892dc0 Rename SendRTCP -> WriteRTCP
Makes method name consistent with WriteRTP

Fixes #557
2019-03-30 10:21:46 -07:00
Sean DuBois
776c551307 Don't notify users via Track of ICE errors
Writing to a Track shouldn't return errors for an individual
RTPSender. This filters ErrNoCandidatePairs from being returned
and instead just returns nil

Resolves #523
2019-03-29 17:16:35 -07:00
Sean DuBois
f87aa7a34a Minor test re-organization
Move ICETransport specific test to proper file, add a comment to
integration test explaining purpose
2019-03-28 17:23:28 -07:00
jinleileiking
8ef5b7034f Example: Update Sfu-ws to use prommod
Update modules to use version of Pion WebRTC this example is shipped
with
2019-03-28 00:52:10 -07:00
simonacca-fotokite
79d29886d9 Fix broken link in README
Update sfu-ws link, incorrectly pointed to sfu-websocket before
2019-03-27 00:05:30 -07:00
Sean DuBois
b4bc4798b9 Move ICE out of tree
Relates to #361
2019-03-25 23:31:43 -07:00
Alex Browne
5ee8b1a5c5 Add ICE candidate event handlers
Add OnICECandidate and OnICEGatheringStateChange methods to
PeerConnection. The main goal of this change is to improve API
compatibility with the JavaScript/Wasm bindings. It does not actually
add trickle ICE support or change the ICE candidate gathering process,
which is still synchronous in the Go implementation. Rather, it fires
the appropriate events similar to they way they would be fired in a true
trickle ICE process.

Remove unused OnNegotiationNeeded event handler. This handler is not
required for most applications and would be difficult to implement in
Go. This commit removes the handler from the JavaScript/Wasm bindings,
which leads to a more similar API for Go and JavaScript/Wasm.

Add OnICEGatheringStateChange to the JavaScript/Wasm bindings. Also
changes the Go implementation so that the function signatures match.
2019-03-25 14:22:11 -07:00
Sean DuBois
fdcb1a3941 Rewrite examples to avoid onnegotiationneeded
onnegotiationneeded is broken in libwebrtc M73, so
just rewrite all examples to only set the offer once

Resolves #545
2019-03-23 13:36:06 -07:00
zigazeljko
ee5aa24977 Fix error reporting
Wrong error variable was used in data-channels-create example.
2019-03-22 22:29:40 -07:00
Alex Browne
e3d9ad00da Check Node.js version in go_js_wasm_exec script
Fixes #529. The required minimum version is Node 10, not 11 as I
previously thought.
2019-03-22 13:13:19 -07:00
Alex Browne
012a7ea686 Improve build tags for Wasm
Fixes #515

This includes a few small and closely related changes:

1. All occurrences of the build tag `+build js` have been changed to the
   more precise `+build js,wasm`. This will exclude the files from being
   included by third-party compilers like GopherJS, with which they are
   incompatible.
2. Some files which are incompatible with JavaScript/Wasm now have the
   correct build tag (`+build -js`) so they will be excluded from Wasm
   builds.
3. Some configuration options which are incompatible with
   JavaScript/Wasm (or at least the current bindings) will now no longer
   appear in Wasm builds. This meant creating new files with new struct
   definitions and the appropriate build tags.
2019-03-22 10:48:03 -07:00
imalic3
768536cade Extend sfu-ws with data-channel broadcasting
Relates to #534
2019-03-21 22:41:46 -07:00
Sean DuBois
f174986c74 Fix all lint errors in examples/
Resolves #531 and Resolves #470
2019-03-21 09:31:27 -07:00
Sean DuBois
817ee39f62 Run golangci-lint on examples
Resolves #531 and Resolves #470
2019-03-21 09:31:27 -07:00
backkem
c619a5a74d CI: Enable no-inits linter
Relates to #434
2019-03-21 12:48:57 +01: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
205c759a69 Add feedback support to SDP generation
Syntax could be better but works in a standards-compliant way.

```
codec := webrtc.NewRTPH264Codec(webrtc.DefaultPayloadTypeH264, 90000)
codec.RTPCodecCapability.RTCPFeedback = []webrtc.RTCPFeedback{{
    Type: "nack",
}, {
    Type:      "nack",
    Parameter: "pli",
}}
```
2019-03-20 15:44:17 -07:00
Sean DuBois
7cd3d00a38 Bump pions/sctp and pions/dtls
Both packages have been updated to have higher resilience to packet loss
2019-03-19 23:48:26 -07:00