Commit graph

71 commits

Author SHA1 Message Date
Steve Anton
dc8b5ab350 Remove dead code for media channel errors
Bug: None
Change-Id: Ifb8f2cd42a5e24ce8386eff97435890766bbd5fc
Reviewed-on: https://webrtc-review.googlesource.com/37142
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21507}
2018-01-06 00:25:29 +00:00
Patrik Höglund
9e19403d10 Move videosourceinterface to api.
VideoSourceInterface is clearly an integral part of
mediastreaminterface.h already, so moving that interface to api makes
sense. This also resolves a circular dependency in call/.

Bug: webrc:6828
Change-Id: Ic1862f118363b0b55a235a9c0c35d9adc647184c
Reviewed-on: https://webrtc-review.googlesource.com/37500
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21498}
2018-01-05 09:14:19 +00:00
Patrik Höglund
be214a26f8 Move videosinkinterface.h to common_video to solve a circular dep.
I updated some dependency enforcement rules to allow examples and pc
to depend on common_video. I reckoned depending on common_video is
not controversial when they already dependend on media/base, which
is a lower-level abstraction.

Bug: webrtc:6828
Change-Id: I77dbeb10187b4e70dda1d873a29994fa76070758
Reviewed-on: https://webrtc-review.googlesource.com/34187
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21495}
2018-01-04 13:19:49 +00:00
Steve Anton
593e32551c Change RTCStatsCollector to only access channels from signaling thread
Previously, the RTCStatsCollector needed to ask the voice/video
channel for its transport name in order to generate transport
level stats. That would happen on the networking thread which was
unsafe because the voice/video channel could have disappeared in
the duration of the asynchronous thread hop from the signaling
thread to the networking thread. This changes the networking stats
code to check a saved map that tracks the transport name for each
voice/video channel.

Bug: None
Change-Id: I1f03ba8c0526eaa4419f660f18b8b9da62c3f932
Reviewed-on: https://webrtc-review.googlesource.com/33660
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21332}
2017-12-18 18:55:23 +00:00
Niels Möller
9a44f96ea7 Delete rtc_base/window.h.
Bug: webrtc:6424
Change-Id: Iaed83b07dd469a9990f48fe41fcdff5e7493eb31
Reviewed-on: https://webrtc-review.googlesource.com/31480
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21194}
2017-12-11 07:59:35 +00:00
Steve Anton
3828c06a58 Replace cricket::ContentAction with webrtc::SdpType
Bug: webrtc:8613
Change-Id: I9bce2b9d8c8445d2fa1b9f60b06596a5621ebc2f
Reviewed-on: https://webrtc-review.googlesource.com/29460
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21130}
2017-12-06 19:40:16 +00:00
Zhi Huang
2dfc42d7b6 Prepare to make BaseChannel depend on RtpTransportInternal only.
Eventually we want BaseChannel to depend on the RtpTransportInternal
instead of DtlsTransportInternal and share RtpTransport when bundling.
This CL is the first step.

Add SetRtpTransport and Init_w(RtptransportInternal*) to BaseChannel.
These two methods would replace the existing SetTransports and Init_w
methods.

Add new CreateVoice/VideoChannel methods to the ChannelManager which
 take RtpTransportInternal instead of Dtls/PacketTransportInternal.

|cotnent_name| is removed from the SrtpTransport to simplify to code
since it is only used for debugging.

InitNetwork_n is removed from BaseChannel in CL as well.

Bug: webrtc:7013
Change-Id: I35b1565958548bd4896854c49e61d3ee160b7634
Reviewed-on: https://webrtc-review.googlesource.com/27840
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21057}
2017-12-04 22:27:39 +00:00
Zhi Huang
cd3fc5d90c Use the DtlsSrtpTransport in BaseChannel.
The DtlsSrtpTransport takes the reponsiblity of setting up DTLS-SRTP from
the BaseChannel.

The BaseChannel doesn't handle the signals from the P2P layer transport anymore.
The RtpTransport handles the signals from the PacketTransportInternal and the
DtlsSrtpTransport handles the DTLS-specific signals and determines when to extract
the keys and setting the parameters.

In channel_unittests.cc, call from DTLS to SDES is expected to fail since the
fallback from DTLS to SDES is not supported.

Bug: webrtc:7013
Change-Id: I0a54e017986f5a8ae9710e79643a4651bef3c38f
Reviewed-on: https://webrtc-review.googlesource.com/24702
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20941}
2017-11-29 19:38:39 +00:00
Steve Anton
4e70a72571 Replace MediaContentDirection with RtpTransceiverDirection
Bug: webrtc:8558
Change-Id: I410d17cce235e0b42038cf0b125fd916010f50ae
Reviewed-on: https://webrtc-review.googlesource.com/24745
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20922}
2017-11-28 23:44:28 +00:00
Zhi Huang
1d88d7446e Remove the unused code.
In BaseChannel, |selected_candidate_pair| is removed.
In MediaContentDescription, |buffered_mode_latency_| and its
getter/setter are removed.

TBR=pthatcher@webrtc.org

Bug: None
Change-Id: I68c0a61136dcd078f587105f09c72098d7f8e620
Reviewed-on: https://webrtc-review.googlesource.com/23520
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20694}
2017-11-16 04:08:03 +00:00
Zhi Huang
942bc2e4b9 Reland: Replaced the SignalSelectedCandidatePairChanged with a new signal.
|packet_overhead| field is added to rtc::NetworkRoute structure.

In PackTransportInternal:
1. network_route() is added which returns the current network route.
2. debug_name() is removed.
3. transport_name() is moved from DtlsTransportInternal and
IceTransportInternal to PacketTransportInternal.

When the selected candidate pair is changed, the P2PTransportChannel
will fire the SignalNetworkRouteChanged instead of
SignalSelectedCandidatePairChanged to upper layers.

The Rtp/SrtpTransport takes the responsibility of calculating the
transport overhead from the BaseChannel so that the BaseChannel
doesn't need to depend on P2P layer transports.

TBR=pthatcher@webrtc.org

Bug: webrtc:7013
Change-Id: If9928b25a7259544c2d9c42048b53ab24292fc67
Reviewed-on: https://webrtc-review.googlesource.com/22767
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20664}
2017-11-13 22:50:11 +00:00
Zhi Huang
8c316c1a89 Revert "Replaced the SignalSelectedCandidatePairChanged with a new signal."
This reverts commit 71677452f9.

Reason for revert: Broke Chromium.

Original change's description:
> Replaced the SignalSelectedCandidatePairChanged with a new signal.
> 
> |transport overhead| field is added to rtc::NetworkRoute structure.
> 
> In PackTransportInternal:
> 1. network_route() is added which returns the current network route.
> 2. debug_name() is removed.
> 3. transport_name() is moved from DtlsTransportInternal and
>    IceTransportInternal to PacketTransportInternal.
> 
> When the selected candidate pair is changed, the P2PTransportChannel
> will fire the SignalNetworkRouteChanged instead of
> SignalSelectedCandidatePairChanged to upper layers.
> 
> The Rtp/SrtpTransport takes the responsibility of calculating the
> transport overhead from the BaseChannel so that the BaseChannel
> doesn't need to depend on P2P layer transports.
> 
> Bug: webrtc:7013
> Change-Id: I60d30d785666a50a95052d00bf08f829d8f57e9c
> Reviewed-on: https://webrtc-review.googlesource.com/13520
> Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20661}

TBR=steveanton@webrtc.org,zhihuang@webrtc.org,pthatcher@webrtc.org

Change-Id: Ie0c76786855b65bb8caba7065593c961e4bf9de7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7013
Reviewed-on: https://webrtc-review.googlesource.com/22764
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20662}
2017-11-13 21:13:55 +00:00
Zhi Huang
71677452f9 Replaced the SignalSelectedCandidatePairChanged with a new signal.
|transport overhead| field is added to rtc::NetworkRoute structure.

In PackTransportInternal:
1. network_route() is added which returns the current network route.
2. debug_name() is removed.
3. transport_name() is moved from DtlsTransportInternal and
   IceTransportInternal to PacketTransportInternal.

When the selected candidate pair is changed, the P2PTransportChannel
will fire the SignalNetworkRouteChanged instead of
SignalSelectedCandidatePairChanged to upper layers.

The Rtp/SrtpTransport takes the responsibility of calculating the
transport overhead from the BaseChannel so that the BaseChannel
doesn't need to depend on P2P layer transports.

Bug: webrtc:7013
Change-Id: I60d30d785666a50a95052d00bf08f829d8f57e9c
Reviewed-on: https://webrtc-review.googlesource.com/13520
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20661}
2017-11-13 20:57:31 +00:00
Zhi Huang
c99b6c7936 Remove the SetEncryptedHeaderExtensionIds methods.
The existing methods SetEncrypedHeaderExtensionIds in SrtpTransport and SrtpSession
are removed because those methods could be confusing. When these methods are called
the head extension IDs are not actually updated and the user need to call SetRtpParams
again to make that happen. The existing setter just caches the new IDs.

To make it less confusing, the SetEncryptedHeaderExtensionIds is removed and the new
extension IDs will be set immediately when setting the crypto params.

For SDES, the crypto params and the header extension IDs will be set at the same time.

For DTLS, the new header extensions are cached in BaseChannel and will be set when
the DTLS handshake is completed.

Another major change is that when doing DTLS-SRTP, the encrypted header extension
IDs will be updated only when they are changed.

Bug: webrtc:7013
Change-Id: Ib70d4797456ae5ecb61b3dfff15c7e3e7ede89bd
Reviewed-on: https://webrtc-review.googlesource.com/15860
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20639}
2017-11-11 01:14:35 +00:00
Steve Anton
8699a3229f Have BaseChannel take MediaChannel as unique_ptr
Bug: None
Change-Id: I9a0c67cc364623b7c17824271edfbd782f88dbfb
Reviewed-on: https://webrtc-review.googlesource.com/18300
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20594}
2017-11-07 18:46:06 +00:00
Steve Anton
6b63cd5e54 Rewrite WebRtcSession DTLS/SDES crypto tests as PeerConnection tests
Bug: webrtc:8222
Change-Id: I6be2c5a5735b77a5c577472b88ff830204dd69eb
Reviewed-on: https://webrtc-review.googlesource.com/1160
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20193}
2017-10-06 18:50:24 +00:00
Zhi Huang
b5261580bc Move the TransportController from p2p/base to pc/.
The TransportController was in p2p/base before and it cannot depend on
pc/ or media/ level targets because of the circular dependency. To make the 
TransportController be responsible for creating and managing
the RtpTransport related objects which are pc/ level targets, the
TransportController is moved from p2p/base to pc/.

The TransportController makes more sense in pc/ anyway, since its main 
responsibility is processing the "transport" parts of SDP which is
PeerConnection-specific.

This is also easier than moving RtpTransport related objects to p2p/base 
because those objects also depend on other media/ and pc/ level targets
such as srtpfilter, cryptoparams etc.

Bug: webrtc:7013
Change-Id: Ic48dd5c454046ff3c81331f4b459f96a3255f328
Reviewed-on: https://webrtc-review.googlesource.com/4560
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20049}
2017-09-29 18:20:07 +00:00
Zhi Huang
cf990f53b0 Reland: Completed the functionalities of SrtpTransport.
The SrtpTransport takes the SRTP responsibilities from the BaseChannel
and SrtpFilter. SrtpTransport is now responsible for setting the crypto
keys, protecting and unprotecting the packets. SrtpTransport doesn't
know if the keys are from SDES or DTLS handshake.

BaseChannel is now only responsible setting the offer/answer for SDES
or extracting the key from DtlsTransport and configuring the
SrtpTransport.

SrtpFilter is used by BaseChannel as a helper for SDES negotiation.

BUG=webrtc:7013

Change-Id: If61489dfbdf23481a1f1831ad181fbf45eaadb3e
Reviewed-on: https://webrtc-review.googlesource.com/2560
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19977}
2017-09-26 18:12:45 +00:00
zhihuang
eb23e17798 Revert of Completed the functionalities of SrtpTransport. (patchset 7 id:320001 of https://codereview.webrtc.org/2997983002/ )
Reason for revert:
This seems to be causing some video freezes. See https://bugs.chromium.org/p/webrtc/issues/detail?id=8251

Original issue's description:
> Completed the functionalities of SrtpTransport.
>
> The SrtpTransport takes the SRTP responsibilities from the BaseChannel
> and SrtpFilter. SrtpTransport is now responsible for setting the crypto
> keys, protecting and unprotecting the packets. SrtpTransport doesn't know
> if the keys are from SDES or DTLS handshake.
>
> BaseChannel is now only responsible setting the offer/answer for SDES
> or extracting the key from DtlsTransport and configuring the
> SrtpTransport.
>
> SrtpFilter is used by BaseChannel as a helper for SDES negotiation.
>
> BUG=webrtc:7013
>
> Review-Url: https://codereview.webrtc.org/2997983002
> Cr-Commit-Position: refs/heads/master@{#19636}
> Committed: e683c6871f

TBR=deadbeef@webrtc.org,pthatcher@google.com,zhihuang@webrtc.org
Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7013

Review-Url: https://codereview.webrtc.org/3018513002
Cr-Commit-Position: refs/heads/master@{#19895}
2017-09-19 08:12:52 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/pc/channel.h (Browse further)