Commit Graph

10626 Commits

Author SHA1 Message Date
1c3909899d Use rtc::time for all your timing needs!
Initial step of unifying so that base/timeutils.h and Clock/TimeTime
from system_wrappers use the same implementation.

BUG=webrtc:5463
R=pbos@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11394}
2016-01-27 11:55:44 +00:00
d673b0fa5d [rtp_rtcp] Fix potentional time difference between rtp and rtcp packets.
SetRtpState function was updating only rtp_sender start timestamp.
Now it updates both rtp_sender and rtcp_sender start timestamps.

BUG=webrtc:5433
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11393}
2016-01-27 11:55:06 +00:00
b11e97a552 Move talk/media/webrtc/OWNERS to talk/media.
Permits changing talk/media/base without root ownership approval.

BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11392}
2016-01-27 11:39:36 +00:00
0b518bf6fc Remove incorrect cast to AsyncSocketAdapter.
socket_ in OpenSSLAdapter should be (and is in tests) an AsyncSocket but
doesn't have to be an AsyncSocketAdapter. In tests this is
rtc::VirtualSocket which is an rtc::AsyncSocket. This also matches the
BIO_new_socket type signature.

This fixes the remaining UBSan vptr bot errors.

BUG=webrtc:5124, webrtc:5226
R=tommi@webrtc.org, torbjorng@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11391}
2016-01-27 11:35:52 +00:00
bab934bffe H.264 video codec support using OpenH264 (http://www.openh264.org/) for encoding and FFmpeg (https://www.ffmpeg.org/) for decoding.
It works on all platforms except Android and iOS (FFmpeg limitation).

Implemented behind compile time flags, off by default.
The plan is to have it enabled in Chrome (see bug), but not in Chromium/webrtc by default.

Flags to turn it on:
- rtc_use_h264 = true
- ffmpeg_branding = "Chrome" (or other brand that includes H.264 decoder)

Tests using H264:
- video_loopback --codec=H264
- screenshare_loopback --codec=H264
- video_engine_tests (EndToEndTest.SendsAndReceivesH264)

NOTRY=True
BUG=500605, 468365
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424

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

Cr-Commit-Position: refs/heads/master@{#11390}
2016-01-27 09:36:07 +00:00
fab0a2886d Fix BasicNetworkManager not to spam logs when internet is unreacheable.
BasicNetworkManager attemps to connect an UDP socket and logs an error
when connect() fails, e.g. when internet is not connected. These
errors are not very useful in the logs, but apper there every time
it attemps to refresh network list. Replaced the log statement with
LOG(LS_INFO).

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11389}
2016-01-27 06:13:04 +00:00
3ea1852f9e Sync build_ios_libs.sh script with http://webrtc.org/native-code/ios/
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11388}
2016-01-26 21:43:25 +00:00
4cb3e3997b Fix compilation if HAVE_WEBRTC_VIDEO is not defined.
This CL fixes compiler / linker errors that occur if HAVE_WEBRTC_VIDEO is
not defined and introduces a new class NullWebRtcVideoEngine to use in
that case.

BUG=
TEST=remove define HAVE_WEBRTC_VIDEO from talk/build/common.gypi, run gclient runhooks and compile

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

Cr-Commit-Position: refs/heads/master@{#11387}
2016-01-26 21:07:59 +00:00
6d49a8ed17 Update API for Objective-C RTCConfiguration.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11386}
2016-01-26 21:06:48 +00:00
7b582a2e4f Roll chromium_revision 2ca77c1..c6ec25c (371488:371549)
Change log: 2ca77c1..c6ec25c
Full diff: 2ca77c1..c6ec25c

Changed dependencies:
* src/third_party/ffmpeg: 2dc5618..2ab5351
DEPS diff: 2ca77c1..c6ec25c/DEPS

No update to Clang.

TBR=

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

Cr-Commit-Position: refs/heads/master@{#11385}
2016-01-26 20:09:36 +00:00
a2c55235ca Allow packets to be reordered in the fake network pipe.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11384}
2016-01-26 16:42:00 +00:00
7fd881743c Fix type of local encoded length variable from uint32_t to size_t.
BUG=chromium:571594

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

Cr-Commit-Position: refs/heads/master@{#11383}
2016-01-26 15:26:12 +00:00
59b2d3ebe7 Remove zero-divide in VCMContentMetricsProcessing.
Protects against zero-framerate in UpdateFrameRate.

BUG=webrtc:5124
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11382}
2016-01-26 15:18:56 +00:00
83277131b1 AudioCodingModuleImpl: Put CodecManager and Rent-A-Codec in a separate struct
This will make it easier for future CLs to make them optional.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#11381}
2016-01-26 14:06:20 +00:00
d0c7bba4f4 [rtp_rtcp] Dlrr::SubBlock struct renamed to ReceiveTimeInfo
This structure is used outside Dlrr creating/parsing.
but RTCPReceiveTimeInfo structure doesn't follow naming style.

rtcp::ReceiveTimeInfo added to replace both Dlrr::SubBlock (when creating/parsing packets)
and RTCPReceiveTimeInfo (for other uses).

this CL is a split of https://codereview.webrtc.org/1557593002/

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

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

Cr-Commit-Position: refs/heads/master@{#11380}
2016-01-26 13:12:57 +00:00
5c7f110ec6 Roll chromium_revision fb2e77c..2ca77c1 (371273:371488)
Change log: fb2e77c..2ca77c1
Full diff: fb2e77c..2ca77c1

Changed dependencies:
* src/third_party/libyuv: fc52d8d..ad71738
DEPS diff: fb2e77c..2ca77c1/DEPS

No update to Clang.

TBR=

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

Cr-Commit-Position: refs/heads/master@{#11379}
2016-01-26 12:12:55 +00:00
6a07f12e95 AudioCodingModuleImpl: Initialize encoder_stack_ to nullptr
This should have been done in commit 11340, but it was left out by
mistake.

BUG=webrtc:5028

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

Cr-Commit-Position: refs/heads/master@{#11378}
2016-01-26 11:28:57 +00:00
2bdcfadc8a Revert of Removing webrtc::AudioFrame::energy_. (patchset #2 id:20001 of https://codereview.webrtc.org/1589953002/ )
Reason for revert:
The change breaks google3 tests for buzz/mediaengines/sae/audio_mixer.

Original issue's description:
> Remove webrtc::AudioFrame::energy_.
>
> BUG=webrtc:3315
>
> Committed: https://crrev.com/bacae81a1d91ae7b2a4bde37a66ab70513449989
> Cr-Commit-Position: refs/heads/master@{#11372}

TBR=kjellander@webrtc.org,henrik.lundin@webrtc.org,tommi@webrtc.org,minyue@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:3315

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

Cr-Commit-Position: refs/heads/master@{#11377}
2016-01-26 10:29:54 +00:00
ffa3fdc8d6 Reallocate encoded buffer size if needed for VP8. Initially set to the input image size.
Issue may occur for very small input images (e.g. 4x4) when encoded image length > input image size.

BUG=chromium:571594

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

Cr-Commit-Position: refs/heads/master@{#11376}
2016-01-26 09:56:35 +00:00
e791ffd638 Remove non-monotonic clock support
Real time clock may cause problems as they can move (even backwards) if
the clock is changed, eg updated by NTP.

Non-monotonic clocks still in use on some platform (I'm looking at you,
Apple) for timed waits, but that should be less of an issue than actual
timestamps.

BUG=webrtc:5452

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

Cr-Commit-Position: refs/heads/master@{#11375}
2016-01-26 09:53:24 +00:00
4fd6cda067 Add tracing to VCMGenericEncoder::Release.
This call can take time, especially on mobile HW encoders. Make sure it
shows up in tracing.

BUG=webrtc:5167
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11374}
2016-01-26 09:20:03 +00:00
86956ded42 Small cleanup in VP9EncoderImpl::GetEncodedLayerFrame.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11373}
2016-01-26 09:05:28 +00:00
bacae81a1d Remove webrtc::AudioFrame::energy_.
BUG=webrtc:3315

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

Cr-Commit-Position: refs/heads/master@{#11372}
2016-01-25 22:10:40 +00:00
58a80b5b12 Roll chromium_revision 717238e..fb2e77c (370438:371273)
Change log: 717238e..fb2e77c
Full diff: 717238e..fb2e77c

Changed dependencies:
* src/buildtools: 0f8e6e4..222bd42
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/afe57cb..6c22f54
* src/third_party/ffmpeg: 7deada1..2dc5618
* src/third_party/libsrtp: ebfcc9a..9cc4f2f
* src/third_party/libvpx_new/source/libvpx: b520882..c0307e6
* src/third_party/openmax_dl: ff8766d..6670e52
* src/tools/gyp: 54b7dfc..aa0301b
* src/tools/swarming_client: 9cdd761..0b908f1
DEPS diff: 717238e..fb2e77c/DEPS

No update to Clang.

TBR=marpan@webrtc.org, stefan@webrtc.org,

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

Cr-Commit-Position: refs/heads/master@{#11371}
2016-01-25 20:21:48 +00:00
85b22e2306 Remove vp8_factory.{cc,h}.
Removes use of global VP8EncoderFactory::use_simulcast_adapter which is
thread-unsafe. Also the code wasn't in use.

BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11370}
2016-01-25 16:58:08 +00:00
b332e5d3bd Roll chromium_revision 6a04368..717238e (370362:370438) + tcmalloc
Change log: 6a04368..717238e
Full diff: 6a04368..717238e

Also add third_party/tcmalloc to the symlink list.
As per crrev.com/1611633003 host tools require tcmalloc.
No update to Clang.

BUG=chromium:580777

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

Cr-Commit-Position: refs/heads/master@{#11369}
2016-01-25 16:13:14 +00:00
28ba92731d Switch to use new implementation in metrics.h.
Sparse macro replaced for all video histograms that have a constant name.

BUG=webrtc:5283

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

Cr-Commit-Position: refs/heads/master@{#11368}
2016-01-25 13:58:27 +00:00
5ad935cb56 Remove mutable from rtc::CriticalSection members.
rtc::CriticalSection is now lockable from const methods and no longer
need to remain mutable.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11367}
2016-01-25 11:52:53 +00:00
7d0d0e0763 Remove dead code from webrtc/base/timing.*
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11366}
2016-01-25 11:09:32 +00:00
9de632a100 Deleted unused enums MediaChannelOptions and VoiceMediaChannelOptions,
with constants OPT_CONFERENCE and OPT_AGC_MINUS_10DB.

BUG=webrtc:5426
TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11365}
2016-01-25 09:56:55 +00:00
7a83951b27 Fix a bug in webrtc::ByteReader
The specializations for 4-byte reading did not return correct
values. This has to do with the order of casting and shifting. Also
adding a test to expose the bug (and verify the other byte sizes).

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

Cr-Commit-Position: refs/heads/master@{#11364}
2016-01-25 07:47:59 +00:00
f91e6d0438 Enable cpplint for webrtc/modules/bitrate_controller and fix all uncovered cpplint errors.
This CL enableds cpplint for webrtc/modules/bitrate_controller.

BUG=webrtc:5311
NOTRY=true

TESTED=Fixed issues reported by:
find webrtc/modules/bitrate_controller -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.

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

Cr-Commit-Position: refs/heads/master@{#11363}
2016-01-25 07:05:26 +00:00
e373dc20c4 Update API for Objective-C RTCDataChannel.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11362}
2016-01-22 22:04:33 +00:00
38b39d59d1 Temporary hack to avoid assert errors when time moves backwards.
Once we have eliminated all non-monotonic clocks, revert this change.

BUG=webrtc:5452

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

Cr-Commit-Position: refs/heads/master@{#11361}
2016-01-22 21:36:39 +00:00
cc71c4107f Revert "Disable P2PTransport...TestFailoverControlledSide on Memcheck"
This reverts commit 1a8240c32a14a31b1417b6e06f511f2a16d81b19.

Per comments in bug 5136, the affected test should no longer be flaky.

BUG=webrtc:5136

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

Cr-Commit-Position: refs/heads/master@{#11360}
2016-01-22 20:45:07 +00:00
0a37497842 Deleted unused method SetDumpPath and unneeded includes.
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11359}
2016-01-22 19:56:57 +00:00
c8930ba8ac Disable WebRtcSessionTest.TestStunError on Win.
BUG=webrtc:5411

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

Cr-Commit-Position: refs/heads/master@{#11358}
2016-01-22 14:17:51 +00:00
9846845da6 Calculate audio levels in AEC in time domain.
In AEC, audio levels are calculated in frequency domain. This makes the calculation dependent on FFT. We now make the calculation performed in time domain. The complexity is the same, but the dependence on FFT is removed.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11357}
2016-01-22 13:46:47 +00:00
5447934728 Remove implementation of CriticalSectionWrapper and use rtc::CriticalSection
While transitioning over to rtc::CriticalSection completely, this gives perf benefits that rtc::CriticalSection has on Mac to current users of CriticalSectionWrapper.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11356}
2016-01-22 13:26:19 +00:00
7406b96abc CriticalSection: Use types+methods from base/platform_thread*.*.
Use PlatformThreadRef, CurrentThreadRef and IsThreadRefEqual instead of pthread_t, pthread_self and operator== (or !=).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11355}
2016-01-22 13:13:38 +00:00
32e590ec13 class doesn't rely on structures in RTCPUtility to store data.
supports several fci items in same packet.
got accessors to read data

BUG=webrtc:5260
R=asapersson@webrtc.org, åsapersson

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

Cr-Commit-Position: refs/heads/master@{#11354}
2016-01-22 10:05:10 +00:00
3fe2c6a161 VideoProcessorImpl using EncodedImage::GetBufferPaddingBytes.
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424

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

Cr-Commit-Position: refs/heads/master@{#11353}
2016-01-22 08:07:17 +00:00
ed281e9c9b New lock implementation for mac.
According to my measurements, it's about 100x faster than the native mutex implementation in OSX.  Google "OSX mutex performance" for more info.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11352}
2016-01-22 07:47:30 +00:00
2bf9a5f11b Update API for Objective-C RTCMediaStream.
BUG=
R=tkchin@webrtc.org

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

Patch from Jon Hjelle <hjon@andyet.net>.

Cr-Commit-Position: refs/heads/master@{#11351}
2016-01-22 00:14:23 +00:00
ca91e38a3a Update API for Objective-C RTCAudioTrack and RTCVideoTrack.
BUG=
R=tkchin@webrtc.org

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

Patch from Jon Hjelle <hjon@andyet.net>.

Cr-Commit-Position: refs/heads/master@{#11350}
2016-01-21 23:36:54 +00:00
97888bd95a Swap use of CriticalSectionWrapper for rtc::CriticalSection in webrtc/video.
While doing this, I made a couple of minor changes:
* Removed unused variables (one lock and one video frame variable)
* Switched over to a scoped lock in remb.cc and removed an if() in a function where we can just return the expression being checked.

BUG=
R=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11349}
2016-01-21 22:25:12 +00:00
7ac8babbc6 Move RTCAVFoundationCapturer to webrtc/api/objc.
BUG=
R=tkchin@webrtc.org

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

Patch from Jon Hjelle <hjon@andyet.net>.

Cr-Commit-Position: refs/heads/master@{#11348}
2016-01-21 19:45:04 +00:00
891a446a92 Update/move RTCVideoRendererAdapter to webrtc/api/objc.
BUG=
R=tkchin@webrtc.org

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

Patch from Jon Hjelle <hjon@andyet.net>.

Cr-Commit-Position: refs/heads/master@{#11347}
2016-01-21 19:42:10 +00:00
31fc21f454 Swap use of CriticalSectionWrapper with rtc::CriticalSection in voice_engine/
Also remove mischievous tab character!
This is a part of getting rid of CriticalSectionWrapper and makes the code slightly simpler.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11346}
2016-01-21 18:37:44 +00:00
8947a01e05 Fixing an uninitialized variable in webrtcsession_unittest.
Introduced in https://codereview.webrtc.org/1590333004/

TBR=pthatcher@webrtc.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#11345}
2016-01-21 18:26:46 +00:00