4673 Commits

Author SHA1 Message Date
erikchen
73fdc317b2 Several fixes to screen_capturer_mac.
Make sure that the appropriate run loop source gets added/removed. More clean up
to remove unnecessary functions and suppress deprecated declaration warnings.

BUG=webrtc:6029

Review-Url: https://codereview.webrtc.org/2417603002
Cr-Commit-Position: refs/heads/master@{#14615}
2016-10-12 19:24:27 +00:00
ossu
e280cdeb74 Voe::Channel: Turned GetPlayoutFrequency into GetRtpTimestampRateHz.
This gets rid of a bit of codec-specific code in VoE.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2355483003
Cr-Commit-Position: refs/heads/master@{#14614}
2016-10-12 18:04:16 +00:00
henrika
872f614111 Android audio playout now supports non-call media streams.
The default (preferred) stream type for output audio is STREAM_VOICE_CALL since the WebRTC stack is mainly intended for VoIP calls. But if the user wants to run in another mode than COMM mode, we now accept it and change the stream type to STREAM_MUSIC instead. It can e.g. be suitable for applications that does not record audio or if a call shall be casted to a Chromecast device.

The solution is somewhat experimental.

NOTRY=TRUE

BUG=webrtc:4767

Review-Url: https://codereview.webrtc.org/2411263003
Cr-Commit-Position: refs/heads/master@{#14613}
2016-10-12 15:11:48 +00:00
aleloi
116ec6da50 Implemented further mixer interface change suggestions from https://codereview.webrtc.org/2386383003/
Changed mixability status into AddSource/RemoveSource. Added 'ssrc()'
method to the MixerSource interface. Removed unnecessary member 'num_audio_sources_' and made the mixer be refcounted.

BUG=webrtc:6346
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408683002
Cr-Commit-Position: refs/heads/master@{#14612}
2016-10-12 13:07:13 +00:00
minyue
7e30432b36 Hooking up audio network adaptor to VoE.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2390883004
Cr-Commit-Position: refs/heads/master@{#14611}
2016-10-12 12:01:01 +00:00
aleloi
e97974d203 Cleanup of the mixer interface.
This implements some of the suggestions in https://codereview.webrtc.org/2386383003/, namely

* Removing anonymous mixing.
* Removing the volume meter.

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2402283003
Cr-Commit-Position: refs/heads/master@{#14609}
2016-10-12 10:06:34 +00:00
peah
73a28ee066 The AudioProcessing class is used as an interface
to the functionality in the audio processing module.
Therefore, it should be a pure interface.
This CL ensures that is the case.

BUG=webrtc:6515

Review-Url: https://codereview.webrtc.org/2406193002
Cr-Commit-Position: refs/heads/master@{#14608}
2016-10-12 10:01:57 +00:00
aleloi
4b8bfb8ed3 Changed ramping functionality of the AudioMixer.
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2398083005
Cr-Commit-Position: refs/heads/master@{#14607}
2016-10-12 09:15:08 +00:00
aleloi
e89141500a Moved MixerAudioSource and removed audio_mixer_defines.h.
MixerAudioSource is moved to AudioMixerImpl::Source. Structures and methods of the MixerAudioSource interface have been renamed. The RemixFrame method has added checks and is moved to audio_frame_manipulator.h

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2396803004
Cr-Commit-Position: refs/heads/master@{#14600}
2016-10-11 13:18:37 +00:00
henrika
14acf658ad AudioTransport::NeedMorePlayData is no longer called from different threads using OpenSL ES on Android
BUG=webrtc:6476
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2410033002
Cr-Commit-Position: refs/heads/master@{#14599}
2016-10-11 13:15:44 +00:00
solenberg
99df6c03c3 Fix bug in DTMF generation where events with level > 36 would be ignored.
BUG=webrtc:2795

Review-Url: https://codereview.webrtc.org/2404183003
Cr-Commit-Position: refs/heads/master@{#14598}
2016-10-11 11:35:40 +00:00
henrika
defc21e0aa Removes usage of hardware AGC and any related APIs on Android.
Compromise solution where WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl() is marked
as deprecated and where as many APIs as possible that touches the HW AGC are removed. Some basic architecture is saved to ensure that we can restore usage of
the HW AGC if ever required for future devices.

The AppRTCMobile demo does still contain an AGC check box but it is now grayed out.

BUG=b/30387905

Review-Url: https://codereview.webrtc.org/2402883003
Cr-Commit-Position: refs/heads/master@{#14596}
2016-10-11 08:29:16 +00:00
michaelt
e0729c56d3 Add RtcpRttStats to AudioStream
BUG=webrtc:6508

Review-Url: https://codereview.webrtc.org/2402333002
Cr-Commit-Position: refs/heads/master@{#14595}
2016-10-11 07:29:34 +00:00
brandtr
a8b38559a5 Add a FlexfecReceiver class.
This class is split in interface/implementation classes, since it
will be referenced from the Call level. Its purpose is to interface
the erasure code decoder with a new class FlexfecReceiveStream
(for received packets), as well as with the main RTP pipeline (for
recovered packets).

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2392663006
Cr-Commit-Position: refs/heads/master@{#14594}
2016-10-10 23:45:04 +00:00
erikchen
440b4be4b7 Use non-deprecated screen update callbacks.
CGRegisterScreenRefreshCallback (and similar) have been replaced by
CGDisplayStream.

Most of the structure is pretty comparable. The main difference is that a
CGDisplayStream needs to be destroyed asynchronously, potentially after
ScreenCapturerMac has been destroyed. This CL creates a self-owned
DisplayStreamManager which will destroy itself once all streams have been
destroyed.

BUG=webrtc:6029

Review-Url: https://codereview.webrtc.org/2391743004
Cr-Commit-Position: refs/heads/master@{#14590}
2016-10-10 22:18:35 +00:00
peah
c19f312f54 This CL adds functionality in the level controller to
receive a signal level to use initially, instead of the
default initial signal level.

The initial form of the CL
(https://codereview.webrtc.org/2254973003/) was reverted
due to down-stream  dependencies. These have been resolved,
but the CL needed to be revised according to the new scheme
for passing parameters to the audio processing module.
Therefore, please review this CL as if it is new.

TBR=aleloi@webrtc.org
BUG=webrtc:6386

Review-Url: https://codereview.webrtc.org/2337083002
Cr-Commit-Position: refs/heads/master@{#14579}
2016-10-07 21:54:15 +00:00
minyue
0d382efbdc Cleaning build file for audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2399883002
Cr-Commit-Position: refs/heads/master@{#14575}
2016-10-07 14:59:36 +00:00
aleloi
36542514f6 Reland of https://codereview.webrtc.org/2396483002/
LOG_T_F macro is not defined for chromium builds.

NOTRY=True
BUG=webrtc:6346
TBR=ivoc@webrtc.org

Review-Url: https://codereview.webrtc.org/2401603003
Cr-Commit-Position: refs/heads/master@{#14569}
2016-10-07 12:28:38 +00:00
aleloi
a485dabc78 Revert of Made MixerAudioSource a pure interface. (patchset #7 id:350001 of https://codereview.webrtc.org/2396483002/ )
Reason for revert:
breaks chromium FYI

Original issue's description:
> Made MixerAudioSource a pure interface.
>
> This required quite a few small changes in the mixing algorithm
> structure, the mixer interface and the mixer unit tests.
>
> BUG=webrtc:6346
>
> Committed: https://crrev.com/2ae5fdff86b784545cbd724de54bb5ffedde1adf
> Cr-Commit-Position: refs/heads/master@{#14567}

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

Review-Url: https://codereview.webrtc.org/2394253003
Cr-Commit-Position: refs/heads/master@{#14568}
2016-10-07 12:04:58 +00:00
aleloi
2ae5fdff86 Made MixerAudioSource a pure interface.
This required quite a few small changes in the mixing algorithm
structure, the mixer interface and the mixer unit tests.

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2396483002
Cr-Commit-Position: refs/heads/master@{#14567}
2016-10-07 11:30:19 +00:00
terelius
3dcfd64c26 Make bwe_simulator a separate test target that doesnt run on the bots
but remove the #if BWE_TEST_LOGGING_COMPILE_TIME_ENABLE so that it always builds.

BUG=webrtc:6497

Review-Url: https://codereview.webrtc.org/2398123002
Cr-Commit-Position: refs/heads/master@{#14564}
2016-10-07 07:40:03 +00:00
mflodman
7056be937f Delete old video defines in engine config.
This CL deletes the old and not used video defines in
engine_configurations.h and pre-pends voice_ to indicate there are only
voice/audio defines left in the file.

BUG=none
R=solenberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14558}
2016-10-07 05:07:36 +00:00
danilchap
0b4b72797e Use NtpTime in RtcpReceiver instead of pair of uints
BUG=webrtc:5565

Review-Url: https://codereview.webrtc.org/2389703007
Cr-Commit-Position: refs/heads/master@{#14557}
2016-10-06 16:24:51 +00:00
mflodman
15d8357bab Remove OnLocalSsrcChanged and rename EncoderStateFeedback.
The renaming is to reflect this class is only used for RTCP interaction
and not for other transports.

This Cl will be followed by multiple CLs moving all send-side RTP
functionality to a separate class, rtp module ownership away from
VideoSendStream and use TaskQueue instead of ProcessThread for RTP.

BUG=webrtc:6456

Review-Url: https://codereview.webrtc.org/2390463002
Cr-Commit-Position: refs/heads/master@{#14556}
2016-10-06 15:35:19 +00:00
minyue
41b9c801c2 Adding audio network adaptor to AudioEncoderOpus.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2362703002
Cr-Commit-Position: refs/heads/master@{#14555}
2016-10-06 14:13:59 +00:00
peah
81b9291dfd The FFT functionality in aec_rdft* is based on legacy C
code which is not thread-safe in the sense that the
rdft_init method can only be run in a single-threaded.

Currently, inside WebRTC multiple instances of the audio-
processing module are set up which means that the init
method may be run concurrently.

In order to avoid having to protect the init method with
a lock to ensure single-threaded behavior that, this CL
places the FFT functionality inside a class so that there
is no global component of the FFT functionality.

Note that:
1) The nonstandard header for the ooura_fft.cc was copied
   from the aec_rdft.cc header, and augmented with a
   description of the changes introduced in this CL.
2) The clang warnings for the ooura_fft_sse2.cc,
   ooura_fft_neon.cc and ooura_fft_mips.cc were not
   addressed as this code was kept as it was before this CL
3) Clang-format was run on all files apart from
   ooura_fft_mips.cc (as that would change the format of
   the inline assempbly code).

Adding bypass of presubmit to avoid code style and header errors caused by the fact that files with legacy code are being renamed.

NOPRESUBMIT=true

BUG=chromium:638583

Review-Url: https://codereview.webrtc.org/2348213002
Cr-Commit-Position: refs/heads/master@{#14554}
2016-10-06 13:46:27 +00:00
ivoc
21a18ee267 Revert of Delete webrtc::VideoFrame::CopyFrame. (patchset #2 id:20001 of https://codereview.webrtc.org/2371363003/ )
Reason for revert:
This CL breaks internal dependencies.

Original issue's description:
> Delete webrtc::VideoFrame::CopyFrame.
>
> BUG=webrtc:5682
>
> Committed: https://crrev.com/0e7c7ce35d9449c5bb13328d1bfb04ad32e48ccc
> Cr-Commit-Position: refs/heads/master@{#14550}

TBR=magjed@webrtc.org,tommi@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/2397943003
Cr-Commit-Position: refs/heads/master@{#14553}
2016-10-06 13:29:34 +00:00
stefan
a669a3a0dc Revert "Revert of Use sps and pps to determine decodability of H.264 frames. (patchset #4 id:60001 of https://codereview.webrtc.org/2341713002/ )"
This reverts commit 3cdfcd88a14449a9b116cb6149e1348d3a1e4cb2.

NOPRESUBMIT=true
BUG=webrtc:6208

Review-Url: https://codereview.webrtc.org/2385143002
Cr-Commit-Position: refs/heads/master@{#14551}
2016-10-06 12:04:59 +00:00
nisse
0e7c7ce35d Delete webrtc::VideoFrame::CopyFrame.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2371363003
Cr-Commit-Position: refs/heads/master@{#14550}
2016-10-06 12:00:13 +00:00
philipel
93e451b0f5 Skip non-continuous FrameInfos when finding the next frame to return from FrameBuffer::NextFrame.
Also added DCHECKS to make sure that FrameInfos are not incorrectly updated.

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

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

Cr-Commit-Position: refs/heads/master@{#14549}
2016-10-06 10:25:24 +00:00
henrik.lundin
bf7c620280 Fix lint errors in audio_coding_module_unittest.cc
BUG=None
NOTRY=True

Review-Url: https://codereview.webrtc.org/2389263003
Cr-Commit-Position: refs/heads/master@{#14544}
2016-10-06 08:53:39 +00:00
henrik.lundin
2504c0a91c Drop _oldapi from ACM test file names
Updating GN files, include paths, and include guards

BUG=None
NOTRY=True
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2387113005
Cr-Commit-Position: refs/heads/master@{#14542}
2016-10-06 08:31:38 +00:00
jianjun.zhu
a84aa57799 Use std::abs instead of C-style abs.
BUG=webrtc:6486

Review-Url: https://codereview.webrtc.org/2396823002
Cr-Commit-Position: refs/heads/master@{#14536}
2016-10-06 02:19:30 +00:00
tkchin
5fa51e2947 Add iOS static library GN build script.
NOTRY=True

BUG=webrtc:6372

Review-Url: https://codereview.webrtc.org/2391123002
Cr-Commit-Position: refs/heads/master@{#14532}
2016-10-05 20:16:07 +00:00
ossu
425a6ccac3 RTPReceiverAudio: Removed frequency from CNGPayloadType and cleaned up
CheckPayloadChanged.

Removed last_received_frequency_, cng_payload_type_,
g722_payload_type_ and last_received_g722_ from RTPReceiverAudio and
cleaned up most of the related, now dead code.

Since g722_payload_type_ was never set, neither was
last_received_g722_, which means the frequency change in
CNGPayloadType was never done. Setting the frequency to the standard
values also proved unnecessary, since they were already set before the
call. Even if frequency would have been changed by RTPReceiverAudio, I
was not able to find a place where that would actually have
mattered. The ACM and NetEq, for example, which eventually gets these
packages, don't care about that value.

Also, GetPayloadTypeFrequency was never called, so keeping track of
last_received_frequency_ proved unnecessary.

cng_payload_type_ was stored to be able to check in CNGPayloadType if
cng_payload_type_has_changed. This flag was also never read, so these
all disappear.

The main reason for starting this change was to root out any G722
specific code we have sprinkled around the code base (specifically
dealing with the fact that for G722 clock rate != sample rate). In
this case, once I started pulling at one end of the string, the whole
thing came unraveled.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2383103002
Cr-Commit-Position: refs/heads/master@{#14530}
2016-10-05 15:44:30 +00:00
ossu
b2d1e0d1da Resurrected test_api_audio.cc
I'll be doing some changes to code it tests (rtp_receiver_audio,
specifically) and want to make sure there are tests in place before I
touch anything.

Fixed test_api_audio not properly checking payload data. Required a
fix to LoopBackTransport in test_api to as to act like the regular
audio and video parts of WebRTC and separate payload from header data.

Also added a test for CNG and cleaned up constants.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2378403004
Cr-Commit-Position: refs/heads/master@{#14529}
2016-10-05 14:51:50 +00:00
danilchap
28b03eb449 Move RTCPHelp::RTCPReportBlockInformation into RTCPReceiver
removing RTCPHelp namespace and rtcp_receiver_help files,
cleaning style of the ReportBlockInformation usage.

BUG=webrtc:5565

Review-Url: https://codereview.webrtc.org/2390643002
Cr-Commit-Position: refs/heads/master@{#14527}
2016-10-05 13:59:51 +00:00
phoglund
3360352c2b Make sure vp9 actually gets excluded in gn as well.
It was being excluded in this manner in gyp so it should be in gn as
well.

R=charujain@webrtc.org,kjellander@webrtc.org
BUG=webrtc:6412

Review-Url: https://codereview.webrtc.org/2392053003
Cr-Commit-Position: refs/heads/master@{#14525}
2016-10-05 13:52:30 +00:00
henrik.lundin
58466f6d97 Relanding "Setting up an RTP input fuzzer for NetEq"
The original CL (https://codereview.webrtc.org/2315633002) was
reverted since the fuzzer depended on gflags and files in the
resources folder; neither of this is allowed for a fuzzer test in
Chromium. This new version streamlines the dependencies, and changes
the test to generate a sinusoid input audio signal instead of reading
from a file.

Original commit message:
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_chromium_rel_ng;master.tryserver.chromium.android:android_compile_dbg,linux_android_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.chromium.mac:mac_chromium_rel_ng,ios-device

Review-Url: https://codereview.webrtc.org/2384423002
Cr-Commit-Position: refs/heads/master@{#14523}
2016-10-05 09:27:48 +00:00
kthelgason
d020f3fea0 Support for parsing CABAC coded bitstreams
Remove check on entropy_coding_mode_flag in PPS parser.
Parse entropy_coding_mode_flag from PPS and store it in the parser struct. Parse out extra data in NALU slices in case of entropy_coding_mode to avoid reporting incorrect QP.

BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2373393002
Cr-Commit-Position: refs/heads/master@{#14522}
2016-10-05 09:16:28 +00:00
nisse
f122a85287 Delete webrtc::VideoFrame::CreateEmptyFrame.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2378003002
Cr-Commit-Position: refs/heads/master@{#14512}
2016-10-05 06:27:37 +00:00
kwiberg
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
kwiberg
5adaf735dc AudioCodingModule: Specify decoders using SdpAudioFormat
NetEq already uses SdpAudioFormat internally; this CL adds an
AudioCodingModule::RegisterReceiveCodec overload that accepts
SdpAudioFormat, and propagates it through AcmReceiver into NetEq.

The intention is to get rid of the other ways to specify decoders and
always use SdpAudioFormat. (And eventually to do the same for encoders
too.)

NOTRY=true
BUG=5801

Review-Url: https://codereview.webrtc.org/2365653004
Cr-Commit-Position: refs/heads/master@{#14506}
2016-10-04 16:33:33 +00:00
isheriff
3168781d2f Add AlrDetector
This is a simple application limited region detector that is quite conservative
at the moment. We detect as being application-limited if we see sending rate
as less than 30% of the estimated bandwidth over 500 ms. The moment we detect
a single burst above 30% over a 100 ms period, we consider ourselves network
limited.

This class is currently not used. A follow up CL will leverage this to enable probing.

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2340763004
Cr-Commit-Position: refs/heads/master@{#14505}
2016-10-04 15:43:15 +00:00
isheriff
cc5903e15f BitrateProber: Support higher probing bitrates
Currently, BitrateProber does not scale higher than 2 Mbps to 6 Mbps. The actual
number is dependent on the size of the last packet. If a packet of around 250
bytes is used for probing, it fails above 2 Mbps.

BitrateProber now provides a recommendation on probe size instead of a
packet size. PacedSender utilizes this to decide on the number of packets
per probe. This enables BitrateProber to scale up-to higher bitrates.

Tests with chromoting show it stalls at about 10 Mbps (perhaps due to the
limitation on the simulation pipeline to deliver packets).

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2347023002
Cr-Commit-Position: refs/heads/master@{#14503}
2016-10-04 15:29:45 +00:00
Rasmus Brandt
3821399075 Centralize deactivation of Unequal Protection.
This CL introduces changes that clearly demarcate
where we disable Unequal Protection in the FEC.

No functional changes are expected.

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

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

Cr-Commit-Position: refs/heads/master@{#14496}
2016-10-04 12:28:05 +00:00
ossu
9f38c218ee Cache the subtype of each DecoderInfo to make the Is* checks quicker.
Addresses a regression in the NetEq performance test.

# Added NOTRY due to android_arm64_rel being swamped.
NOTRY=True
BUG=chromium:651426

Review-Url: https://codereview.webrtc.org/2383723002
Cr-Commit-Position: refs/heads/master@{#14495}
2016-10-04 12:23:36 +00:00
aleloi
dc7669a8a6 This removes forward declarations, changes include order, changes integers to plain 'int', and changes static methods to non-members.
BUG=6346
NOTRY=True

Review-Url: https://codereview.webrtc.org/2302483002
Cr-Commit-Position: refs/heads/master@{#14494}
2016-10-04 11:06:28 +00:00
ehmaldonado
ebb0b8ec9a Increase the threshold for RunPlayoutAndRecordingInFullDuplex.
RunPlayoutAndRecordingInFullDuplex fails sometimes on Android swarming
bots, presumably because the timing is hardware dependent.

This test ensures that audio starts pumping. The exact performance is
not that important.

R=kjellander@webrtc.org, henrika@webrtc.org
BUG=webrtc:6464
NOTRY=True

Review-Url: https://codereview.webrtc.org/2391563002
Cr-Commit-Position: refs/heads/master@{#14492}
2016-10-04 08:59:05 +00:00
Rasmus Brandt
c07ebb30c5 Simplify public interface of ProducerFec.
- Change some member functions to be private. These were only
  called by other private member functions.
- Replace DeleteMediaPackets() with direct calls to
  media_packets_.clear()
- Rename GetFecPacketsAsRed to GetUlpfecPacketsAsRed.

No functional changes are intended by this CL.

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

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

Cr-Commit-Position: refs/heads/master@{#14491}
2016-10-04 08:57:47 +00:00