Commit Graph

1463 Commits

Author SHA1 Message Date
Peter Boström
a831dc3a7d Convert native handles to buffers before encoding.
Required to permit conversion of NV12 handles on iOS to I420 for VP8
software encoding, which blocks texture-based capture. This change
enforces that all texture-based input provides a method for converting
native handles to I420 if they are ever used with software encoders that
do not understand the native handles.

BUG=4081
R=emircan@chromium.org, glaznev@webrtc.org, hbos@webrtc.org, magjed@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9347}
2015-06-01 18:06:52 +00:00
Henrik Lundin
5263b3c1dd Add options for NetEq fast accelerate mode through libjingle
This CL connects RTCConfiguration::audioJitterBufferFastMode in
PeerConnection.java, through libjingle, down to
NetEq::Config::enable_fast_accelerate in native WebRTC.

When enabled, it will allow NetEq to do faster time-compression when
the buffer level is very high.

BUG=4691
R=henrika@webrtc.org, mflodman@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9344}
2015-06-01 08:29:55 +00:00
Miguel Casas-Sanchez
4765070b8d Rename I420VideoFrame to VideoFrame.
This is a mechanical change since it affects so many
files.
I420VideoFrame -> VideoFrame
and reformatted.

Rationale: in the next CL I420VideoFrame will
get an indication of Pixel Format (I420 for
starters) and of storage type: usually
UNOWNED, could be SHMEM, and in the near
future will be possibly TEXTURE. See
https://codereview.chromium.org/1154153003
for the change that happened in Cr.

BUG=4730, chromium:440843
R=jiayl@webrtc.org, niklas.enbom@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9339}
2015-05-30 00:21:56 +00:00
Jon Hjelle
c2cb266c93 Match video orientation with device orientation for portrait and portrait upside down
BUG=
R=tkchin@webrtc.org

Committed: https://crrev.com/14c2695f2968d6e8546545a9b62940563073b4b6
Patch from Jon Hjelle <hjon@andynet.net>.

Cr-Commit-Position: refs/heads/master@{#9336}

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

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

Cr-Commit-Position: refs/heads/master@{#9338}
2015-05-29 23:38:31 +00:00
Zeke Chin
7be99bdea1 Revert "Match video orientation with device orientation for portrait and portrait upside down"
Misspelt contributor's email address. Easier to revert and reland.
TBR=hjon@andyet.net

This reverts commit 14c2695f29.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9337}
2015-05-29 23:34:43 +00:00
Jon Hjelle
14c2695f29 Match video orientation with device orientation for portrait and portrait upside down
BUG=
R=tkchin@webrtc.org

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

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

Cr-Commit-Position: refs/heads/master@{#9336}
2015-05-29 22:25:00 +00:00
Zeke Chin
bc7dd7e023 Add RTCConfiguration constructor to RTCPeerConnection wrapper.
BUG=4658
R=jiayl@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9335}
2015-05-29 21:59:23 +00:00
Joachim Bauch
d935f912b1 Don't try to parse empty Ice urls.
https://crrev.com/7c4e7458b5ce99c13a75d5be7d718ef94e2f8f9f added support
to pass a list of urls for IceServer configurations. This CL fixes a
potential crash when empty urls are passed.

BUG=2096
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9334}
2015-05-29 20:14:28 +00:00
Henrik Kjellander
a8202aadd5 Roll chromium_revision 1b9c098..ccef3cb (330302:331232)
Relevant changes:
* src/buildtools: b73e5f7..dc487f4
* src/third_party/android_tools: 3445d55..3c5189b
* src/third_party/boringssl/src: 9660032..a7997f1
Details: 1b9c098..ccef3cb/DEPS

Clang version was not updated in this roll.

BUG=4695
TBR=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9333}
2015-05-29 18:13:32 +00:00
Lally Singh
5c6c6e026b Implements TODOs for webrtc::datachannel state management when the SCTP association is congested. Adds missing state variables for each step in the transitions between DataChannelInterface::DataStates (kConnecting, kOpen, etc.), and uses them.
BUG=https://code.google.com/p/chromium/issues/detail?id=474650
R=jiayl@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9331}
2015-05-29 15:52:44 +00:00
Jelena Marusic
c28a896a7b VoE: Initialize WebRtcVoiceMediaChannel with AudioOptions during creation
BUG=4690

Changes:
1. In MediaEngineInterface changed CreateChannel() to CreateChannel(const AudioOptions&). Plan is to eventually remove Get/SetAudioOptions and the cousins SetDelayOffset and SetDevices.
2. In ChannelManager changed CreateVoiceChannel(...) to CreateVoiceChannel(..., const AudioOptions&).
3. In ChannelManager removed SetEngineAudioOptions, because it is not used and we want to eventually remove SetAudioOptions.
4. Updated MediaEngineInterface implementations and unit tests accordingly.
5. In WebRtcVoiceEngine changed access of Set/ClearOptionOverrides to protected. These are only used by WebRtcVoiceMediaChannel (now a friend). Plan is to rethink the logic behind option overrides.
6. Cosmetics: replaced NULL with nullptr in touched code

R=solenberg@google.com, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9330}
2015-05-29 13:05:52 +00:00
Joachim Bauch
04e5b49827 Make maximum SSL version configurable through PeerConnectionFactory::Options
This can be used to activate DTLS 1.2 through a command-line flag from Chromium
later.

BUG=chromium:428343
R=jiayl@webrtc.org, juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9328}
2015-05-29 07:40:51 +00:00
Joachim Bauch
e70028e43f Protect access to shared list of SRTP sessions.
This is a follow up to https://webrtc-codereview.appspot.com/47319004/
and locks access to the static list of SRTP sessions to prevent potential
race conditions.

BUG=4042
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9326}
2015-05-28 23:21:00 +00:00
Alex Glaznev
9e3cb336d4 AppRTCDemo: check for necessary permissions before starting the call.
Also update PeerConnection.RTCConfiguration values.

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9325}
2015-05-28 22:51:59 +00:00
Peter Boström
5ee9f679a5 Remove webrtcvideoengine.cc.
This file is no longer built here or in Chromium and can be removed.

BUG=1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9322}
2015-05-28 22:13:09 +00:00
Joachim Bauch
7c4e7458b5 Support multiple URLs in PeerConnectionInterface::IceServer
This adds support for multiple URLs in a IceServer configuration as
defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCIceServer.

BUG=2096
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9320}
2015-05-28 21:06:44 +00:00
Donald Curtis
d4f769d8fc Stop video candidates getting down to audio.
Second attempt at adding a check to make sure that the video
transportproxy doesn't send down candidates to the audio transport
channel when things are bundled.

BUG=4665
R=juberti@google.com, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9316}
2015-05-28 16:48:30 +00:00
Peter Boström
259bd2034c Report ssrc_groups in GetStats().
This was already available in the stats struct, just not filled in.

BUG=4720
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9308}
2015-05-28 11:40:00 +00:00
Henrik Boström
3b187b9c0c Removed unnecessary includes of webrtcvideocapturer.h
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9305}
2015-05-28 09:43:45 +00:00
Peter Boström
23c2e55479 Remove remaining .mk files.
These files are not supported, kept up to date or likely to build
anymore.

BUG=
R=glaznev@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9303}
2015-05-28 09:05:11 +00:00
Joachim Bauch
fec2c6d7eb Prevent potential double-free if srtp_create fails.
If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.

The CL also adds locking for libsrtp initialization / shutdown.

BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9300}
2015-05-27 21:41:52 +00:00
Henrik Boström
cbe408aa11 WebRtcVideoCapturer: Getting rid of the |critical_section_stopping_| lock and all of its critical sections.
This avoids a deadlock in WebRtcVideoCapturer.
The deadlock could occur because OnIncomingFrame() has the |critical_section_stopping_| lock, which could block a Stop() on the |start_thread_|. When OnIncomingFrame() then tries to do synchronous invoke on |start_thread_| (before releasing said lock) we have a deadlock.

BUG=4670
R=magjed@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9294}
2015-05-27 08:11:38 +00:00
Jelena Marusic
f09e09c7ee VoE: Remove unused interfaces
BUG=4690

I have removed methods in VoE interfaces that were marked to be removed. I have removed them also in fake and mock implementations. I have also updated the callers in various ways:
1. Project win_test had some calls to the removed methods, but it turned out that the project is not used anymore, so I removed it entirely.
2. There were some calls to removed methods in jni methods. I have removed couple of jni methods as now they seem to do nothing.
3. With the remaining callers I just removed the calls to removed methods.

R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9281}
2015-05-26 08:25:00 +00:00
Peter Boström
54be3e0049 Remove some WebRtcVideoEngine2 unittest stubs.
Also contains some cleanup/typo fixes.

BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9277}
2015-05-25 13:04:33 +00:00
Tommi
0eefb4d5c3 Detach base/logging.* from base/stream.*.
This is being done in preparation of moving base/logging.* to rtc_base_approved. base/stream.* has libjingle dependencies that webrtc can't use, so logging.* can't depend on streams. It does look like stream.* isn't used much, so cleaning that up as well as cleaning up usage of the actual stream support (now LogStream) in the logging code, is in order, but I'll leave that to another cl.

BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9269}
2015-05-23 07:54:19 +00:00
Andrew MacDonald
469c2c04aa Make Config::default_value leak instead of having an exit-time destructor.
I wanted to use Config::Get in Chromium code, but it triggered the following
warning:
../../third_party/webrtc/common.h:89:20: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
    static const T def;
                   ^
../../third_party/webrtc/common.h:110:10: note: in instantiation of function template specialization requested here
  return default_value<T>();
         ^

I assume we don't hit this in webrtc because the warning is disabled.

This also switches to the RTC_ prefix from the deprecated LIBJINGLE_.

Needed due to this Chromium CL:
https://codereview.chromium.org/1148843004/

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

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

Cr-Commit-Position: refs/heads/master@{#9268}
2015-05-23 00:50:33 +00:00
Alejandro Luebs
4bf12eafba Revert "Fix sending wrong candidates down to transportchannel."
This reverts commit f65de8483e.

It was breaking the build bots: http://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Light/builds/3062

TBR=decurtis

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9267}
2015-05-22 22:32:51 +00:00
Donald Curtis
f65de8483e Fix sending wrong candidates down to transportchannel.
BUG=4665
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9266}
2015-05-22 21:55:26 +00:00
Peter Boström
3548dd2154 Set local SSRCs on receivers added before senders.
Addresses bug where a receiver would report SSRC 1 even though the
endpoint has sending streams.

BUG=4678
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9262}
2015-05-22 16:48:13 +00:00
Henrik Boström
915df4fc30 CaptureManager: Don't stop a capturer at UnregisterVideoCapturer if it did not start in the first place.
This fixes a bug where, if the VideoCapturer failed to start under certain circumstances, the capture manager would cause a callback saying that the capturer stopped even though it never started in the first place. A VERIFY check in VideoSource::SetState would then cause a crash since the state was set to kEnded when it was already in state kEnded (SetState only allows being called when the state changes).

I only noticed this bug while doing a mistake in a separate CL. Not sure how to reliably reproduce said bug on a working build, but I have previously had camera hardware issues where it couldn't start the camera which resulted in the SetState kEnded -> kEnded crash. Hopefully this will fix that.

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9259}
2015-05-22 07:43:10 +00:00
Fredrik Solenberg
9a416bd14e Get rid of unnecessary Terminate() method and worker_thread_ from WebRtcVideoEngine2
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9258}
2015-05-22 07:03:48 +00:00
jackychen
98d8cf58ee Hardware VP8 encoding: Use QP as metric for resize.
Add vp8 frame header parser to get QP from vp8 bitstream.

BUG= 4273
R=glaznev@webrtc.org, marpan@google.com, pbos@webrtc.org
TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9256}
2015-05-21 18:11:53 +00:00
Peter Thatcher
af55ccc054 Add RtcpMuxPolicy support to PeerConnection.
BUG=4611
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9251}
2015-05-21 14:48:19 +00:00
Tommi
76b62ff1ad Clean up now-unused code that was used for libpeerconnection.[so|dll].
BUG=chromium:463660
R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9240}
2015-05-20 20:36:42 +00:00
Fredrik Solenberg
fce324272d Remove linphonemediaengine.*
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9239}
2015-05-20 18:40:22 +00:00
Peter Boström
c3f4dbc40b Remove rtp_rtcp/ dump functionality.
Removes RTP dumping from VideoEngine and VoiceEngine.

BUG=1695
R=henrika@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9234}
2015-05-20 12:10:56 +00:00
Joachim Bauch
831c5585c7 Allow setting maximum protocol version for SSL stream adapters.
This CL adds an API to SSL stream adapters to set the maximum allowed
protocol version and with that implements support for DTLS 1.2.
With DTLS 1.2 the default cipher changes in the unittests as follows.

BoringSSL
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

NSS
TLS_RSA_WITH_AES_128_CBC_SHA -> TLS_RSA_WITH_AES_128_GCM_SHA256

BUG=chromium:428343
R=juberti@google.com

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

Cr-Commit-Position: refs/heads/master@{#9232}
2015-05-20 10:48:24 +00:00
Peter Boström
4d71edef45 Add HW fallback option to software encoding.
Permits falling back to software encoding for unsupported resolutions.

BUG=chromium:475116, chromium:487934
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9227}
2015-05-19 21:09:17 +00:00
Guo-wei Shieh
17b889b899 Issue 4366: Adapted frames have wrong width and height and are cropped.
When a frame being stretched, the original rotation information is lost. This is to ensure it's carried over.

Also removed StretchToBuffer function as it's not called and dangerous.

BUG=4366
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9224}
2015-05-19 19:45:26 +00:00
Alex Glaznev
2f5be9ad63 Improve Android camera error handling.
- Set Camera.ErrorCallback callback when opening camera to
receive camera server error notifications.
- Allow user to provide interface for handling camera errors
happening on camera thread.
- Run camera observer on camera thread and monitor camera fps
and amount of callback buffers, print statistics and report error
if camera stops generating frames.
- Query camera formats starting from front camera instead of back
camera to detect camera failures as fast as possible.
- Change all DCHECK to CHECK in androidvideocapturer.cc to detect
camera error on release builds.
- Plus adding some extra logging.

R=hbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9221}
2015-05-19 17:56:22 +00:00
Fredrik Solenberg
ccb49e79fd Remove Soundclip handling from libjingle.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9216}
2015-05-19 09:37:39 +00:00
Weiyong Yao
b92be45c85 Support 720P in portait as maximum on iOS.
BUG=4643
TEST=Manual Test and trybots
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9214}
2015-05-19 02:53:07 +00:00
Noah Richards
2e7a098005 Ensure mediasession generated offers with RTX contain an RTX ssrc for each video ssrc.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9210}
2015-05-18 21:02:40 +00:00
Peter Boström
7252a2ba80 Add HW fallback option to software decoding.
Permits falling back to software decoding for unsupported resolutions in
bitstreams.

BUG=4625, chromium:487934
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9209}
2015-05-18 17:41:50 +00:00
henrika
b26198972c Adding support for OpenSL ES output in native WebRTC
BUG=4573,2982,2175,3590
TEST=modules_unittests --gtest_filter=AudioDevice*, AppRTCDemo and WebRTCDemo

Summary:

- Removes dependency of the 'enable_android_opensl' compiler flag.
  Instead, OpenSL ES is always supported, and will enabled for devices that
  supports low-latency output.
- WebRTC no longer supports OpenSL ES for the input/recording side.
- Removes old code and demos using OpenSL ES for audio input.
- Improves accuracy of total delay estimates (better AEC performance).
- Reduces roundtrip audio latency; especially when OpenSL can be used.

Performance verified on: Nexus 5, 6, 7 and 9. Samsung Galaxy S4 and S6.
Android One device.

R=magjed@webrtc.org, phoglund@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9208}
2015-05-18 14:49:04 +00:00
Donald Curtis
144d01850b fix indent on tokenize_first function signatures
R=juberti@google.com, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9198}
2015-05-15 20:14:13 +00:00
Donald Curtis
0e07f92043 Split fmtp on semicolons not spaces as per RFC6871
BUG=4617
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9193}
2015-05-15 16:21:16 +00:00
Henrik Kjellander
4cd6940e49 Enable -Wformat-security warning and cleanup GYP.
Enable the -Wformat-security and -Wformat warnings for talk/.

Remove *.def and *.h.pump files from webrtc/base/base.gyp since they're not supported by some tools.

BUG=4242
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9191}
2015-05-15 07:10:32 +00:00
Yuriy Shevchuk
39f2b0c870 Implemented video device info for iOS
R=pbos@webrtc.org, tkchin@webrtc.org

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

Patch from Yuriy Shevchuk <youwrk@gmail.com>.

Cr-Commit-Position: refs/heads/master@{#9190}
2015-05-14 21:16:01 +00:00
Minyue
2013aeced2 Propagating RTT from send-only channel to receive-only channel.
This is important for obtaining ntp time at receiver-only channel, which does not have RTT directly.

BUG=3978

TEST=chromium with hangout calls
R=henrika@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9186}
2015-05-13 12:14:36 +00:00