Commit Graph

7569 Commits

Author SHA1 Message Date
pbos@webrtc.org
7cc92aaf37 Use WebRtcVideoRenderFrame for texture frames.
Removes buffer/texture path separation inside WebRtcVideoEngine and
DeliverTextureFrame(). This unifies frame delivery with
WebRtcVideoEngine2 which is expected to automagically work with texture
frames after this change.

BUG=1788
R=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38069005

Cr-Commit-Position: refs/heads/master@{#8326}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8326 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 09:03:44 +00:00
henrika@webrtc.org
62f6e75673 Refactoring WebRTC Java/JNI audio recording in C++ and Java.
This is a big refactoring of the existing C++/JNI/Java support for audio recording in native WebRTC:

- Removes unused code and old WEBRTC logging macros
- Now uses optimal sample rate and buffer size in Java AudioRecord (used hard-coded sample rate before)
- Makes code more inline with the implementation in Chrome
- Adds helper methods for JNI handling to improve readability
- Changes the threading model (high-prio audio thread now lives in Java-land and C++ only works as proxy)
- Adds basic thread checks
- Removes all locks in C++ land
- Removes all locks in Java
- Improves construction/destruction
- Additional cleanup

Tested using AppRTCDemo and WebRTCDemo APKs on N6, N5, N7, Samsung Galaxy S4 and
Samsung Galaxy S4 mini (which uses 44.1kHz as native sample rate).

BUG=NONE
R=magjed@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33969004

Cr-Commit-Position: refs/heads/master@{#8325}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8325 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 08:39:19 +00:00
henrik.lundin@webrtc.org
c2d0473320 Switch to using AudioEncoderPcm16B instead of ACMPCM16B
This change switches from the old codec wrapper ACMPCM16B to the new
AudioEncoderPcm16B wrapped in an ACMGenericCodecWrapper.

BUG=4228
COAUTHOR=kwiberg@webrtc.org
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33249004

Cr-Commit-Position: refs/heads/master@{#8324}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8324 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 08:25:44 +00:00
kjellander@webrtc.org
f58fe0ab2b Rename GYP and GN targets for video capture+render.
This CL performs the following renames of targets to
make GYP and GN more unified and make the targets that
have the same name as the module and include the external
render/capture implementation (the internal one is only
used by WebRTC tests).
This makes it natural to declare dependencies in GN
without having to specify the target.

Summary of the renames:
GYP:
video_render_module_impl -> video_render (new target)
video_capture_module_impl -> video_capture (new target)

GN:
video_capture -> video_capture_module (now identical to the GYP target)
video_capture_impl -> video_capture

video_render -> video_render_module (now identical to the GYP target)
video_render_impl -> video_render

BUG=456815
R=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35099004

Cr-Commit-Position: refs/heads/master@{#8323}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8323 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 07:47:47 +00:00
andrew@webrtc.org
2c29c2eae2 C++ readability review for ajm.
As part of the review, refactored AudioConverter into internal derived
classes, each focused on one type of conversion. A factory method
returns the correct converter (or chain of converters, via
CompositionConverter).

BUG=b/18938079
R=rojer@google.com

Review URL: https://webrtc-codereview.appspot.com/35699004

Cr-Commit-Position: refs/heads/master@{#8322}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8322 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 01:10:17 +00:00
aluebs@webrtc.org
5d608955cf Fix bug when there are no blocks in a chunk in Beamformer
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37119004

Cr-Commit-Position: refs/heads/master@{#8321}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8321 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 00:48:55 +00:00
glaznev@webrtc.org
bc35703694 Add a method to remove an existing renderer from the internal list of Android renderers.
BUG=4290
R=jiayl@webrtc.org, mquiros@google.com

Review URL: https://webrtc-codereview.appspot.com/36089004

Cr-Commit-Position: refs/heads/master@{#8320}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8320 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 23:23:47 +00:00
glaznev@webrtc.org
bc40324d9c Merge fixes and changed for Android AppRTCDemo from internal repo.
- Rename AppRTCDemoActivity to CallActivity and move UI controls
to a fragment.
- Add option to enable/disable statistics.
- Move peer connection and video constraints from URL to peer
connection client.
- Variable renaming.

R=jiayl@webrtc.org, wzh@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33299004

Cr-Commit-Position: refs/heads/master@{#8319}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8319 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 23:05:04 +00:00
aluebs@webrtc.org
d35a5c3506 Make ChannelBuffer aware of frequency bands
Now the ChannelBuffer has 2 separate arrays, one for the full-band data and one for the splitted one. The corresponding accessors are added to the ChannelBuffer.
This is done to avoid having to refresh the bands pointers in AudioBuffer. It will also allow us to have a general accessor like data()[band][channel][sample].
All the files using the ChannelBuffer needed to be re-factored.
Tested with modules_unittests, common_audio_unittests, audioproc, audioproc_f, voe_cmd_test.

R=andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36999004

Cr-Commit-Position: refs/heads/master@{#8318}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8318 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 22:52:43 +00:00
kwiberg@webrtc.org
d7472b52d6 base/arraysize.h: We use size_t, so need to include stddef.h
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39029004

Cr-Commit-Position: refs/heads/master@{#8317}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8317 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 22:47:14 +00:00
aluebs@webrtc.org
91ba79ae3f Make sure that the norms are positive in Beamformer
This has a bit exact output, but is just to be sure that there are no nummerical errors when the covariance matrices are nearly singular.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39019004

Cr-Commit-Position: refs/heads/master@{#8316}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8316 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 22:38:18 +00:00
aluebs@webrtc.org
b6856d2823 Apply mask smoothing in Beamformer
This generates much more aggressive postfilter masks, which remove the interference and background noise better.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35089004

Cr-Commit-Position: refs/heads/master@{#8315}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8315 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 18:23:35 +00:00
henrik.lundin@webrtc.org
8da96ac0f6 Switch to using AudioEncoderIlbc instead of ACMILBC
This change switches from the old codec wrapper ACMILBC to the new
AudioEncoderIlbc wrapped in an ACMGenericCodecWrapper.

BUG=4228
COAUTHOR=kwiberg@webrtc.org
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40699004

Cr-Commit-Position: refs/heads/master@{#8314}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8314 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 15:34:38 +00:00
tommi@webrtc.org
1a072f93eb Address comments from previous review round for rtc::Event.
R=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35049004

Cr-Commit-Position: refs/heads/master@{#8313}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8313 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 12:28:12 +00:00
pbos@webrtc.org
f4c10d24dc Always use DeliverI420Frame in WebRtcVideoEngine.
Moves native_handle() path to DeliverI420Frame and CHECKs that
DeliverFrame is not being used anymore.

R=magjed@webrtc.org, mflodman@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/38019004

Cr-Commit-Position: refs/heads/master@{#8312}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8312 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 10:20:38 +00:00
stefan@webrtc.org
027e113209 Introduce PacketReceiver and remove configuration of simulations via the BweTestConfig.
This makes it possible to build more flexible simulations, and makes it easier to implement bi-directional simulations. This also removes support for generating baseline files and comparing against a baseline, which hasn't turned out to be particuarly useful.

BUG=4173
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35069004

Cr-Commit-Position: refs/heads/master@{#8311}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8311 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 09:49:00 +00:00
tommi@webrtc.org
30015e3180 Fix bug in EventPosix where we'd miss a set event.
In cases of timeout or error, we could change the state of the event to 'down' (unset) and subsequently never satisfy a Wait() for a given Set().

BUG=4284
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38049004

Cr-Commit-Position: refs/heads/master@{#8310}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8310 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 09:34:02 +00:00
kwiberg@webrtc.org
648f5d6dc7 pcm16b: Make input arrays const and use uint8_t[] for byte arrays
There were both uint8 and uint16 versions of the pcm16b encode and
decode functions; this patch removes the latter.

BUG=909
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34139004

Cr-Commit-Position: refs/heads/master@{#8309}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8309 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 09:19:09 +00:00
mflodman@webrtc.org
948d61724c Create a separate thread for pacing.
This CL moves the pacer out from the regular module process thread to
instead use one thread per pacer. This is to get better accuracy for the
paced packets and to avoid overusing the module process thread.

BUG=
TEST=existing tests
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41839004

Cr-Commit-Position: refs/heads/master@{#8308}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8308 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 08:59:00 +00:00
minyue@webrtc.org
c11348b5d7 Fixing a bug in expand_rate calculation for stereo signal.
BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41849004

Cr-Commit-Position: refs/heads/master@{#8307}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8307 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 08:36:07 +00:00
tommi@webrtc.org
8e612aba60 Remove voice_engine_ member variable and GetVoiceEngine() from ViEChannelManager.
This is dead code right now and since the implementation of GetVoiceEngine() grabbed a lock and returned a raw pointer, it's not to be trusted anyway :)

R=mflodman@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/37869005

Cr-Commit-Position: refs/heads/master@{#8306}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8306 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 08:16:02 +00:00
kjellander@webrtc.org
5b8f3e0206 Roll chromium_revision 598c3e9..601e6f3
Relevant changes:
* src/buildtools: 451dcd0..da0df3f
* src/third_party/openmax_dl: c01d587..81318c1
* src/tools/swarming_client: c698ea2..bdad118
Details: 598c3e9..601e6f3/DEPS

Clang version was not updated in this roll.

TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35059004

Cr-Commit-Position: refs/heads/master@{#8305}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8305 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 07:34:41 +00:00
glaznev@webrtc.org
44ae4c8b07 Support using VP9 video codec in AppRTCDemo.
- Add peer connection Java API to initialize field trial string.
- Add setting option to select VP8 or Vp9 as default video codec.
- Minor code clean up and allowing 720p portrait encoding.

R=wzh@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39899004

Cr-Commit-Position: refs/heads/master@{#8303}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8303 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 23:26:41 +00:00
tommi@webrtc.org
f7e6cfd3a0 Add CHECK to EventWrapper to see if there's a subtle bug there or not.
R=pbos@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/38039005

Cr-Commit-Position: refs/heads/master@{#8302}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8302 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 18:25:56 +00:00
glaznev@webrtc.org
669bc7ee43 Modify default field trial implementation to allow
WebRTC client to turn on feature code.

R=andresp@webrtc.org, henrika@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39729004

Cr-Commit-Position: refs/heads/master@{#8301}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8301 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 18:18:19 +00:00
tommi@webrtc.org
11c5db01af Revert 8273 "Temporarily change ThreadPosix to CHECK (crash) if ..."
> Temporarily change ThreadPosix to CHECK (crash) if we ever spend more than 30 seconds waiting for thread shutdown. There are cases on build bots where it looks like we're hitting this problem, but reproducing locally has been a struggle.
> 
> TBR=pbos@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/41799004

TBR=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38039004

Cr-Commit-Position: refs/heads/master@{#8300}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8300 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 16:31:54 +00:00
pbos@webrtc.org
0d852d5c27 Use VideoReceiveStream as an ExternalRenderer.
Removes AddRenderCallback from ViERenderer and implements
VideoReceiveStream on top of DeliverI420Frame like WebRtcVideoEngine
currently does today.

Also adds ::IsTextureSupported() to the VideoRenderer interface to
permit querying whether an external renderer supports texture rendering.

R=stefan@webrtc.org
TBR=mflodman@webrtc.org
BUG=1667

Review URL: https://webrtc-codereview.appspot.com/34169004

Cr-Commit-Position: refs/heads/master@{#8299}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8299 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 15:15:24 +00:00
stefan@webrtc.org
d6e25a5b27 Revert r8297 "Introduce PacketReceiver and remove configuration of simulations via the BweTestConfig."
BUG=4173
R=andresp@webrtc.org
TBR=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38029004

Cr-Commit-Position: refs/heads/master@{#8298}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8298 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 15:06:42 +00:00
stefan@webrtc.org
03c1c103e4 Introduce PacketReceiver and remove configuration of simulations via the BweTestConfig.
This makes it possible to build more flexible simulations, and makes it easier to implement bi-directional simulations. This also removes support for generating baseline files and comparing against a baseline, which hasn't turned out to be particuarly useful.

BUG=4173
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34989004

Cr-Commit-Position: refs/heads/master@{#8297}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8297 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 14:47:15 +00:00
andresp@webrtc.org
53d9012faf Clean kForever from basictypes and move it to the interfaces that actually have it.
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33269004

Cr-Commit-Position: refs/heads/master@{#8296}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8296 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 14:19:39 +00:00
henrik.lundin@webrtc.org
e01bae24a5 Fixing a nit
This is a follow-up for https://webrtc-codereview.appspot.com/33209004/
where a post-commit nit was provided.

R=tommi@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35039004

Cr-Commit-Position: refs/heads/master@{#8295}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8295 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 13:21:44 +00:00
kwiberg@webrtc.org
1c6239a3b6 G711: Make input arrays const and use uint8_t[] for byte arrays
BUG=909
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39809004

Cr-Commit-Position: refs/heads/master@{#8294}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8294 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 12:56:16 +00:00
tommi@webrtc.org
d0165c62b5 Use a manual reset event in PosixThread.
This fixes occasional hangs we've been seeing in the past few days. I'm using rtc::Event instead of the EventWrapper, so I'll wait with landing this cl until I've made that change in a separate cl.

BUG=2822,4282
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38009004

Cr-Commit-Position: refs/heads/master@{#8293}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8293 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 11:48:13 +00:00
tommi@webrtc.org
4c0fd965ce Move rtc::Event to rtc_base_approved. We need an event implementation in WebRTC that allows us to specify whether it's manually reset or automatically. EventWrapper currently doesn't support it and it adds a heap allocation + vtable, so rtc::Event is the lighter of the two.
I'm also tidying rtc::Event up a bit. Removing member variable that's not needed on all platforms and moving the mutex itself up in the member list given the recent alignment scare on Mac.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38999004

Cr-Commit-Position: refs/heads/master@{#8292}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8292 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 10:23:39 +00:00
pbos@webrtc.org
8cf9bdb3fa Remove USE_WEBRTC_DEV_BRANCH.
talk/ and webrtc/ are hosted in the same repository and it no longer
makes sense to support building talk/ without the corresponding webrtc/
catalog.

R=bjornv@webrtc.org, juberti@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/39849004

Cr-Commit-Position: refs/heads/master@{#8291}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8291 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 10:17:12 +00:00
kjellander@webrtc.org
2b69eab077 Restructure GYP for vp9, opus and direct trace
This is needed to make the build more flexible for some use cases.

BUG=4185
R=andresp@webrtc.org, stefan@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34099004

Cr-Commit-Position: refs/heads/master@{#8290}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8290 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 10:01:40 +00:00
changbin.shao@webrtc.org
f31f56d8d4 Remove default arguments in EncodedImageCallback.
BUG=
R=mflodman@webrtc.org, pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39719004

Cr-Commit-Position: refs/heads/master@{#8289}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8289 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 09:14:48 +00:00
guoweis@webrtc.org
6c930c7183 Cleanup: unify rotation to be enum based instead of int for degree.
Split from https://webrtc-codereview.appspot.com/37029004/

BUG=4145
R=pthatcher@webrtc.org, stefan@webrtc.org

Committed: https://code.google.com/p/webrtc/source/detail?r=8257

Committed: https://code.google.com/p/webrtc/source/detail?r=8276

Committed: https://code.google.com/p/webrtc/source/detail?r=8277

Review URL: https://webrtc-codereview.appspot.com/37129004

Cr-Commit-Position: refs/heads/master@{#8288}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8288 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-09 01:29:45 +00:00
tommi@webrtc.org
7a57f8f101 Reland 8203 "Reducing locking in OveruseFrameDetect..."
The issue that was causing the thread checker to report error, turned out to be unrelated.

> Revert 8203 "Reducing locking in OveruseFrameDetector and increa..."
>
> Broke tests in Chrome for some reason:
>
> [ RUN      ] WebRtcAecDumpBrowserTest.CallWithAecDump
> [80131:1287:0129/074432:30561723987517:ERROR:vt_video_decode_accelerator.cc(132)] Failed to create VTDecompressionSession: codecOpenErr (-8973)
> [80129:1287:0129/074432:30562276677373:INFO:CONSOLE(64)] "Looking at video in element remote-view-1", source: http://127.0.0.1:61401/media/webrtc_test_utilities.js (64)
> [80129:1287:0129/074432:30562281435788:INFO:CONSOLE(64)] "Looking at video in element remote-view-2", source: http://127.0.0.1:61401/media/webrtc_test_utilities.js (64)
> [80129:1287:0129/074432:30562315329399:INFO:CONSOLE(800)] "Negotiating call...", source: http://127.0.0.1:61401/media/peerconnection-call.html (800)
> [80133:29187:0129/074432:30562402039578:FATAL:overuse_frame_detector.cc(388)] Check failed: processing_thread_.CalledOnValidThread().
> 0   libbase.dylib                       0x000000010dfd688f base::debug::StackTrace::StackTrace() + 47
> 1   libbase.dylib                       0x000000010dfd68e3 base::debug::StackTrace::StackTrace() + 35
> 2   libbase.dylib                       0x000000010e030076 logging::LogMessage::~LogMessage() + 70
> 3   libbase.dylib                       0x000000010e02f0c3 logging::LogMessage::~LogMessage() + 35
> 4   libcontent.dylib                    0x000000011d8c0cd5 webrtc::OveruseFrameDetector::TimeUntilNextProcess() + 245
> 5   libcontent.dylib                    0x000000011d31ddfd webrtc::ProcessThreadImpl::Process() + 525
> 6   libcontent.dylib                    0x000000011d31d836 webrtc::ProcessThreadImpl::Run(void*) + 38
> 7   libcontent.dylib                    0x000000011d10c390 webrtc::ThreadPosix::Run() + 288
> 8   libcontent.dylib                    0x000000011d10c076 webrtc::StartThread(void*) + 38
> 9   libsystem_pthread.dylib             0x00007fff8e667899 _pthread_body + 138
> 10  libsystem_pthread.dylib             0x00007fff8e66772a _pthread_struct_init + 0
> 11  libsystem_pthread.dylib             0x00007fff8e66bfc9 thread_start + 13
>
>
> > Reducing locking in OveruseFrameDetector and increasing constness.
> >
> > I also added a few TODOs there to see what we can do to reduce the chance of contention.
> > To catch regressions, I've started using the ThreadChecker class on the processing thread but it might also be a good idea to add similar checks for other known threads such as the thread we receive frames on.  I'm sure we can reduce locking even further.
> >
> > BUG=2822
> > R=asapersson@webrtc.org
> >
> > Review URL: https://webrtc-codereview.appspot.com/33129004
>
> TBR=tommi@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/34079004

TBR=tommi@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/35029004

Cr-Commit-Position: refs/heads/master@{#8287}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8287 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-08 18:29:12 +00:00
tommi@webrtc.org
103f3289b5 Fix the binary layout of ProcessThreadImpl.
We apparently hit an obscure problem on mac where seemingly an unaligned mutex causes memory corruption.
The effect was that the |modules_| list became corrupt and we crashed.  At this point I'm not exactly
sure what the alignment requirements are but for now, I've fixed up the layout in a way that doesn't cause these same issues.

I'm also changing auto->proper type at the request of drive by reviewers from my previous cl in the same file.

TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38989004

Cr-Commit-Position: refs/heads/master@{#8286}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8286 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-08 00:48:40 +00:00
jlmiller@webrtc.org
ec499beaf5 Increase testclient timeout from 1 to 5 seconds
BUG=4182
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38839004

Cr-Commit-Position: refs/heads/master@{#8285}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8285 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 22:38:16 +00:00
tommi@webrtc.org
fe19699a20 Revert 8260 "Base RWLockWrapper on rtc::SharedExclusiveLock."
Unfortunately this caused channel teardown to hang.
More details in email(s).

> Base RWLockWrapper on rtc::SharedExclusiveLock.
>
> Also moves rtc::Event and rtc::SharedExclusiveLock to rtc_base_approved.
>
> R=tommi@webrtc.org
> BUG=
>
> Review URL: https://webrtc-codereview.appspot.com/38889004

TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34999005

Cr-Commit-Position: refs/heads/master@{#8284}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8284 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 22:36:19 +00:00
tommi@webrtc.org
2eb1660791 Switch ThreadCheckerImpl over to using PlatformThreadRef.
Like PlatformThreadId, this type is borrowed from Chromium.
The difference between the two is that PlatformThreadRef is pthread_t on posix platforms.
On Windows PlatformThreadRef and PlatformThreadId are the same thing.

The reason for this switch is pretty crazy.  On Chromium's "Mac 10.9 dbg" bot,
we have been seeing the following code:

ThreadCheckerImpl::ThreadCheckerImpl() : valid_thread_(CurrentThreadId()) {
  fprintf(stderr, "*** valid=%d\n", valid_thread_);
  valid_thread_ = CurrentThreadId();
  fprintf(stderr, "*** valid after=%d\n", valid_thread_);
}

print this:

*** valid=946872320
*** valid after=5647

This is for the same thread checker instance.

What's worse is that printing out what CurrentThreadId was returning, yielded that it was always returning 5647.

After switching over to pthread_t on Mac, this stopped happening.
So, to remove the current hack, reinstate the class on Mac and take a look at the next problem, I'm switching to pthread_t.
Really looking forward to truly getting to the bottom of this.

Tbr-ing since the build is essentially broken (we can't roll).

TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37199004

Cr-Commit-Position: refs/heads/master@{#8283}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8283 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 19:18:16 +00:00
tommi@webrtc.org
2bf0e90c9d Revert 8275 "This CL adds an API to the SSL stream adapters and ..."
I'm reverting the patch due to compilation issues. It would be great if we could make sure Chromium is ready for the patch before we land it in WebRTC.
As is, we're trying to roll webrtc into Chromium and we can't (this is not the only reason though).  I might reland this after the roll, depending on how that goes though.
Here's an example failure:

e:\b\build\slave\win_gn\build\src\jingle\glue\channel_socket_adapter_unittest.cc(77) : error C2259: 'jingle_glue::MockTransportChannel' : cannot instantiate abstract class
        due to following members:
        'bool cricket::TransportChannel::GetSslCipher(std::string *)' : is abstract
        e:\b\build\slave\win_gn\build\src\third_party\webrtc\p2p\base\transportchannel.h(107) : see declaration of 'cricket::TransportChannel::GetSslCipher'
ninja: build stopped: subcommand failed.

> This CL adds an API to the SSL stream adapters and transport channels to get the SSL cipher that was negotiated with the remote peer.
> 
> BUG=3976
> R=davidben@chromium.org, juberti@webrtc.org, pthatcher@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/26009004

TBR=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40689004

Cr-Commit-Position: refs/heads/master@{#8282}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8282 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 11:13:18 +00:00
tommi@webrtc.org
1d4830a077 Disable ProcessThread tests that are dependent on timing.
Some of the bots are too slow for the tests to make much sense as they are.

TBR=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39869004

Cr-Commit-Position: refs/heads/master@{#8281}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8281 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 08:44:40 +00:00
bjornv@webrtc.org
95a32ec098 Revert 8271 "VirtualSocketServer out-of-order issue with closing..."
Failed on Linux_Memcheck bot.
http://chromegw/i/client.webrtc/builders/Linux%20Memcheck/builds/3182

> VirtualSocketServer out-of-order issue with closing TCP sockets
> 
> https://webrtc-codereview.appspot.com/41449004 added a TURN TCP
> allocation release test which was disabled as it triggered an assert
> in the turnserver.
> 
> This was caused by VirtualSockerServer delivering the last TCP packet
> after closing the connection. Calling
>     VirtualSocketServer::SendTcp
> and
>     VirtualSocket::Close
> from TestTurnTCPReleaseAllocation led to the following order of
> messages in VirtualSocket::OnMessage:
>     MSG_ID_DISCONNECT
>     MSG_ID_PACKET
> 
> This is out of order and triggers an assert in turnserver.cc since the
> socket from which the message arrives has already been discarded,
> subsequently breaking the test.
> 
> In VirtualSocketServer::Disconnect the MSG_ID_DISCONNECT is posted to the
> msg_queue immediately, thus getting ahead of any (slightly delayed)
> actual packets.
> 
> Maybe PostAt(network_delay_ + 1, ...) would be better?
> 
> Re-enables TestTurnTCPReleaseAllocation.
> 
> BUG=
> R=juberti@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/34759004

TBR=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38979004

Cr-Commit-Position: refs/heads/master@{#8280}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8280 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 06:47:21 +00:00
aluebs@webrtc.org
2a44be93e8 Normalize delay-and-sum mask in Beamformer
This normalization is done in the Matlab Code but was never ported to the C++ version.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37919004

Cr-Commit-Position: refs/heads/master@{#8279}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8279 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 02:41:41 +00:00
aluebs@webrtc.org
799e667e9f Add high frequency correction to Beamformer
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35989004

Cr-Commit-Position: refs/heads/master@{#8278}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8278 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-07 01:07:43 +00:00
guoweis@webrtc.org
0c7ec770ff Cleanup: unify rotation to be enum based instead of int for degree.
Split from https://webrtc-codereview.appspot.com/37029004/

BUG=4145
R=pthatcher@webrtc.org, stefan@webrtc.org

Committed: https://code.google.com/p/webrtc/source/detail?r=8257

Committed: https://code.google.com/p/webrtc/source/detail?r=8276

Review URL: https://webrtc-codereview.appspot.com/37129004

Cr-Commit-Position: refs/heads/master@{#8277}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8277 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-06 21:01:47 +00:00
guoweis@webrtc.org
110443aaac Cleanup: unify rotation to be enum based instead of int for degree.
Split from https://webrtc-codereview.appspot.com/37029004/

BUG=4145
R=pthatcher@webrtc.org, stefan@webrtc.org

Committed: https://code.google.com/p/webrtc/source/detail?r=8257

Review URL: https://webrtc-codereview.appspot.com/37129004

Cr-Commit-Position: refs/heads/master@{#8276}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8276 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-06 20:00:46 +00:00