493 Commits

Author SHA1 Message Date
sakal
a973f95386 Remove restart method from VideoTrackSourceInterface.
This method is no longer needed.

Review-Url: https://codereview.webrtc.org/2306013002
Cr-Commit-Position: refs/heads/master@{#14060}
2016-09-03 17:29:11 +00:00
Honghai Zhang
aecd982a6f Change a few configurations in AggressiveConfiguration
Set bundle policy to max bundle.
Set rtcp mux policy to required.
Set enable ice renomination to true.
This configuration is used by native applications.

R=pthatcher@webrtc.org, skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14057}
2016-09-02 23:58:28 +00:00
Alex Glaznev
c55c39ddf7 Limit initial fps value used in Android HW encoder initialization.
BUG=b/30951236
R=magjed@webrtc.org, wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14054}
2016-09-02 19:16:39 +00:00
johan
79c6458575 Provide a default implementation for PeerConnectionInterface::ice_state().
Default implementation is necessary to remove implementations in
downstream unit test mocks. Method will be entirely removed in upcomming
reland of https://codereview.webrtc.org/2256663002/ .

BUG=webrtc:6299

Review-Url: https://codereview.webrtc.org/2306833003
Cr-Commit-Position: refs/heads/master@{#14053}
2016-09-02 19:07:43 +00:00
sakal
504e838be2 Move getSupportedFormats from capturer interface to camera enumerator.
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2308493002
Cr-Commit-Position: refs/heads/master@{#14047}
2016-09-02 12:58:15 +00:00
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
sakal
4b2be9739b Remove VideoSource.stop() and VideoSource.restart() from the Java API.
These methods are not used by the new AndroidVideoTrackSource API.

Review-Url: https://codereview.webrtc.org/2280873002
Cr-Commit-Position: refs/heads/master@{#14036}
2016-09-02 08:10:39 +00:00
Honghai Zhang
f7ddc06a43 Use AggressiveConfiguration as the default configuration in IOS
R=haysc@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14030}
2016-09-01 22:34:12 +00:00
sakal
8a2098cb8d Fix a race condition where Camera2Session forgot to return the texture frame when closing the camera.
BUG=b/31201445

Review-Url: https://codereview.webrtc.org/2289303005
Cr-Commit-Position: refs/heads/master@{#14015}
2016-09-01 09:07:09 +00:00
arsany
b75f2541c9 Create Android screen capturer.
Review-Url: https://codereview.webrtc.org/2276593003
Cr-Commit-Position: refs/heads/master@{#14010}
2016-09-01 01:51:01 +00:00
Honghai Zhang
4cedf2b78c Add signaling to support ICE renomination.
By default, this will tell the remote side that I am supporting ICE renomination.
It does not use ICE renomination yet even if the remote side supports it.

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

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

Cr-Commit-Position: refs/heads/master@{#13998}
2016-08-31 15:18:22 +00:00
hbos
0e6758d7ef RTCStatsCollector: timestamps updated.
Using a timestamp based on a timer that is monotonically increasing for
the cache, so that cache's freshness can be checked regardless of if
system clock is modified.

Using a system clock for the stats' timestamp, which needs to be
relative to UNIX epoch (Jan 1, 1970, UTC).

This CL removes the dependency on faketiming.h.

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2299643002
Cr-Commit-Position: refs/heads/master@{#13997}
2016-08-31 14:57:44 +00:00
kjellander
a69d973267 Move webrtc/audio_*.h to webrtc/api/call
BUG=webrtc:5878
NOTRY=True

Review-Url: https://codereview.webrtc.org/2059703002
Cr-Commit-Position: refs/heads/master@{#13996}
2016-08-31 14:33:14 +00:00
sakal
9e4a3040ed Reland of move the old AndroidVideoCapturer stack code. (patchset #1 id:1 of https://codereview.webrtc.org/2291583002/ )
Reason for revert:
Downstream apps should now be fixed.

Original issue's description:
> Revert of Remove the old AndroidVideoCapturer stack code. (patchset #2 id:20001 of https://codereview.webrtc.org/2235893003/ )
>
> Reason for revert:
> Breaks downstream.
>
> Original issue's description:
> > Remove the old AndroidVideoCapturer stack code.
> >
> > This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/
> >
> > Committed: https://crrev.com/1b365a8db070f9cdcbf35ec871f758dcd909e51d
> > Cr-Commit-Position: refs/heads/master@{#13950}
>
> TBR=magjed@webrtc.org,glaznev@webrtc.org,kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/e39f251dacf66e50153bcda615f06b7c59e5856b
> Cr-Commit-Position: refs/heads/master@{#13958}

TBR=magjed@webrtc.org,glaznev@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.webrtc.org/2298063003
Cr-Commit-Position: refs/heads/master@{#13988}
2016-08-31 09:53:54 +00:00
Honghai Zhang
bfd398ccda Add a switch to redetermine role when ICE restarts.
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13982}
2016-08-31 05:07:56 +00:00
hbos
6a60e70266 Making hbos and hta OWNERS of webrtc/api/rtcstats*.
hbos and hta are webrtc/stats/ OWNERS. Public api headers relating to
rtcstats are placed in webrtc/api/ and implementations are placed in
webrtc/stats/. This ownership allows the rtcstats owners to own both .cc
and .h files.

For example, rtcstats.[h/cc] and rtcstatsreport.[h/cc].
(Soon there will also be rtcstats_objects.[h/cc] and more.)

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2294693002
Cr-Commit-Position: refs/heads/master@{#13981}
2016-08-30 21:51:19 +00:00
hbos
d565b73121 RTCStatsCollector and RTCPeerConnectionStats added.
This is the stats collector for the new stats types, RTCStats[1] and
RTCStatsReport[2]. It so far only produces RTCPeerConnectionStats[3] as
an example of how it would collect stats. Each RTCStats subclass will
get a corresponding RTCStatsCollector::ProduceFooStats().

Stats reports are cached and returned as const references (ref
counting). This allows stats to be inspected by multiple observers and
across multiple threads. No copies will have to be made when surfacing
this to Blink or other places.

The current implementation of ProducePeerConnectionStats() only look at
existing DataChannels. This might be incorret if data channels can be
removed? Will investigate in a follow-up, crbug.com/636818.

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#idl-def-rtcstats
[2] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstatsreport-object
[3] https://w3c.github.io/webrtc-stats/archives/20160526/webrtc-stats.html#pcstats-dict*

BUG=chromium:627816, chromium:636818

Review-Url: https://codereview.webrtc.org/2242043002
Cr-Commit-Position: refs/heads/master@{#13979}
2016-08-30 21:04:40 +00:00
perkj
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
johan
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
sakal
e39f251dac Revert of Remove the old AndroidVideoCapturer stack code. (patchset #2 id:20001 of https://codereview.webrtc.org/2235893003/ )
Reason for revert:
Breaks downstream.

Original issue's description:
> Remove the old AndroidVideoCapturer stack code.
>
> This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/
>
> Committed: https://crrev.com/1b365a8db070f9cdcbf35ec871f758dcd909e51d
> Cr-Commit-Position: refs/heads/master@{#13950}

TBR=magjed@webrtc.org,glaznev@webrtc.org,kjellander@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/2291583002
Cr-Commit-Position: refs/heads/master@{#13958}
2016-08-29 14:31:31 +00:00
hbos
6d183ac27a RTCStatsReport: Take ownership of other's stats with TakeMembersFrom
This would make it possible to gather stats on multiple threads, store
the results in multiple reports and to merge the results.

Added rtcstatsreport_unittest.cc, moving a RTCStatsReport-related test
from rtcstats_unittest.cc. Added more unittests covering the order of
stats and TakeMembersFrom.

Also changed RTCStatsReport[] to RTCStatsReport::Get to avoid
confusion with other usages of the [] operator.

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2278433003
Cr-Commit-Position: refs/heads/master@{#13957}
2016-08-29 14:20:39 +00:00
sakal
1b365a8db0 Remove the old AndroidVideoCapturer stack code.
This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/

Review-Url: https://codereview.webrtc.org/2235893003
Cr-Commit-Position: refs/heads/master@{#13950}
2016-08-29 09:20:26 +00:00
nisse
de04f8e10e Reland of Delete method cricket::VideoFrame::Copy. (patchset #1 id:1 of https://codereview.webrtc.org/2275313003/ )
Reason for revert:
Fixed downstream issue.

Original issue's description:
> Revert of Delete method cricket::VideoFrame::Copy. (patchset #3 id:210001 of https://codereview.webrtc.org/2275243002/ )
>
> Reason for revert:
> Again, brakes a downstream build by removing VideoFrame::Copy method.
>
> Original issue's description:
> > Reland of Delete method cricket::VideoFrame::Copy. (patchset #1 id:1 of https://codereview.webrtc.org/2087923004/ )
> >
> > Reason for revert:
> > Downstream issue now fixed.
> >
> > Original issue's description:
> > > Revert of Delete method cricket::VideoFrame::Copy. (patchset #7 id:120001 of https://codereview.webrtc.org/2080253002/ )
> > >
> > > Reason for revert:
> > > It broke a downstream build by removing VideoFrame::Copy method.
> > >
> > > Original issue's description:
> > > > Delete method cricket::VideoFrame::Copy.
> > > >
> > > > Should be unused in Chrome since cl
> > > > https://codereview.chromium.org/2068703002/
> > > >
> > > > TBR=tkchin@webrtc.org,magjed@webrtc.org
> > > > BUG=webrtc:5682
> > > >
> > > > Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
> > > > Committed: https://crrev.com/7e4e00d189a5dfac2b463a5100ee65ee2f11ed79
> > > > Cr-Original-Commit-Position: refs/heads/master@{#13236}
> > > > Cr-Commit-Position: refs/heads/master@{#13244}
> > >
> > > TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,nisse@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:5682
> > >
> > > Committed: https://crrev.com/123f33cd009606d22cca8b0f4756812406d4580f
> > > Cr-Commit-Position: refs/heads/master@{#13246}
> >
> > TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/f715f983f1b33208ab2d2434f8b36ad5271f680f
> > Cr-Commit-Position: refs/heads/master@{#13924}
>
> TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/91b03b0ff8c480e4245835c7a4a93733aac534a6
> Cr-Commit-Position: refs/heads/master@{#13925}

TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org,philipel@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2287223002
Cr-Commit-Position: refs/heads/master@{#13949}
2016-08-29 09:07:01 +00:00
ehmaldonado
d02fe4b53b GN: Fix windows clang errors. Attempt 2.
BUG=webrtc:6255
NOTRY=True

Review-Url: https://codereview.webrtc.org/2281513002
Cr-Commit-Position: refs/heads/master@{#13942}
2016-08-26 20:31:34 +00:00
zhihuang
d82eee0675 Log how often DTLS negotiation failed because of incompatible ciphersuites.
Log the DTLS handshake error code in OpenSSLStreamAdapter.
Forward the error code to WebRTCSession with the Signals.
This part is only for the WebRTC native code.
To make it work, need another CL for Chromium.

BUG=webrtc:5959

Review-Url: https://codereview.webrtc.org/2167363002
Cr-Commit-Position: refs/heads/master@{#13940}
2016-08-26 18:25:09 +00:00
philipel
91b03b0ff8 Revert of Delete method cricket::VideoFrame::Copy. (patchset #3 id:210001 of https://codereview.webrtc.org/2275243002/ )
Reason for revert:
Again, brakes a downstream build by removing VideoFrame::Copy method.

Original issue's description:
> Reland of Delete method cricket::VideoFrame::Copy. (patchset #1 id:1 of https://codereview.webrtc.org/2087923004/ )
>
> Reason for revert:
> Downstream issue now fixed.
>
> Original issue's description:
> > Revert of Delete method cricket::VideoFrame::Copy. (patchset #7 id:120001 of https://codereview.webrtc.org/2080253002/ )
> >
> > Reason for revert:
> > It broke a downstream build by removing VideoFrame::Copy method.
> >
> > Original issue's description:
> > > Delete method cricket::VideoFrame::Copy.
> > >
> > > Should be unused in Chrome since cl
> > > https://codereview.chromium.org/2068703002/
> > >
> > > TBR=tkchin@webrtc.org,magjed@webrtc.org
> > > BUG=webrtc:5682
> > >
> > > Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
> > > Committed: https://crrev.com/7e4e00d189a5dfac2b463a5100ee65ee2f11ed79
> > > Cr-Original-Commit-Position: refs/heads/master@{#13236}
> > > Cr-Commit-Position: refs/heads/master@{#13244}
> >
> > TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,nisse@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/123f33cd009606d22cca8b0f4756812406d4580f
> > Cr-Commit-Position: refs/heads/master@{#13246}
>
> TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5682
>
> Committed: https://crrev.com/f715f983f1b33208ab2d2434f8b36ad5271f680f
> Cr-Commit-Position: refs/heads/master@{#13924}

TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org,nisse@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2275313003
Cr-Commit-Position: refs/heads/master@{#13925}
2016-08-25 14:08:19 +00:00
nisse
f715f983f1 Reland of Delete method cricket::VideoFrame::Copy. (patchset #1 id:1 of https://codereview.webrtc.org/2087923004/ )
Reason for revert:
Downstream issue now fixed.

Original issue's description:
> Revert of Delete method cricket::VideoFrame::Copy. (patchset #7 id:120001 of https://codereview.webrtc.org/2080253002/ )
>
> Reason for revert:
> It broke a downstream build by removing VideoFrame::Copy method.
>
> Original issue's description:
> > Delete method cricket::VideoFrame::Copy.
> >
> > Should be unused in Chrome since cl
> > https://codereview.chromium.org/2068703002/
> >
> > TBR=tkchin@webrtc.org,magjed@webrtc.org
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
> > Committed: https://crrev.com/7e4e00d189a5dfac2b463a5100ee65ee2f11ed79
> > Cr-Original-Commit-Position: refs/heads/master@{#13236}
> > Cr-Commit-Position: refs/heads/master@{#13244}
>
> TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/123f33cd009606d22cca8b0f4756812406d4580f
> Cr-Commit-Position: refs/heads/master@{#13246}

TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,honghaiz@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2275243002
Cr-Commit-Position: refs/heads/master@{#13924}
2016-08-25 13:30:22 +00:00
hbos
e29352bb34 Refactor certificate stats collection, added SSLCertificateStats.
The code that extracts certificate stats from an SSLCertificate and its
certificate chain is moved into SSLCertificate::GetStats. The stats
collector code loops through the resulting SSLCertificateStats and
creates the StatsReports for those stats.

This will allow the new stats collector to reuse GetStats in a future
CL.

BUG=chromium:627816, chromium:629436

Review-Url: https://codereview.webrtc.org/2259283002
Cr-Commit-Position: refs/heads/master@{#13917}
2016-08-25 10:52:46 +00:00
deadbeef
b60a8198f1 Fixing inconsistency with behavior of ClearGettingPorts.
I found that, depending on when it's called, ClearGettingPorts may or
may not signal CandidatesAllocationDone, and may or may not continue
to gather more ports/candidates.

I'm fixing this inconsistency by having it always signal
CandidatesAllocationDone (if needed), and always stop gathering until
the next network change event. This makes it equivalent to
StopGettingPorts, except that it allows gathering to be restarted if
a network change occurs.

I also found that P2PTransportChannel was signaling "gathering
complete" even when continual gathering was enabled. This wasn't caught
by the unit tests due to the inconsistency of ClearGettingPorts as
described above.

Review-Url: https://codereview.webrtc.org/2124283003
Cr-Commit-Position: refs/heads/master@{#13908}
2016-08-24 22:15:07 +00:00
Taylor Brandstetter
1d7a637340 Fixing off-by-one error with max SCTP id.
Normally, when creating a data channel with an out-of-range ID,
createDataChannel returns nullptr. But due to an off-by-one
error, creating a data channel with ID 1023 returns a data channel
that silently fails later.

This probably occurred because it wasn't clear whether "kMaxSctpSid" was an
inclusive or exclusive maximum, so I changed the value to
"kMaxSctpStreams". This wasn't caught by unit tests because the
off-by-one error persisted to the unit tests as well.

Also getting rid of some dead code. We were adding SCTP streams to the
ContentDescription object but they weren't being used.

BUG=619849
R=pthatcher@webrtc.org, skvlad@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13906}
2016-08-24 20:15:35 +00:00
hbos
615d3013de RTCStats and RTCStatsReport added (webrtc/stats).
The old and new getStats are very different. This CL proposes rewriting
the new getStats from scratch with a bottom-up approach, starting with
the fundamental stats classes. This will allow cleaner and more
efficient code that is more aligned with the spec.

RTCStats and subclasses are the equivalent to RTCStats and RTCStats-
-derived dictionaries from the specs[1][2]. The dictionary members are
public member variables of type RTCStatsMember<T>, where T is one of the
supported types. All members derive from RTCStatsMemberInterface and
iteration of members is possible with RTCStats::Members().
The members are not stored in a map for performance and readability.
Type checking is supported with static class variables, kType.

Only the supported member types T are specialized and may be
instantiated, and sequences are supported with std::vector<...>. Type
checking is again supported with static class variables, kType.

RTCStatsReport is the equivalent from the spec[3], and maps RTCStats::id
to RTCStats-objects. RTCStatsReport is reference counted. It and its
contained stats may be destroyed on any thread. When the
RTCStatsCollector is added in a follow-up CL, it will return const
references to the RTCStatsReports. This means copies don't have to be
made for multiple stats observers or when jumping threads. In fact, no
copies of any stats will have to be made in surfacing stats to Blink.

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstats-dictionary
[2] https://w3c.github.io/webrtc-stats/archives/20160526/webrtc-stats.html
[3] https://www.w3.org/TR/2016/WD-webrtc-20160531/#rtcstatsreport-object

This adds the new folder webrtc/stats/, with target rtc_stats and binary
rtc_stats_unittests. Public api headers are placed in webrtc/api/ and
.cc files are placed in webrtc/stats/.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2241093002
Cr-Commit-Position: refs/heads/master@{#13879}
2016-08-24 08:33:19 +00:00
sakal
a53fa0a25b Fix AppRTC Android Demo GN build when is_component_build=true.
BUG=webrtc:6174
NOTRY=True

Review-Url: https://codereview.webrtc.org/2270003002
Cr-Commit-Position: refs/heads/master@{#13876}
2016-08-24 07:48:30 +00:00
kjellander
b37c45cadc GN: Add libjingle_peerconnection_java to peerconnection_unittests.
This dependency was found missing since it's defined in
https://cs.chromium.org/chromium/src/third_party/webrtc/build/android_tests.gyp?rcl=0&l=129
which causes many of the tests to crash with org.webrtc.AudioTrack class
not being found.

BUG=webrtc:5949
TBR=ehmaldonado@webrtc.org
NOTRY=True
TESTED=Passing local run of peerconnection_unittests on Android.

Review-Url: https://codereview.webrtc.org/2268973003
Cr-Commit-Position: refs/heads/master@{#13867}
2016-08-23 19:55:49 +00:00
sakal
86ccd7bfba Revert of Add field_trial_default dependency to libjingle_peerconnection (patchset #3 id:40001 of https://codereview.webrtc.org/2120673004/ )
Reason for revert:
Breaks chromium.

Original issue's description:
> Add field_trial_default dependency to libjingle_peerconnection
>
> This is needed for webrtc::field_trial::FindFullName in peerconnection.cc
>
> NOTRY=True
>
> Committed: https://crrev.com/a7a01df2aebe7108afad208ccd0341c2f0bc7b3b
> Cr-Commit-Position: refs/heads/master@{#13836}

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

Review-Url: https://codereview.webrtc.org/2263063002
Cr-Commit-Position: refs/heads/master@{#13837}
2016-08-22 07:26:11 +00:00
arlolra
a7a01df2ae Add field_trial_default dependency to libjingle_peerconnection
This is needed for webrtc::field_trial::FindFullName in peerconnection.cc

NOTRY=True

Review-Url: https://codereview.webrtc.org/2120673004
Cr-Commit-Position: refs/heads/master@{#13836}
2016-08-22 06:48:14 +00:00
sakal
294fb050a0 Add a timeout for starting the camera on CameraCapturer.
This allows to at least get a camera error back if the camera thread freezes. Application can use this as a signal to restart the program.

R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2257123002
Cr-Commit-Position: refs/heads/master@{#13830}
2016-08-19 10:02:44 +00:00
Taylor Brandstetter
9b5306c4ef Adding test for unordered, fragmented SCTP message delivery.
This functionality broke after a recent usrsctp roll. This test would be
useful in catching issues that arise in the future.

BUG=633959
R=honghaiz@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13823}
2016-08-18 18:40:45 +00:00
magjed
235020dba6 Roll chromium_revision 915e47250f..e3860bd297 (412201:412289)
Change log: 915e47250f..e3860bd297
Full diff: 915e47250f..e3860bd297

No dependencies changed.
No update to Clang.

NOTRY=TRUE
TBR=
BUG=webrtc:6219

Review-Url: https://codereview.webrtc.org/2253973002
Cr-Commit-Position: refs/heads/master@{#13809}
2016-08-18 08:45:53 +00:00
Alex Glaznev
869dab775c Disable Intel VP8 HW encoder.
Need to investigate dequeueOutputBuffer failure on Asus
Zenfones before re-enabling back.

BUG=b/30890961
R=jiayl@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#13805}
2016-08-17 22:41:22 +00:00
Alex Glaznev
7c0f8ee67a Avoid null pointer exception if Android getCameraInfo fails.
BUG=b/30890971
R=magjed@webrtc.org, sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13803}
2016-08-17 22:18:27 +00:00
hbos
b24b1ceb48 Moving mock classes around so that they may be reused in other unittests
New files, classes moved from statscollector_unittest.cc:
+webrtc/api/test/mock_peerconnection.h
 for MockPeerConnectionFactory and MockPeerConnection
+webrtc/api/test/mock_webrtcsession.h
 for MockWebRtcSession
+webrtc/media/base/test/mock_mediachannel.h
 for MockVideoMediaChannel and MockVoiceMediaChannel

The webrtc/media/base/test folder is new.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2238933002
Cr-Commit-Position: refs/heads/master@{#13769}
2016-08-16 08:19:48 +00:00
maxmorin
88e31a3fd8 Fix warnings, simplify ADM.
This is in preparation for adding a gn target for audio_device_tests.

BUG=webrtc:6170,webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2222563002
Cr-Commit-Position: refs/heads/master@{#13768}
2016-08-16 07:56:14 +00:00
maxmorin
1aee0b5bd9 Remove old methods in AudioTransport, make it pass a gn build
when building with default warnings.

This is in preparation for making a gn target for audio_device_tests.

BUG=webrtc:6170, webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2219653004
Cr-Commit-Position: refs/heads/master@{#13759}
2016-08-15 18:46:28 +00:00
sakal
92c09509bd Make CameraCapturer.switchCamera try again if session is still opening.
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2238263002
Cr-Commit-Position: refs/heads/master@{#13747}
2016-08-15 13:19:40 +00:00
sakal
714dd4e532 GN: Update tests to have the correct shard timeout value on Android.
TBR=mflodman@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2231413002
Cr-Commit-Position: refs/heads/master@{#13741}
2016-08-15 09:29:19 +00:00
Taylor Brandstetter
4cb5b64b16 Fix for data channels perpetually stuck in "closing" state.
If the data transport is destroyed while data is buffered (due to
the PC being closed, or a description set with data rejected), the
data channel was getting stuck in a "closing" state, waiting to
finish sending its buffered data. But since there's no more transport,
it will never get another chance to send buffered data.

It just needs to terminate non-gracefully and discard the buffered data
in this situation.

R=skvlad@webrtc.org, zhihuang@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13737}
2016-08-12 17:10:42 +00:00
sakal
9591e3e82d Convert PeerConnectionTest to use the new capture APIs.
Review-Url: https://codereview.webrtc.org/2236323002
Cr-Commit-Position: refs/heads/master@{#13735}
2016-08-12 07:06:22 +00:00
sakal
d30e0ad3e7 Session based capturing for Camera2Capturer.
BUG=webrtc:6148
TBR=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2186253002
Cr-Commit-Position: refs/heads/master@{#13723}
2016-08-11 08:00:43 +00:00
ehmaldonado
3651d8f97f Add libjingle_peerconnection_unittest to GN targets.
BUG=webrtc:6037
NOTRY=True

Review-Url: https://codereview.webrtc.org/2226093003
Cr-Commit-Position: refs/heads/master@{#13703}
2016-08-10 10:10:53 +00:00
Alex Glaznev
0060c56b22 Catch exceptions thrown by getCodecInfoAt() and getCapabilitiesForType().
BUG=b/30715199
R=jiayl@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#13678}
2016-08-08 19:27:37 +00:00