Commit Graph

90 Commits

Author SHA1 Message Date
68343a8f67 Revert of Remove the obsolete enum webrtc::PeerConnectionInterface::IceState. (patchset #1 id:1 of https://codereview.webrtc.org/2256663002/ )
Reason for revert:
This breaks Chromes build.
You will need to update tests in Chrome first.

[1874/1925] CXX obj/content/test/test_support/mock_peer_connection_impl.o
FAILED: obj/content/test/test_support/mock_peer_connection_impl.o
/b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/test/test_support/mock_peer_connection_impl.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_USE_EXTERNAL_STARTUP_DATA -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DENABLE_IPC_FUZZER -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DENABLE_WEBSOCKETS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSE_LIBJPEG_TURBO=1 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DLOG_DISABLED=0 -DMESA_EGL_NO_X11_HEADERS -DUNIT_TEST -DLEVELDB_PLATFORM_CHROMIUM=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DNO_MAIN_THREAD_WRAPPING -I../.. -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../testing/gtest/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -Igen -I../../third_party/ced/src -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/libjpeg_turbo -I../../third_party/WebKit/Source -I../../third_party/WebKit -Igen/blink -Igen/third_party/WebKit -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -I../../third_party/mesa/src/include -I../../testing/gmock_custom -I../../testing/gmock/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libwebm/source -I../../third_party/opus/src/include -Igen/ui/resources -Igen/ui/resources -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/libyuv -I../../third_party/libyuv/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -g1 -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-pdf -Wheader-hygiene -Wstring-conversion -Wno-unused-function -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../content/renderer/media/mock_peer_connection_impl.cc -o obj/content/test/test_support/mock_peer_connection_impl.o
In file included from ../../content/renderer/media/mock_peer_connection_impl.cc:5:
../../content/renderer/media/mock_peer_connection_impl.h:52:3: error: unknown type name 'IceState'
  IceState ice_state() override {
  ^
../../content/renderer/media/mock_peer_connection_impl.h:54:37: error: no member named 'kIceNew' in 'webrtc::PeerConnectionInterface'
    return PeerConnectionInterface::kIceNew;

See for example https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/16680
           ~~~~~~~~~~~~~~~~~~~~~~~~~^

Original issue's description:
> Remove the obsolete enum webrtc::PeerConnectionInterface::IceState.
>
> Was replaced by IceConnectionState + IceGatheringState.
>
> BUG=
>
> Committed: https://crrev.com/31dea98e9c87e640e185fd86fe63d952b5402e05
> Cr-Commit-Position: refs/heads/master@{#13963}

TBR=pthatcher@webrtc.org,johan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2290963002
Cr-Commit-Position: refs/heads/master@{#13966}
2016-08-30 06:51:20 +00:00
31dea98e9c Remove the obsolete enum webrtc::PeerConnectionInterface::IceState.
Was replaced by IceConnectionState + IceGatheringState.

BUG=

Review-Url: https://codereview.webrtc.org/2256663002
Cr-Commit-Position: refs/heads/master@{#13963}
2016-08-29 21:11:37 +00:00
9763d56464 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
Review-Url: https://codereview.webrtc.org/2166873002
Cr-Original-Commit-Position: refs/heads/master@{#13645}
Cr-Commit-Position: refs/heads/master@{#13657}
2016-08-05 18:14:54 +00:00
907abe4411 Revert of Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage. (patchset #8 id:280001 of https://codereview.webrtc.org/2166873002/ )
Reason for revert:
Reverting because it broke an RTP data channel test on the FYI bots.

Original issue's description:
> Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
>
> To allow end-to-end QuicDataChannel usage with a
> PeerConnection, RTCConfiguration has been modified to
> include a boolean for whether to do QUIC, since negotiation of
> QUIC is not implemented. If one peer does QUIC, then it will be
> assumed that the other peer must do QUIC or the connection
> will fail.
>
> PeerConnection has been modified to create data channels of type
> QuicDataChannel when the peer wants to do QUIC.
>
> WebRtcSession has ben modified to use a QuicDataTransport
> instead of a DtlsTransportChannelWrapper/DataChannel
> when QUIC should be used
>
> QuicDataTransport implements the generic functions of
> BaseChannel to manage the QuicTransportChannel.
>
> Committed: https://crrev.com/34b54c36a533dadb6ceb70795119194e6f530ef5
> Cr-Commit-Position: refs/heads/master@{#13645}

TBR=pthatcher@webrtc.org,zhihuang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2206793007
Cr-Commit-Position: refs/heads/master@{#13647}
2016-08-04 19:22:22 +00:00
34b54c36a5 Modified PeerConnection and WebRtcSession for end-to-end QuicDataChannel usage.
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.

PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.

WebRtcSession has ben modified to use a QuicDataTransport
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used

QuicDataTransport implements the generic functions of
BaseChannel to manage the QuicTransportChannel.

Review-Url: https://codereview.webrtc.org/2166873002
Cr-Commit-Position: refs/heads/master@{#13645}
2016-08-04 18:06:58 +00:00
cb56065c62 Add support for GCM cipher suites from RFC 7714.
GCM cipher suites are optional (disabled by default) and can be enabled
through "PeerConnectionFactoryInterface::Options".

If compiled with Chromium (i.e. "ENABLE_EXTERNAL_AUTH" is defined), no
GCM ciphers can be used yet (see https://crbug.com/628400).

BUG=webrtc:5222, 628400

Review-Url: https://codereview.webrtc.org/1528843005
Cr-Commit-Position: refs/heads/master@{#13635}
2016-08-04 12:20:38 +00:00
14d5dbe5b3 Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop functions for the Rtc Eventlog non-virtual." and "Fix for RtcEventLog ObjC interface"
The breaking tests in Chromium have been temporarily disabled, they will be fixed and reenabled soon.

Original CLs: https://codereview.webrtc.org/1748403002/, https://codereview.webrtc.org/2107253002/ and https://codereview.webrtc.org/2106103003/.

TBR=solenberg@webrtc.org,tommi@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,tkchin@webrtc.org
BUG=webrtc:4741, webrtc:5603, chromium:609749

Review-Url: https://codereview.webrtc.org/2110113003
Cr-Commit-Position: refs/heads/master@{#13379}
2016-07-04 14:07:03 +00:00
e9851116e2 Adding API for "presume writable when fully relayed" ICE option.
For explanation of what this is, see:
https://codereview.webrtc.org/2063823008/

R=glaznev@webrtc.org, pthatcher@webrtc.org
TBR=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/2107303003 .

Cr-Commit-Position: refs/heads/master@{#13366}
2016-07-01 18:11:22 +00:00
b9e7b4ad66 Add config to prune low-priority TURN ports for creating connections
When the flag prune_turn_ports is set, When a high-priority turn port becomes available, it will prune low-priority ones. The pruned port will not be used for creating connections locally and its candidates will not be sent over to the remove side (unless they have been sent before being pruned).

This effectively reduces the number of TURN candidates and connections created by TURN ports.

BUG=
R=deadbeef@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2093623004 .

Committed: https://crrev.com/17aac053f585e892114974d2eb248e05ad37f973
Cr-Original-Commit-Position: refs/heads/master@{#13335}
Cr-Commit-Position: refs/heads/master@{#13354}
2016-07-01 03:52:16 +00:00
f4e8cf0d5b Revert of Add config to prune TURN ports (patchset #12 id:360001 of https://codereview.webrtc.org/2093623004/ )
Reason for revert:
Breaks Win32/Win64 Debug bots in client.webrtc waterfall

Original issue's description:
> Add config to prune low-priority TURN ports for creating connections
> When the flag prune_turn_ports is set, When a high-priority turn port becomes available, it will prune low-priority ones. The pruned port will not be used for creating connections locally and its candidates will not be sent over to the remove side (unless they have been sent before being pruned).
>
> This effectively reduces the number of TURN candidates and connections created by TURN ports.
>
> BUG=
> R=deadbeef@webrtc.org, pthatcher@webrtc.org
>
> Committed: https://crrev.com/17aac053f585e892114974d2eb248e05ad37f973
> Cr-Commit-Position: refs/heads/master@{#13335}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,honghaiz@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2111663003
Cr-Commit-Position: refs/heads/master@{#13342}
2016-06-30 08:55:10 +00:00
9e03c3b372 Revert of Move RtcEventLog object from inside VoiceEngine to Call. (patchset #16 id:420001 of https://codereview.webrtc.org/1748403002/ )
Reason for revert:
Reverting all CLs related to moving the eventlog, as they break Chromium tests.

Original issue's description:
> Move RtcEventLog object from inside VoiceEngine to Call.
>
> In addition to moving the logging object itself, this also moves the interface from PeerConnectionFactory to PeerConnection, which makes more sense for this functionality. An API parameter to set an upper limit to the size of the logfile is introduced.
> The old interface on PeerConnectionFactory is not removed in this CL, because it is called from Chrome, it will be removed after Chrome is updated to use the PeerConnection interface.
>
> BUG=webrtc:4741,webrtc:5603,chromium:609749
> R=solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org, tommi@webrtc.org
>
> Committed: https://crrev.com/1895526c6130e3d0e9b154f95079b8eda7567016
> Cr-Commit-Position: refs/heads/master@{#13321}

TBR=solenberg@webrtc.org,tommi@webrtc.org,stefan@webrtc.org,terelius@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4741,webrtc:5603,chromium:609749

Review-Url: https://codereview.webrtc.org/2111813002
Cr-Commit-Position: refs/heads/master@{#13340}
2016-06-30 07:59:49 +00:00
308c7b0b5a Revert of Fix to make the start/stop functions for the Rtc Eventlog non-virtual. (patchset #2 id:40001 of https://codereview.webrtc.org/2107253002/ )
Reason for revert:
Reverting all CLs related to moving the eventlog, as they break Chromium tests.

Original issue's description:
> Fix to make the start/stop functions for the Rtc Eventlog non-virtual.
>
> This is needed to prevent the Chromium import bot from breaking.
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/df6ecea8ac7c4c3bddeda089d5fb9eccdf38a0a6
> Cr-Commit-Position: refs/heads/master@{#13324}

TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2111803002
Cr-Commit-Position: refs/heads/master@{#13339}
2016-06-30 07:57:40 +00:00
17aac053f5 Add config to prune low-priority TURN ports for creating connections
When the flag prune_turn_ports is set, When a high-priority turn port becomes available, it will prune low-priority ones. The pruned port will not be used for creating connections locally and its candidates will not be sent over to the remove side (unless they have been sent before being pruned).

This effectively reduces the number of TURN candidates and connections created by TURN ports.

BUG=
R=deadbeef@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2093623004 .

Cr-Commit-Position: refs/heads/master@{#13335}
2016-06-30 04:42:05 +00:00
df6ecea8ac Fix to make the start/stop functions for the Rtc Eventlog non-virtual.
This is needed to prevent the Chromium import bot from breaking.

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2107253002 .

Cr-Commit-Position: refs/heads/master@{#13324}
2016-06-29 15:31:07 +00:00
1895526c61 Move RtcEventLog object from inside VoiceEngine to Call.
In addition to moving the logging object itself, this also moves the interface from PeerConnectionFactory to PeerConnection, which makes more sense for this functionality. An API parameter to set an upper limit to the size of the logfile is introduced.
The old interface on PeerConnectionFactory is not removed in this CL, because it is called from Chrome, it will be removed after Chrome is updated to use the PeerConnection interface.

BUG=webrtc:4741,webrtc:5603,chromium:609749
R=solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1748403002 .

Cr-Commit-Position: refs/heads/master@{#13321}
2016-06-29 11:57:01 +00:00
f9da44dbcf RTCPeerConnectionInterface.mm createNativeConfiguration and other clean-up.
This CL turns nativeConfiguration into createNativeConfiguration returning a
pointer or nil on failure. This method's certificate generation is updated to
use the new API and reports failure (nil) if unsuccessful instead of relying on
the default certificate. We also remove the implicit assumption (now incorrect)
that RSA is the default. This is the same type of changes as was done in
https://codereview.webrtc.org/1965313002 but this file
(RTCPeerConnectionInterface.mm) was forgotten.

With no more usages of kIdentityName it and dtlsidentitystore.cc is removed.
Also removes unnecessary #include in peerconnectioninterface.h that was still
remnant due to an indirect include of kIdentityName.

RTCConfiguration+Private.h now lists method nativeEncryptionKeyTypeForKeyType
which was added in the above mentioned prior CL.

BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2035473004
Cr-Commit-Position: refs/heads/master@{#13089}
2016-06-09 10:18:35 +00:00
d79599d74a Turning FakeDtlsIdentityStore into FakeRTCCertificateGenerator.
This is one less DtlsIdentityStoreInterface implementation, and one step closer
to removing this interface in favor of RTCCertificateGeneratorInterface.

This also removes PeerConnectionInterface::CreatePeerConnectionWithStore which
is no longer needed.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2020623002 .

Cr-Commit-Position: refs/heads/master@{#12990}
2016-06-01 11:59:01 +00:00
d03c23b216 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConneciton, is
updated to take a generator instead of a store.
  Many unittests still use a store, to allow them to continue to do so the
factory gets CreatePeerConnectionWithStore which uses the old function
signature (and invokes the new signature by wrapping the store in an
RTCCertificateGeneratorStoreWrapper). As soon as the FakeDtlsIdentityStore is
turned into a certificate generator instead of a store, the unittests will be
updated and we can remove CreatePeerConnectionWithStore.

This is a reupload of https://codereview.webrtc.org/2013523002/ with minor
changes.

BUG=webrtc:5707, webrtc:5708
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2017943002 .

Cr-Commit-Position: refs/heads/master@{#12984}
2016-06-01 09:44:29 +00:00
603470576e Add a flag to filter out high-cost networks.
This allows webrtc to not gather on cellular networks if wifi or
other low cost networks are present.
BUG=

Review-Url: https://codereview.webrtc.org/1987833002
Cr-Commit-Position: refs/heads/master@{#12979}
2016-06-01 01:29:18 +00:00
98cde26c78 Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel.
This will make it much less likely for application developers to not
realize the object is reference counted.

It also fixes a bug in the Java PeerConnection binding, by allowing a
reference to be transferred in the OnRemoveStream call via std::move.

BUG=webrtc:5128
R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1972793003 .

Cr-Commit-Position: refs/heads/master@{#12976}
2016-05-31 20:02:30 +00:00
d7973ccdb5 Revert of Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface. (patchset #2 id:20001 of https://codereview.webrtc.org/2013523002/ )
Reason for revert:
There are more CreatePeerConnection calls than I anticipated/had found in Chromium, like remoting/protocol/webrtc_transport.cc. Reverting due to broken Chromium FYI bots.

Original issue's description:
> Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
>
> The store was used in WebRtcSessionDescriptionFactory to generate certificates,
> now a generator is used instead (new API). PeerConnection[Factory][Interface],
> and WebRtcSession are updated to pass generators all the way down to the
> WebRtcSessionDescriptionFactory instead of stores.
>
> The webrtc implementation of a generator, RTCCertificateGenerator, is used as
> the default generator (peerconnectionfactory.cc:189) instead of the webrtc
> implementation of a store, DtlsIdentityStoreImpl.
>   The generator is fully parameterized and does not generate RSA-1024 unless you
> ask for it (which makes sense not to do beforehand since ECDSA is now default).
> The store was not fully parameterized (known filed bug).
>
> The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
> updated to take a generator instead of a store. But as to not break Chromium,
> the old function signature taking a store is kept. It is implemented to invoke
> the generator version by wrapping the store in an
> RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
> new function signature we can remove the old CreatePeerConnection.
>   Due to having multiple CreatePeerConnection signatures, some calling places
> are updated to resolve the ambiguity introduced.
>
> BUG=webrtc:5707, webrtc:5708
> R=phoglund@webrtc.org, tommi@webrtc.org
> TBR=tkchin@webrc.org
>
> Committed: 400781a209

TBR=tkchin@webrtc.org,tommi@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2020633002
Cr-Commit-Position: refs/heads/master@{#12948}
2016-05-27 13:08:58 +00:00
400781a209 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
updated to take a generator instead of a store. But as to not break Chromium,
the old function signature taking a store is kept. It is implemented to invoke
the generator version by wrapping the store in an
RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
new function signature we can remove the old CreatePeerConnection.
  Due to having multiple CreatePeerConnection signatures, some calling places
are updated to resolve the ambiguity introduced.

BUG=webrtc:5707, webrtc:5708
R=phoglund@webrtc.org, tommi@webrtc.org
TBR=tkchin@webrc.org

Review URL: https://codereview.webrtc.org/2013523002 .

Cr-Commit-Position: refs/heads/master@{#12947}
2016-05-27 12:52:06 +00:00
2ccfbdf011 Undeprecate CreatePeerConnectionFactory which do not use network thread.
function was deprecated in https://codereview.webrtc.org/1968393002/
in favor of splitting network thread from worker thread.

TBR=pthatcher1
BUG=webrtc:5645

Review URL: https://codereview.webrtc.org/1981273002 .

Cr-Commit-Position: refs/heads/master@{#12768}
2016-05-17 09:38:48 +00:00
e9021a3601 Propogate network-worker thread split to api
BUG=webrtc:5645

Review-Url: https://codereview.webrtc.org/1968393002
Cr-Commit-Position: refs/heads/master@{#12767}
2016-05-17 08:52:06 +00:00
c1513ee1a3 Add a parameter to set a maximum file size when starting an RTC event log on the PeerConnectionFactory API.
The caller can set a negative or zero file size to avoid using a limit.
BUG=

Review-Url: https://codereview.webrtc.org/1974453002
Cr-Commit-Position: refs/heads/master@{#12730}
2016-05-13 15:30:44 +00:00
a1c303535f Relanding: Implement RTCConfiguration.iceCandidatePoolSize.
Depends on this CL in order to work in Chromium:
https://codereview.chromium.org/1976673002/

It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).

This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.

R=pthatcher@webrtc.org

Committed: 48e9d05f51

Review URL: https://codereview.webrtc.org/1956453003 .

Cr-Commit-Position: refs/heads/master@{#12729}
2016-05-13 15:15:20 +00:00
c55fb30649 Revert of Implement RTCConfiguration.iceCandidatePoolSize. (patchset #7 id:120001 of https://codereview.webrtc.org/1956453003/ )
Reason for revert:
Breaks remoting_unittests. They defined their own operator== which conflicts with this one.

I'll remove the operator== in a roll CL. But until it's approved, I'm reverting this so the FYI bots will pass.

Original issue's description:
> Implement RTCConfiguration.iceCandidatePoolSize.
>
> It works by creating pooled PortAllocatorSessions which can be picked up
> by a P2PTransportChannel when needed (after a local description is set).
>
> This can optimize candidate gathering time when there is some time between
> creating a PeerConnection and setting a local description.
>
> R=pthatcher@webrtc.org
>
> Committed: 48e9d05f51

TBR=pthatcher@webrtc.org,honghaiz@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/1972043004
Cr-Commit-Position: refs/heads/master@{#12709}
2016-05-12 19:51:45 +00:00
48e9d05f51 Implement RTCConfiguration.iceCandidatePoolSize.
It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).

This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.

R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1956453003 .

Cr-Commit-Position: refs/heads/master@{#12708}
2016-05-12 17:19:44 +00:00
d1fe281e12 Replace scoped_ptr with unique_ptr in webrtc/api/
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1930463002

Cr-Commit-Position: refs/heads/master@{#12530}
2016-04-27 13:47:40 +00:00
c36b31b78e Embed a cricket::MediaConfig in RTCConfiguration.
This eliminates some instances rtc:Optional and makes the code
simpler. No changes in defaults or other behaviour are intended.

BUG=webrtc:4906

Review URL: https://codereview.webrtc.org/1818033002

Cr-Commit-Position: refs/heads/master@{#12326}
2016-04-12 06:25:34 +00:00
71bdda0ede Add RTCConfiguration getter and setter methods. The immediate plan is to move some flags into an embedded MediaConfig (https://codereview.webrtc.org/1818033002/), which will be possible after Chrome is updated to use these new setter methods.
BUG=webrtc:4906
R=hbos@google.com, hbos@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1836083003 .

Cr-Commit-Position: refs/heads/master@{#12177}
2016-03-31 11:00:08 +00:00
a8415fe9ea Adding comments about threading around CreatePeerConnectionFactory.
This has confused a lot of developers (understandably).

R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1828463002 .

Cr-Commit-Position: refs/heads/master@{#12105}
2016-03-23 17:38:16 +00:00
7fb69db670 Reland the CL to remove candidates when doing continual gathering
When doing candidate re-gathering in the same ICE generation, signal the remote side to remove its remote candidates.

Fixed the pure virtual method in jsep.h

BUG=
R=glaznev@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1788703003 .

Cr-Commit-Position: refs/heads/master@{#11985}
2016-03-14 18:59:34 +00:00
6f59a4fc4f Revert of Remove candidates when doing continual gathering (patchset #15 id:560001 of https://codereview.webrtc.org/1648813004/ )
Reason for revert:
Breaks the build.  Suggest we reland with a default implementation of the new method, update Chrome, land a change that changes |{}| -> |= 0;|

Here's the error:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=262839-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DOSX -DWEBRTC_MAC -DWEBRTC_POSIX -DXML_STATIC -DWEBRTC_CHROMIUM_BUILD -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/khronos -I../../gpu -I../../skia/config -Igen/angle -I../../third_party/WebKit/Source -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -Igen/ui/resources -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/WebKit -I../../ipc -I../../third_party/opus/src/include -I../../third_party/WebKit -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../v8/include -I../../third_party/webrtc_overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../third_party -I../../third_party/expat/files/lib -I../../third_party/libvpx/source/libvpx -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -fcolor-diagnostics -fno-strict-aliasing  -c ../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc -o obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o
../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc:404:14: error: allocating an object of abstract class type 'content::MockSessionDescription'
  return new MockSessionDescription(type, sdp);
             ^
../../third_party/webrtc/api/jsep.h💯18: note: unimplemented pure virtual method 'RemoveCandidates' in 'MockSessionDescription'
  virtual size_t RemoveCandidates(
                 ^
1 error generated.
ninja: build stopped: subcommand failed.

Original issue's description:
> When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
> and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.
>
> BUG=
>
> Committed: https://crrev.com/84430da6817ce69c53bfad088be5c9df8b420f01
> Cr-Commit-Position: refs/heads/master@{#11958}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,glaznev@webrtc.org,honghaiz@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.webrtc.org/1785613011

Cr-Commit-Position: refs/heads/master@{#11960}
2016-03-11 22:05:15 +00:00
84430da681 When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.

BUG=

Review URL: https://codereview.webrtc.org/1648813004

Cr-Commit-Position: refs/heads/master@{#11958}
2016-03-11 21:28:12 +00:00
a3ede6c510 Renamed VideoSourceInterface to VideoTrackSourceInterface.
Moved VideoSourceInterface to MediaStreamInterface.h
Renamed VideoSourceTest to VideoCapturerTrackSourceTest
Renamed VideoSource to VideoCaptureTrackSource and cl lint and cl format.
BUG=webrtc:5426
TBR=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1770003002 .

Cr-Commit-Position: refs/heads/master@{#11893}
2016-03-08 00:28:03 +00:00
hta
a2a49d9d9c This CL provides interfaces that do not use constraints for
all interfaces that formerly took constraints parameters
in name=value form.

This is in preparation for making Chrome only use these
explicit interfaces.

BUG=webrtc:4906

Review URL: https://codereview.webrtc.org/1717583002

Cr-Commit-Position: refs/heads/master@{#11870}
2016-03-04 10:51:44 +00:00
36f0137fd5 Implement Turn/Turn first logic for connection selection.
This feature is off by default and can be turned on by setting IceConfig. When turned on, we'll choose a Turn/Turn (UDP takes higher priroity) over the other types of connections while no any connection is writable. However, when there is best connection or there is pending triggered check, those will take higher priority.

BUG=webrtc:4591

Review URL: https://codereview.webrtc.org/1577233006

Cr-Commit-Position: refs/heads/master@{#11850}
2016-03-03 02:02:58 +00:00
b24317bfda Fix license headers in webrtc/api.
In addition to the code moved from talk/app/webrtc
there were some files in webrtc/api/objctests that still
had the libjingle license header.

BUG=webrtc:5418
TBR=tkchin@webrtc.org
NOTRY=True

Review URL: https://codereview.webrtc.org/1680293005

Cr-Commit-Position: refs/heads/master@{#11552}
2016-02-10 15:54:53 +00:00
15583c19d7 Move talk/app/webrtc to webrtc/api
The previously disabled warnings that were inherited from
talk/build/common.gypi are now replaced by target-specific disabling
of only the failing warnings. Additional disabling was needed since the stricter
compilation warnings that applies to code in webrtc/.

License headers will be updated in a follow-up CL.

Other modifications:
* Updated the header guards.
* Sorted the includes using chromium/src/tools/sort-headers.py
  except for these files:
  talk/app/webrtc/peerconnectionendtoend_unittest.cc
  talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
  talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
  webrtc/media/devices/win32devicemanager.cc

The HAVE_SCTP define was added for the peerconnection_unittests target
in api_tests.gyp.

I also checked that none of
SRTP_RELATIVE_PATH
HAVE_SRTP
HAVE_WEBRTC_VIDEO
HAVE_WEBRTC_VOICE
were used by the talk/app/webrtc code.

For Chromium, the following changes will need to be applied to the roll CL that updates the
DEPS for WebRTC and libjingle:
https://codereview.chromium.org/1615433002

BUG=webrtc:5418
NOPRESUBMIT=True
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1610243002 .

Cr-Commit-Position: refs/heads/master@{#11545}
2016-02-10 09:53:26 +00:00