Commit Graph

560 Commits

Author SHA1 Message Date
d93f50cd57 Add UMA metrics for ICE regathering reasons.
BUG=webrtc:6462
R=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14531}
2016-10-05 18:47:39 +00:00
62b1c35d30 Android: Move layout measure code from SurfaceViewRenderer to RendererCommon
BUG=webrtc:6470
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14526}
2016-10-05 13:56:17 +00:00
b20f38792e RTCStatsMember<bool> and RTCStatsMember<std::vector<bool>> added.
RTCStatsMemberInterface::Type's kBool and kSequenceBool.

This means that RTCStats-derived classes ("RTCStats-derived
dictionaries"[1]) can contain boolean and sequence of boolean members.

[1] https://w3c.github.io/webrtc-stats/

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2387343002
Cr-Commit-Position: refs/heads/master@{#14509}
2016-10-04 21:37:15 +00:00
5377bc77cc Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
2016-10-04 20:47:02 +00:00
6ab97ce0b9 RTCCertificateStats[1] added.
[1] https://w3c.github.io/webrtc-stats/#certificatestats-dict*

BUG=chromium:627816, chromium:629436
NOTRY=True

Review-Url: https://codereview.webrtc.org/2243123002
Cr-Commit-Position: refs/heads/master@{#14484}
2016-10-03 21:17:03 +00:00
07a224b2fa webrtc/api/stats/OWNERS file added.
hbos and hta are already OWNERS of webrtc/stats/ and of rtcstats* files
(per-file rtcstats*=) in webrtc/api/. When the webrtc/api/stats/ folder
was created we forgot to add this OWNERS file (per-file OWNERS does not
apply to subfolders apparently).

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2392633002
Cr-Commit-Position: refs/heads/master@{#14482}
2016-10-03 19:26:20 +00:00
8f9010631c Revert of Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (patchset #2 id:20001 of https://codereview.webrtc.org/2384693002/ )
Reason for revert:
This CL breaks FYI bots with a compile error.

Sample error:
jingle/glue/thread_wrapper.cc -o obj/jingle/jingle_glue/thread_wrapper.o
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:46:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<rtc::Thread *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(rtc::Thread::Current(), current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:102:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:81:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(this, JingleThreadWrapper::current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:5:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:82:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, rtc::Thread *>' requested here
  DCHECK_EQ(this, rtc::Thread::Current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:12:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
3 errors generated.

Original issue's description:
> Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
>
> The former is always defined (by webrtc/base/checks.h) to either 0 or
> 1, whereas the latter isn't necessarily defined.
>
> NOTRY=true
> BUG=webrtc:6451
>
> Committed: https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b
> Cr-Commit-Position: refs/heads/master@{#14474}

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

Review-Url: https://codereview.webrtc.org/2384083004
Cr-Commit-Position: refs/heads/master@{#14480}
2016-10-03 15:32:36 +00:00
65b42c251f Fix receiving H264 video from iPhone on Kitkat devices.
Changing this constant has been empirically proven to solve the issue.

BUG=webrtc:6455,b/31827852

Review-Url: https://codereview.webrtc.org/2382733006
Cr-Commit-Position: refs/heads/master@{#14479}
2016-10-03 15:07:06 +00:00
8f741e953c Change Camera1Enumerator to create a Camera1Capturer instead of VideoCapturerAndroid.
BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2356073003
Cr-Commit-Position: refs/heads/master@{#14478}
2016-10-03 15:06:05 +00:00
ab0b929321 Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

NOTRY=true
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2384693002
Cr-Commit-Position: refs/heads/master@{#14474}
2016-10-03 12:04:25 +00:00
fa10b557d9 Releand of Let ViEEncoder handle resolution changes.
The original landed cl is in patchset 1.
The following patchset fix VideoQualityTest as well as fix the case where max_bitrate is set in the SendParams. A unit test is added for that as well.

Original cl description:
Let ViEEncoder handle resolution changes.

This cl move codec reconfiguration due to video frame size changes from WebRtcVideoSendStream to ViEEncoder.

With this change, many variables in WebRtcVideoSendStream no longer need to be locked.

BUG=webrtc:5687, webrtc:6371, webrtc:5332

Review-Url: https://codereview.webrtc.org/2386573002
Cr-Commit-Position: refs/heads/master@{#14467}
2016-10-03 06:45:33 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
55d932b331 Add logging statements to places where the frame might be dropped in WebRTC pipeline.
BUG=b/31645554

Review-Url: https://codereview.webrtc.org/2361803003
Cr-Commit-Position: refs/heads/master@{#14457}
2016-09-30 13:19:12 +00:00
3b703ede8b Revert of Let ViEEncoder handle resolution changes. (patchset #17 id:340001 of https://codereview.webrtc.org/2351633002/ )
Reason for revert:
Fails on a content_browsertest (and also webrtc_perf?)

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/34336

https://build.chromium.org/p/client.webrtc/builders/Linux64%20Release%20%5Blarge%20tests%5D/builds/9091/steps/webrtc_perf_tests/logs/stdio
[  FAILED  ] FullStackTest.ParisQcifWithoutPacketLoss (59436 ms)

Original issue's description:
> Let ViEEncoder handle resolution changes.
>
> This cl move codec reconfiguration due to video frame size changes from WebRtcVideoSendStream to ViEEncoder.
>
> With this change, many variables in WebRtcVideoSendStream no longer need to be locked.
>
> BUG=webrtc:5687, webrtc:6371, webrtc:5332
>
> Committed: https://crrev.com/26105b41b4f97642ee30cb067dc786c2737709ad
> Cr-Commit-Position: refs/heads/master@{#14445}

TBR=sprang@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5687, webrtc:6371, webrtc:5332

Review-Url: https://codereview.webrtc.org/2383493005
Cr-Commit-Position: refs/heads/master@{#14447}
2016-09-30 06:25:46 +00:00
26105b41b4 Let ViEEncoder handle resolution changes.
This cl move codec reconfiguration due to video frame size changes from WebRtcVideoSendStream to ViEEncoder.

With this change, many variables in WebRtcVideoSendStream no longer need to be locked.

BUG=webrtc:5687, webrtc:6371, webrtc:5332

Review-Url: https://codereview.webrtc.org/2351633002
Cr-Commit-Position: refs/heads/master@{#14445}
2016-09-30 05:39:15 +00:00
606018600e Add presubmit format requirement for webrtc/api/android
BUG=webrtc:6419
NOTRY=True
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2377113003
Cr-Commit-Position: refs/heads/master@{#14435}
2016-09-29 12:36:03 +00:00
b6760f9e44 Format all Java in WebRTC.
BUG=webrtc:6419
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2377003002
Cr-Commit-Position: refs/heads/master@{#14432}
2016-09-29 11:12:51 +00:00
ff9793c600 Android: Remove onOutputFormatRequest from the VideoCapturer interface
Remove onOutputFormatRequest from the VideoCapturer interface and from
all implementations of that interface. Apps should now use
VideoSource.adaptOutputFormat() instead.

BUG=webrtc:6391

Review-Url: https://codereview.webrtc.org/2373353002
Cr-Commit-Position: refs/heads/master@{#14428}
2016-09-29 09:14:39 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
7e146cb97e Fixing heap read overflow when "sctp-port" is in a video description.
This added an SCTP codec, which is later re-interpreted as a video
codec. We shouldn't be adding codecs that don't match the type of the
media description.

BUG=chromium:648062

Review-Url: https://codereview.webrtc.org/2354723002
Cr-Commit-Position: refs/heads/master@{#14421}
2016-09-28 17:04:41 +00:00
478681e1e6 Move the QP scaling thresholds to the relevant encoders.
Also provide a new set of thresholds for the VideoToolbox encoder. The new thresholds were experimentally determined to work well on the iPhone 6S, and also adequately on the iPhone 5S.

BUG=webrtc:5678

Review-Url: https://codereview.webrtc.org/2309743002
Cr-Commit-Position: refs/heads/master@{#14420}
2016-09-28 15:17:51 +00:00
b7446d7101 GN: Fix incorrect include_dir for libjingle_peerconnection_jni target
BUG=webrtc:6412
NOTRY=True

Review-Url: https://codereview.webrtc.org/2376753003
Cr-Commit-Position: refs/heads/master@{#14410}
2016-09-28 07:47:59 +00:00
e87d6734ea Return texture frame when dropping frames in CameraCapturer.
BUG=webrtc:6411,b/31686979

Review-Url: https://codereview.webrtc.org/2363043002
Cr-Commit-Position: refs/heads/master@{#14365}
2016-09-23 08:27:38 +00:00
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
893a7eeecb Support more QCOM specific color formats for Android HW decoder.
BUG=b/31483393

Review-Url: https://codereview.webrtc.org/2349843002
Cr-Commit-Position: refs/heads/master@{#14359}
2016-09-22 17:44:34 +00:00
1c6d3f7eae Add new Camera2Enumerator.isSupported with Context parameter.
The old method is marked deprecated and will be removed soon. The new
method checks if all cameras on the device support better than legacy
implementation of the camera2 API.

BUG=webrtc:6390

Review-Url: https://codereview.webrtc.org/2354883002
Cr-Commit-Position: refs/heads/master@{#14350}
2016-09-22 12:52:13 +00:00
6f5a6c3188 New class AdaptedVideoTrackSource.
BUG=webrtc:6353

Review-Url: https://codereview.webrtc.org/2328333002
Cr-Commit-Position: refs/heads/master@{#14345}
2016-09-22 08:26:06 +00:00
772bd0d40b Log supported camera preview resolutions.
BUG=b/29935437
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14336}
2016-09-21 19:17:15 +00:00
28d5bc68c3 Fix deadlock issue in CameraCapturer.stopCapture.
BUG=webrtc:6404
NOTRY=True

Review-Url: https://codereview.webrtc.org/2357213002
Cr-Commit-Position: refs/heads/master@{#14333}
2016-09-21 14:44:55 +00:00
7640fcf6ed Android VideoSource: Add adaptOutputFormat function
The Java VideoSource class wraps the C++ AndroidVideoTrackSource.
AndroidVideoTrackSource is the object actually owning the VideoAdapter.
We currently control the VideoAdapter through the Java VideoCapturer,
but it is more natural and direct to control it through the Java
VideoSource class. This CL adds the necessary function to do this, and
the function in VideoCapturer is deprecated.

BUG=webrtc:6391
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14332}
2016-09-21 14:20:16 +00:00
0cb8828bce Reland of lease camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353163003/ )
Reason for revert:
Fix bugs causing the new code to fail.

Original issue's description:
> Revert of Release camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353263002/ )
>
> Reason for revert:
> Breaks bots.
>
> Original issue's description:
> > Release camera statistics after switching camera on CameraCapturer.
> >
> > BUG=webrtc:6397
> > TBR=magjed@webrtc.org
> > NOTRY=True
> >
> > Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> > Cr-Commit-Position: refs/heads/master@{#14323}
>
> TBR=magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6397
>
> Committed: https://crrev.com/ad5d65845f5c859d0564811a4eea68e1efdb8450
> Cr-Commit-Position: refs/heads/master@{#14324}

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

Review-Url: https://codereview.webrtc.org/2357893002
Cr-Commit-Position: refs/heads/master@{#14330}
2016-09-21 13:08:59 +00:00
ad5d65845f Revert of Release camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353263002/ )
Reason for revert:
Breaks bots.

Original issue's description:
> Release camera statistics after switching camera on CameraCapturer.
>
> BUG=webrtc:6397
> TBR=magjed@webrtc.org
> NOTRY=True
>
> Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> Cr-Commit-Position: refs/heads/master@{#14323}

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

Review-Url: https://codereview.webrtc.org/2353163003
Cr-Commit-Position: refs/heads/master@{#14324}
2016-09-21 10:51:15 +00:00
d5e9237b30 Release camera statistics after switching camera on CameraCapturer.
BUG=webrtc:6397
TBR=magjed@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2353263002
Cr-Commit-Position: refs/heads/master@{#14323}
2016-09-21 10:15:53 +00:00
3442579fd7 Session based capturing for Camera1Capturer.
BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2187293002
Cr-Commit-Position: refs/heads/master@{#14318}
2016-09-21 08:35:01 +00:00
664efbd048 Removed api/rtcstats[report].h pseudonyms of api/stats/rtcstats[report].h
These are no longer used in Chromium, so deleting them will not break any
third party project.

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2352993002
Cr-Commit-Position: refs/heads/master@{#14309}
2016-09-20 14:10:19 +00:00
63489787a0 Add new decoding statistics for muted output
This change adds a new statistic for logging how many calls to
NetEq::GetAudio resulted in a "muted output". A muted output happens
if the packet stream has been dead for some time (and the last decoded
packet was not comfort noise).

BUG=webrtc:5606
BUG=b/31256483

Review-Url: https://codereview.webrtc.org/2341293002
Cr-Commit-Position: refs/heads/master@{#14302}
2016-09-20 08:47:19 +00:00
be22d51307 Enable auto-focus on Camera2.
BUG=webrtc:6357

Review-Url: https://codereview.webrtc.org/2347823002
Cr-Commit-Position: refs/heads/master@{#14288}
2016-09-19 13:01:59 +00:00
dd0c7f0ea4 Events refactor in Android session based capturing.
In the new implementation session reports all events through
CameraSession.Events interface. CameraCapturer passes these events
forward.

BUG=webrtc:6325

Review-Url: https://codereview.webrtc.org/2331343010
Cr-Commit-Position: refs/heads/master@{#14286}
2016-09-19 11:37:22 +00:00
227c3c125e Enable stabilization on Camera2.
BUG=webrtc:6357

Review-Url: https://codereview.webrtc.org/2345213002
Cr-Commit-Position: refs/heads/master@{#14285}
2016-09-19 10:08:21 +00:00
1a7ef1f025 Reland of Optimize Android NV12 capture (patchset #1 id:1 of https://codereview.webrtc.org/2327893002/ )
Reason for revert:
Import breakage has been fixed.

Original issue's description:
> Revert of Optimize Android NV12 capture (patchset #2 id:20001 of https://codereview.webrtc.org/2317443003/ )
>
> Reason for revert:
> Import breakage in g3.
>
> Original issue's description:
> > Optimize Android NV12 capture
> >
> > This CL optimizes the Android capture NV12 -> I420 + scaling code. For
> > example, when the input is 1280x720 and we adapt to 640x360, this CL:
> >  - Reduces conversion time from 3.37 ms to 1.46 ms.
> >  - Reduces memory footprint by 1 MB.
> >
> > BUG=webrtc:6319
> >
> > Committed: https://crrev.com/36d38cbb153e19bdc3c62a750aba6889da40aac2
> > Cr-Commit-Position: refs/heads/master@{#14167}
>
> TBR=sakal@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6319
TBR=sakal@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6319

Review-Url: https://codereview.webrtc.org/2332213011
Cr-Commit-Position: refs/heads/master@{#14273}
2016-09-17 09:39:11 +00:00
e5835f5d84 Adding an end-to-end connection time test.
The test uses a fake clock and simulates network and signaling delays in
order to get a repeatable measurement of the time to establish a
connection (including DTLS). This will help ensure that various
optimizations continue to work as expected, and no new delays are
introduced.

This CL depends on: https://codereview.webrtc.org/2140283002/

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

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

Cr-Commit-Position: refs/heads/master@{#14270}
2016-09-16 22:07:58 +00:00
71b8393b6a Remove name parameter from HistogramAdd function.
This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds.

This CL instead adds a GetHistogramName function that is only called on debug builds.

Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there.

BUG=webrtc:6329

Review-Url: https://codereview.webrtc.org/2337883003
Cr-Commit-Position: refs/heads/master@{#14263}
2016-09-16 13:56:20 +00:00
74e1a4f96a PeerConnection[Interface]::GetStats(RTCStatsCollectorCallback*) added.
New file structure and targets:

rtc_stats_api
  webrtc/api/stats/rtcstats.h
  webrtc/api/stats/rtcstats_objects.h
  webrtc/api/stats/rtcstatsreport.h

rtc_stats (dep on rtc_stats_api)
  webrtc/stats/rtcstats.cc
  webrtc/stats/rtcstats_objects.cc
  webrtc/stats/rtcstatsreport.cc

libjingle_peerconnection (dep on rtc_stats)
  webrtc/api/rtcstatscollector.cc
  webrtc/api/rtcstatscollector.h

Placing rtc_stats_api headers in this separate target instead of
libjingle_peerconnection avoids a circular dependency
libjingle_peerconnection -> rtc_stats -> libjingle_peerconnection

Code changes:

PeerConnectionInterface::GetStats(RTCStatsCollectorCallback*) added for
the new stats collection API. Implemented by PeerConnection.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2331373004
Cr-Commit-Position: refs/heads/master@{#14246}
2016-09-16 06:33:04 +00:00
232c56ba9a Add logging available fps ranges to Camera2Session.
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2340283002
Cr-Commit-Position: refs/heads/master@{#14242}
2016-09-15 19:31:21 +00:00
8faf9e047e Removed the const char* (StaticString) type from RTCStatsMember.
std::string is all we need. const char* is an annoying special case
because they can't be compared with ==. Having two different string
types was a premature optimization.

BUG=chromium:627816
NOTRY=True

Review-Url: https://codereview.webrtc.org/2340303002
Cr-Commit-Position: refs/heads/master@{#14235}
2016-09-15 13:52:50 +00:00
4ed5b9f62d Android SurfaceViewRenderer: Create EGL context on render thread
This CL avoids eglMakeCurrent failing on some problematic Marvel based
Jelly Bean devices.

BUG=webrtc:6350
R=perkj@webrtc.org, sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14234}
2016-09-15 13:30:29 +00:00
17f008bf33 GYP: Remove targets inside include_tests==1 that are converted to GN.
Remove a large number of targets that are no longer built, to reduce maintenance.
Only targets that have a GN version were removed.

BUG=webrtc:6323
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2340773003
Cr-Commit-Position: refs/heads/master@{#14231}
2016-09-15 11:57:39 +00:00
705ecc5dda GN: Change group deps to public_deps.
During GN vs GYP auditing it was discovered that some
GN targets that had public_configs were not exposing them
to dependents where the dependent depended on a group, which
in turn included that target as a dependency. Instead of
changing those public_configs to all_dependent_configs
(which would be a change from GYP), it's better to just change
those group targets to use public_deps instead.

BUG=webrtc:6323
NOTRY=True
TESTED=Generated GYP and GN project files on Mac and ran the
tools/gyp_flag_compare.py script before and after this patch was
applied. The file in question used for inspection was the
webrtc/api/webrtcsessiondescriptionfactory.cc
which is a part of the libjingle_peerconnection target.

Review-Url: https://codereview.webrtc.org/2344623002
Cr-Commit-Position: refs/heads/master@{#14222}
2016-09-15 07:53:34 +00:00
0d14c6abba Add method cricket::VideoCapturer::NeedsDenoising, use in VideoCapturerTrackSource.
BUG=chromium:645907

Review-Url: https://codereview.webrtc.org/2334683002
Cr-Commit-Position: refs/heads/master@{#14219}
2016-09-14 19:03:21 +00:00
cbae0b475c Use I420Buffer rather than VideoFrameBuffer when writing pixels.
Prepares for deleting VideoFrameBuffer::MutableDataY{,U,V}. Android
changes extracted from cl https://codereview.webrtc.org/2278883002/.

BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2331383005
Cr-Commit-Position: refs/heads/master@{#14213}
2016-09-14 12:45:31 +00:00