258 Commits

Author SHA1 Message Date
sakal
a4a753857e Android: Script for building libwebrtc.aar.
BUG=webrtc:7023

Review-Url: https://codereview.webrtc.org/2653533004
Cr-Commit-Position: refs/heads/master@{#16232}
2017-01-24 09:25:50 +00:00
aleloi
a067013e90 Minor style change suggested by internal static analysis tool.
BUG=None

Review-Url: https://codereview.webrtc.org/2645333003
Cr-Commit-Position: refs/heads/master@{#16211}
2017-01-23 14:09:35 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00
mbonadei
b55bd97972 Reland of Creating libwebrtc bundle jar (patchset #1 id:1 of https://codereview.webrtc.org/2640023010/ )
Reason for revert:
It seems that we cannot skip the generation of "//webrtc/base/base_java" in chromium without some refactoring because it is included as a dependency in some places.

Original issue's description:
> Revert of Creating libwebrtc bundle jar (patchset #4 id:60001 of https://codereview.webrtc.org/2646443002/ )
>
> Reason for revert:
> This breaks some chromium.webrtc.fyi buildbots with the following error:
>
> ERROR Unresolved dependencies.
> //third_party/webrtc/base:base(//build/toolchain/android:android_arm)
>   needs //third_party/webrtc/base:base_java(//build/toolchain/android:android_arm)
>
>
> Original issue's description:
> > Creating libwebrtc bundle jar
> >
> > Creates a JAR which includes:
> > - //webrtc/base:base_java
> > - //webrtc/modules/audio_device:audio_device_java
> > - //webrtc/sdk/android:libjingle_peerconnection_java
> > - //webrtc/sdk/android:libjingle_peerconnection_metrics_default_java
> >
> > The libwebrtc.jar file will be generated at '<output_dir>/lib.java/webrtc/sdk/android/libwebrtc.jar'.
> >
> > BUG=webrtc:6356
> >
> > Review-Url: https://codereview.webrtc.org/2646443002
> > Cr-Commit-Position: refs/heads/master@{#16189}
> > Committed: a62a82b7e7
>
> TBR=kjellander@webrtc.org,sakal@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6356
>
> Review-Url: https://codereview.webrtc.org/2640023010
> Cr-Commit-Position: refs/heads/master@{#16190}
> Committed: 3c9151b953

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

Review-Url: https://codereview.webrtc.org/2646093004
Cr-Commit-Position: refs/heads/master@{#16203}
2017-01-23 09:25:53 +00:00
mbonadei
3c9151b953 Revert of Creating libwebrtc bundle jar (patchset #4 id:60001 of https://codereview.webrtc.org/2646443002/ )
Reason for revert:
This breaks some chromium.webrtc.fyi buildbots with the following error:

ERROR Unresolved dependencies.
//third_party/webrtc/base:base(//build/toolchain/android:android_arm)
  needs //third_party/webrtc/base:base_java(//build/toolchain/android:android_arm)

Original issue's description:
> Creating libwebrtc bundle jar
>
> Creates a JAR which includes:
> - //webrtc/base:base_java
> - //webrtc/modules/audio_device:audio_device_java
> - //webrtc/sdk/android:libjingle_peerconnection_java
> - //webrtc/sdk/android:libjingle_peerconnection_metrics_default_java
>
> The libwebrtc.jar file will be generated at '<output_dir>/lib.java/webrtc/sdk/android/libwebrtc.jar'.
>
> BUG=webrtc:6356
>
> Review-Url: https://codereview.webrtc.org/2646443002
> Cr-Commit-Position: refs/heads/master@{#16189}
> Committed: a62a82b7e7

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

Review-Url: https://codereview.webrtc.org/2640023010
Cr-Commit-Position: refs/heads/master@{#16190}
2017-01-20 14:48:03 +00:00
mbonadei
a62a82b7e7 Creating libwebrtc bundle jar
Creates a JAR which includes:
- //webrtc/base:base_java
- //webrtc/modules/audio_device:audio_device_java
- //webrtc/sdk/android:libjingle_peerconnection_java
- //webrtc/sdk/android:libjingle_peerconnection_metrics_default_java

The libwebrtc.jar file will be generated at '<output_dir>/lib.java/webrtc/sdk/android/libwebrtc.jar'.

BUG=webrtc:6356

Review-Url: https://codereview.webrtc.org/2646443002
Cr-Commit-Position: refs/heads/master@{#16189}
2017-01-20 14:15:34 +00:00
sakal
35564065ca Camera1Session: Fix camera sometimes getting stopped twice.
Moves setting state as stopped to stopInternal. Checks that state is not
stopped in stopInternal.

BUG=webrtc:7015

Review-Url: https://codereview.webrtc.org/2640093003
Cr-Commit-Position: refs/heads/master@{#16182}
2017-01-20 11:09:03 +00:00
mandermo
eef94d9995 Video collected by VideoFileRenderer is first saved on the native heap, then saved to disk during release.
BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2576283004
Cr-Commit-Position: refs/heads/master@{#16167}
2017-01-19 17:02:29 +00:00
nisse
e8abe3ef1b Revert of New method StatsObserver::OnCompleteReports, passing ownership. (patchset #2 id:20001 of https://codereview.webrtc.org/2584553002/ )
Reason for revert:
The new method doesn't work as intended.

It can't pass ownership, because the StatsReports is a vector of raw pointers to StatReport objects owned by the StatsCollector.

Original issue's description:
> New method StatsObserver::OnCompleteReports, passing ownership.
>
> The new name, OnCompleteReports rather than OnComplete, is needed
> because in C++ method lookup, overriding a method hides all otherwise
> inherited methods with the same name, even if they have a different
> signature. And here, the intention is that each subclass should
> override one or the other of the two methods, and inherit the method it
> doesn't override.
>
> This cl is a prerequisite for
> https://codereview.webrtc.org/2567143003/, because the Chrome glue
> code needs to retain the stats report after the OnComplete method has
> returned.
>
> Currently, Chrome makes a copy of the stats mapping (which breaks when
> changing ValuePtr from an rtc::linked_ptr to an std::unique_ptr). After
> this cl, Chrome can be fixed to take ownership and no longer needs to
> copy anything, unblocking cl 2567143003.
>
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2584553002
> Cr-Commit-Position: refs/heads/master@{#15708}
> Committed: b36ee8d498

TBR=solenberg@webrtc.org,magjed@webrtc.org,tkchin@webrtc.org,hbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2641783002
Cr-Commit-Position: refs/heads/master@{#16144}
2017-01-18 13:00:34 +00:00
sakal
5850a9484d Add failure type parameter to onFailure callback.
This allows Camera2Session to correctly signal camera disconnect
when starting the camera.

BUG=webrtc:7008

Review-Url: https://codereview.webrtc.org/2642703002
Cr-Commit-Position: refs/heads/master@{#16142}
2017-01-18 11:22:16 +00:00
sakal
2fcd2dd93a Update YuvConverter to use GlTextureFrameBuffer.
Old implementation also had a bug where it had the framebuffer bound
while changing the texture size. This causes problems on some phones.

BUG=webrtc:6751

Review-Url: https://codereview.webrtc.org/2635133003
Cr-Commit-Position: refs/heads/master@{#16141}
2017-01-18 11:21:10 +00:00
Alex Glaznev
7fa4a72924 Increase bitrate adjustment values for VP8 Exynos encoder
For low bitrates actual encoder output bitrate may differ from target
by 3-4 times.
Also adjust adaptation speed based on bitrate variation from the target.

BUG=b/34233384
R=wzh@webrtc.org

Review-Url: https://codereview.webrtc.org/2640543003 .
Cr-Commit-Position: refs/heads/master@{#16128}
2017-01-17 23:32:02 +00:00
sakal
e8aca24446 Move file capturer/renderer tests to the correct location.
Move file capturer/renderer tests from the AppRTCMobile tests directory
to the WebRTC tests directory. These tests do not test AppRTCMobile but
rather WebRTC functionality. Therefore, they belong in WebRTC tests
directory.

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2632233002
Cr-Commit-Position: refs/heads/master@{#16115}
2017-01-17 11:32:06 +00:00
magjed
9b96a172ed Android GlTextureFrameBuffer: Re-attach texture in setSize
BUG=None

Review-Url: https://codereview.webrtc.org/2571503002
Cr-Commit-Position: refs/heads/master@{#16110}
2017-01-17 10:51:06 +00:00
hankzhang8945
9506e12eba Reset pendingCameraSwitch as false after failed to post switchCameraOnThread to camera thread.
BUG=webrtc:6981

Review-Url: https://codereview.webrtc.org/2625133007
Cr-Commit-Position: refs/heads/master@{#16105}
2017-01-17 09:29:19 +00:00
sakal
c117e2ed79 Do not classify error after stopping the camera as a startup failure.
Calling event handlers when the camera is closing is safe because
CameraCapturer checks if the errors are coming from the current session.

Calling onFailure after camera has already started might lead to strange
behavior.

BUG=b/34112992

Review-Url: https://codereview.webrtc.org/2634973002
Cr-Commit-Position: refs/heads/master@{#16101}
2017-01-16 17:40:36 +00:00
sakal
037b93af17 Replace default locale with US locale on Android.
This fixes a lint warning and also fixes potential bugs on devices
running locales where toLowerCase and toUpperCase don't behave
as expected.

BUG=webrtc:6597
R=magjed@webrtc.org
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2624423003
Cr-Commit-Position: refs/heads/master@{#16092}
2017-01-16 12:57:32 +00:00
deadbeef
fe0fd41bb9 Stop using deprecated constraints-based version of CreateAudioSource.
Also did some slight refactoring of the code that turns constraints
into rtc::Optionals. Used a template method to avoid code duplication,
and used the same pattern for "CopyConstraintsIntoAudioOptions" as was
being used for "CopyConstraintsIntoRtcConfiguration".

BUG=webrtc:6752

Review-Url: https://codereview.webrtc.org/2628523003
Cr-Commit-Position: refs/heads/master@{#16063}
2017-01-13 19:47:56 +00:00
sakal
c5da08fc12 Drop dependency to Chromium in WebRtcJniBootTest.
The dependency breaks a build downstream.

BUG=None

Review-Url: https://codereview.webrtc.org/2630713002
Cr-Commit-Position: refs/heads/master@{#16047}
2017-01-13 13:56:16 +00:00
glaznev
21b6cce0c4 Do not report camera disconnected event if Android camera is closing.
Ignore CAMERA_ERROR_EVICTED error if camera is about to be closed.
This is valid use case when other app is opening camera while
WebRTC Android app is trying to close it.

BUG=b/34112992

Review-Url: https://codereview.webrtc.org/2627153002
Cr-Commit-Position: refs/heads/master@{#16039}
2017-01-12 21:05:47 +00:00
magjed
b66129a27e Fix JNI reference leak in MediaCodecVideoEncoder
We currently leak one local reference to MediaCodecVideoEncoder in
every call to MediaCodecVideoEncoderFactory::CreateVideoEncoder. After
the encoder has been re-initialized 512 times, JNI will crash due to
local reference table overflow (max=512).

The actual leak is in the member initializer list of
MediaCodecVideoEncoder. This CL fixes the leak by adding a
ScopedLocalRefFrame outside of the ctor. All JNI code that originate
from a C++ thread (i.e. the entry point is not a Java thread) must use
a ScopedLocalRefFrame in order to avoid leaking local references.

BUG=webrtc:6969,b/34056152

Review-Url: https://codereview.webrtc.org/2627973004
Cr-Commit-Position: refs/heads/master@{#16034}
2017-01-12 14:50:56 +00:00
sakal
bca122e0d5 Remove lint ignores and add WrongCall ignore directly to the test.
Also removes some unused strings from AppRTCMobile strings.xml.

BUG=webrtc:6597
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2628833004
Cr-Commit-Position: refs/heads/master@{#16033}
2017-01-12 14:19:40 +00:00
nisse
ede5da4960 Replace ASSERT by RTC_DCHECK in all non-test code.
Bulk of the changes were produced using

  git grep -l ' ASSERT(' | grep -v test | grep -v 'common\.h' |\
    xargs -n1 sed -i 's/ ASSERT(/ RTC_DCHECK(/'

followed by additional includes of base/checks.h in affected files,
and git cl format.

Also had to do some tweaks to #if !defined(NDEBUG) logic in the
taskrunner code (webrtc/base/task.cc, webrtc/base/taskparent.cc,
webrtc/base/taskparent.h, webrtc/base/taskrunner.cc), replaced to
consistently use RTC_DCHECK_IS_ON, and some of the checks needed
additional #if protection.

Test code was excluded, because it should probably use RTC_CHECK
rather than RTC_DCHECK.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2620303003
Cr-Commit-Position: refs/heads/master@{#16030}
2017-01-12 13:15:36 +00:00
nisse
eb4ca4e823 Replace RTC_DCHECK(false) with RTC_NOTREACHED().
Bulk of changes done using

  git grep -l 'RTC_DCHECK(false)' | \
    xargs sed -i 's/RTC_DCHECK(false)/RTC_NOTREACHED()/'

peerconnection.cc also used RTC_DCHECK(false && "msg") in two places,
which were updated manually.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2623313004
Cr-Commit-Position: refs/heads/master@{#16026}
2017-01-12 10:24:27 +00:00
magjed
295760daa1 Reland of Android: Add field trial for Intel HW Vp8 encoder (patchset #1 id:1 of https://codereview.webrtc.org/2624143002/ )
Reason for revert:
Fixed external test issues.

Original issue's description:
> Revert of Android: Add field trial for Intel HW Vp8 encoder (patchset #1 id:1 of https://codereview.webrtc.org/2614373004/ )
>
> Reason for revert:
> Breaks external test code.
>
> Original issue's description:
> > Android: Add field trial for Intel HW Vp8 encoder
> >
> > Also enable Intel HW Vp8 encoder by default in AppRTCMobile.
> >
> > BUG=webrtc:6683
> >
> > Review-Url: https://codereview.webrtc.org/2614373004
> > Cr-Commit-Position: refs/heads/master@{#16002}
> > Committed: cecf86e9b0
>
> TBR=sakal@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6683
>
> Review-Url: https://codereview.webrtc.org/2624143002
> Cr-Commit-Position: refs/heads/master@{#16005}
> Committed: c999a08128

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

Review-Url: https://codereview.webrtc.org/2625903005
Cr-Commit-Position: refs/heads/master@{#16025}
2017-01-12 09:11:57 +00:00
sakal
e1674efd2d Update Android instrumentation tests to use JUnit4.
BUG=webrtc:6597

Review-Url: https://codereview.webrtc.org/2627043002
Cr-Commit-Position: refs/heads/master@{#16011}
2017-01-11 14:22:56 +00:00
nisse
c80e741ad0 Replace ASSERT(false) by RTC_NOTREACHED().
This cl was produced by

  git grep -l 'ASSERT(false)' |\
    xargs -n1 sed -i 's/ASSERT(false)/RTC_NOTREACHED()/'

followed by additional includes of base/checks.h in affected files,
git cl format to adjust spacing in webrtc/base/transformadapter.cc.
Finally, to make presubmit happy, one unnamed TODO marker was deleted
in that file.

This is a step towards deletion of base/common.h.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2625003003
Cr-Commit-Position: refs/heads/master@{#16009}
2017-01-11 13:56:46 +00:00
magjed
c999a08128 Revert of Android: Add field trial for Intel HW Vp8 encoder (patchset #1 id:1 of https://codereview.webrtc.org/2614373004/ )
Reason for revert:
Breaks external test code.

Original issue's description:
> Android: Add field trial for Intel HW Vp8 encoder
>
> Also enable Intel HW Vp8 encoder by default in AppRTCMobile.
>
> BUG=webrtc:6683
>
> Review-Url: https://codereview.webrtc.org/2614373004
> Cr-Commit-Position: refs/heads/master@{#16002}
> Committed: cecf86e9b0

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

Review-Url: https://codereview.webrtc.org/2624143002
Cr-Commit-Position: refs/heads/master@{#16005}
2017-01-11 11:02:13 +00:00
magjed
cecf86e9b0 Android: Add field trial for Intel HW Vp8 encoder
Also enable Intel HW Vp8 encoder by default in AppRTCMobile.

BUG=webrtc:6683

Review-Url: https://codereview.webrtc.org/2614373004
Cr-Commit-Position: refs/heads/master@{#16002}
2017-01-11 08:57:43 +00:00
magjed
c0ce6cc85e Android: Wrap webrtc::field_trial::FindFullName in Java
The purpose is to be able to add field trials in Java code.

BUG=webrtc:6683

Review-Url: https://codereview.webrtc.org/2621003002
Cr-Commit-Position: refs/heads/master@{#15994}
2017-01-10 16:02:03 +00:00
nisse
af916899cc Move VideoFrame and related declarations to webrtc/api/video.
Moves webrtc/common_video/rotation.h and parts of
webrtc/common_video/include/video_frame_buffer.h and
webrtc/video_frame.h, and adds to a new GN target api:video_frame_api.

BUG=webrtc:5880

Review-Url: https://codereview.webrtc.org/2517173004
Cr-Commit-Position: refs/heads/master@{#15993}
2017-01-10 15:44:26 +00:00
sakal
e996a99721 Add a check for CameraCapturer being initialized before calling startCapture.
BUG=webrtc:6945
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2621633002
Cr-Commit-Position: refs/heads/master@{#15988}
2017-01-10 12:30:31 +00:00
deadbeef
5d0b6d8da3 Merge RTCConfiguration with RTCMediaConstraints in Java/Obj-C wrappers.
The intention of SetConfiguration is that it modifies the configuration,
while keeping the constraints passed into CreatePeerConnection. Right
now that's now happening. See bug for more explanation.

BUG=webrtc:6942

Review-Url: https://codereview.webrtc.org/2603653002
Cr-Commit-Position: refs/heads/master@{#15974}
2017-01-10 00:05:28 +00:00
hnsl
0483362377 Add disabled certificate check support to IceServer PeerConnection API.
Refactor "OPT_SSLTCP" renaming it to "OPT_TLS_FAKE", making it clear
that it's not actually some kind of SSL over TCP. Also making it clear
that it's mutually exclusive with OPT_TLS. Maintaining deprecated
backwards compatible support for "OPT_SSLTCP".

Add "OPT_TLS_INSECURE" that implements the new certificate-check
disabled TLS mode, which is also mutually exclusive with the other
TLS options.

PortAllocator: Add a new TLS policy enum TlsCertPolicy which defines
the new insecure mode and added it as a RelayCredentials member.

TurnPort: Add new TLS policy member with appropriate getter and setter
to avoid constructor bloat. Initialize it from the RelayCredentials
after the TurnPort is created.

Expose the new feature in the PeerConnection API via
IceServer.tls_certificate_policy as well as via the Android JNI
PeerConnection API.

For security reasons we ensure that:

	1) The policy is always explicitly initialized to secure.
        2) API users have to explicitly integrate with the feature to
           use it, and will otherwise get no change in behavior.
	3) The feature is not immediately exposed in non-native
	   contexts. For example, disabling of certificate validation
           is not implemented via URI parsing since this would
           immediately allow it to be used from a web page.

This is a second attempt of https://codereview.webrtc.org/2557803002/
which was rolled back in https://codereview.webrtc.org/2590153002/

BUG=webrtc:6840

Review-Url: https://codereview.webrtc.org/2594623002
Cr-Commit-Position: refs/heads/master@{#15967}
2017-01-09 16:35:45 +00:00
mbonadei
438062bd43 Reland of Fixing package-boundary violation with srjar_deps (patchset #1 id:1 of https://codereview.webrtc.org/2617533005/ )
Reason for revert:
Skipping the build of the target "//webrtc/modules/audio_device:audio_device_java" when building webrtc with chromium.

This was causing a failure because in that case it is not possible to refer to the script used by the template "android_shared_srcjar" with an absolute path (which seems to be necessary since the script attribute of action is relative to the invocation target and not to the template declaration).

Original issue's description:
> Revert of Fixing package-boundary violation with srjar_deps (patchset #5 id:80001 of https://codereview.webrtc.org/2610823002/ )
>
> Reason for revert:
> This CL is breaking a chromium.webrtc.fyi: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder/builds/226
>
> I am trying to reproduce the issue on my local machine and I will try to re-land the CL later.
>
> Original issue's description:
> > Fixing package-boundary violation with srjar_deps
> >
> > Without the usage of the srcjar_deps attribute we were not able to
> > include .java files from other packages without violating the package
> > boundary contraint.
> >
> > As an example, in this CL the target "libjingle_peerconnection_java" was
> > directly including .java files from another packages in its "java_files"
> > attribute.
> >
> > Using srcjar_deps we are able to declare the dependency of the target
> > avoiding to create hidden dependencies in the codebase.
> >
> > This is not fixing the webrtc:6356 bug directly but it is a first step to
> > include ThreadUtils classes in libjingle_peerconnection_client_java.jar
> > again.
> >
> > It seems also to be related to the chromium:648244 bug. This can be solved
> > if we can find a way to perform srcjar generation in the android_library
> > target without changing the semantic of the target.
> >
> > BUG=webrtc:6356
> >
> > Review-Url: https://codereview.webrtc.org/2610823002
> > Cr-Commit-Position: refs/heads/master@{#15914}
> > Committed: 10a76592a7
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6356
>
> Review-Url: https://codereview.webrtc.org/2617533005
> Cr-Commit-Position: refs/heads/master@{#15915}
> Committed: eb731ed09e

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

Review-Url: https://codereview.webrtc.org/2612953004
Cr-Commit-Position: refs/heads/master@{#15958}
2017-01-09 10:37:21 +00:00
deadbeef
8014c75931 Adding Java and Obj-C bindings for RtpEncodingParameters.ssrc.
BUG=webrtc:6903

Review-Url: https://codereview.webrtc.org/2581913002
Cr-Commit-Position: refs/heads/master@{#15936}
2017-01-07 00:53:00 +00:00
Alex Glaznev
512f00bc58 Force regular key frame generation for VP8 codec only.
BUG=b/33554812,b/32238476
R=wzh@webrtc.org

Review-Url: https://codereview.webrtc.org/2614073003 .
Cr-Commit-Position: refs/heads/master@{#15926}
2017-01-06 00:40:46 +00:00
Alex Glaznev
c7483a7d88 Force regular key frame generation when using Qualcomm VP8 HW encoder.
To reduce the duration of color distortions appeared in recent firmware.

BUG=b/33554812,b/32238476
R=wzh@webrtc.org

Review-Url: https://codereview.webrtc.org/2614823005 .
Cr-Commit-Position: refs/heads/master@{#15925}
2017-01-05 23:22:24 +00:00
Alex Glaznev
fce6532366 Add glaznev@ to WebRTC SDK owners.
BUG=NONE
R=tkchin@webrtc.org

Review-Url: https://codereview.webrtc.org/2611193003 .
Cr-Commit-Position: refs/heads/master@{#15924}
2017-01-05 23:19:53 +00:00
mbonadei
eb731ed09e Revert of Fixing package-boundary violation with srjar_deps (patchset #5 id:80001 of https://codereview.webrtc.org/2610823002/ )
Reason for revert:
This CL is breaking a chromium.webrtc.fyi: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder/builds/226

I am trying to reproduce the issue on my local machine and I will try to re-land the CL later.

Original issue's description:
> Fixing package-boundary violation with srjar_deps
>
> Without the usage of the srcjar_deps attribute we were not able to
> include .java files from other packages without violating the package
> boundary contraint.
>
> As an example, in this CL the target "libjingle_peerconnection_java" was
> directly including .java files from another packages in its "java_files"
> attribute.
>
> Using srcjar_deps we are able to declare the dependency of the target
> avoiding to create hidden dependencies in the codebase.
>
> This is not fixing the webrtc:6356 bug directly but it is a first step to
> include ThreadUtils classes in libjingle_peerconnection_client_java.jar
> again.
>
> It seems also to be related to the chromium:648244 bug. This can be solved
> if we can find a way to perform srcjar generation in the android_library
> target without changing the semantic of the target.
>
> BUG=webrtc:6356
>
> Review-Url: https://codereview.webrtc.org/2610823002
> Cr-Commit-Position: refs/heads/master@{#15914}
> Committed: 10a76592a7

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

Review-Url: https://codereview.webrtc.org/2617533005
Cr-Commit-Position: refs/heads/master@{#15915}
2017-01-05 12:24:37 +00:00
mbonadei
10a76592a7 Fixing package-boundary violation with srjar_deps
Without the usage of the srcjar_deps attribute we were not able to
include .java files from other packages without violating the package
boundary contraint.

As an example, in this CL the target "libjingle_peerconnection_java" was
directly including .java files from another packages in its "java_files"
attribute.

Using srcjar_deps we are able to declare the dependency of the target
avoiding to create hidden dependencies in the codebase.

This is not fixing the webrtc:6356 bug directly but it is a first step to
include ThreadUtils classes in libjingle_peerconnection_client_java.jar
again.

It seems also to be related to the chromium:648244 bug. This can be solved
if we can find a way to perform srcjar generation in the android_library
target without changing the semantic of the target.

BUG=webrtc:6356

Review-Url: https://codereview.webrtc.org/2610823002
Cr-Commit-Position: refs/heads/master@{#15914}
2017-01-05 12:03:55 +00:00
pbos
c7c26a0e64 Reland of place basictypes.h with stdint.h for int_t types. (patchset #1 id:1 of https://codereview.webrtc.org/2603203003/ )
Reason for revert:
Doing a reland where systeminfo.cc includes basictypes.h so that CPU_X86 etc. are defined when they are checked/used.

Original issue's description:
> Revert of Replace basictypes.h with stdint.h for int_t types. (patchset #1 id:1 of https://codereview.webrtc.org/2604043002/ )
>
> Reason for revert:
> Very likely cause of Chromium import bot breakage (unused function '__cpuid'), TBD why.
>
> Original issue's description:
> > Replace basictypes.h with stdint.h for int_t types.
> >
> > Removes basictypes.h for types that only makes use of it for fixed-size-int
> > typedefs and replaces it with stdint.h.
> >
> > BUG=webrtc:6853
> > R=tommi@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2604043002
> > Cr-Commit-Position: refs/heads/master@{#15867}
> > Committed: 7fd1a75300
>
> TBR=tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6853
>
> Review-Url: https://codereview.webrtc.org/2603203003
> Cr-Commit-Position: refs/heads/master@{#15869}
> Committed: 7eb0e23bcf

BUG=webrtc:6853
TBR=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2609783002
Cr-Commit-Position: refs/heads/master@{#15873}
2017-01-02 16:42:32 +00:00
pbos
7eb0e23bcf Revert of Replace basictypes.h with stdint.h for int_t types. (patchset #1 id:1 of https://codereview.webrtc.org/2604043002/ )
Reason for revert:
Very likely cause of Chromium import bot breakage (unused function '__cpuid'), TBD why.

Original issue's description:
> Replace basictypes.h with stdint.h for int_t types.
>
> Removes basictypes.h for types that only makes use of it for fixed-size-int
> typedefs and replaces it with stdint.h.
>
> BUG=webrtc:6853
> R=tommi@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2604043002
> Cr-Commit-Position: refs/heads/master@{#15867}
> Committed: 7fd1a75300

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

Review-Url: https://codereview.webrtc.org/2603203003
Cr-Commit-Position: refs/heads/master@{#15869}
2017-01-02 15:32:25 +00:00
pbos
7fd1a75300 Replace basictypes.h with stdint.h for int_t types.
Removes basictypes.h for types that only makes use of it for fixed-size-int
typedefs and replaces it with stdint.h.

BUG=webrtc:6853
R=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2604043002
Cr-Commit-Position: refs/heads/master@{#15867}
2017-01-02 14:58:46 +00:00
zhihuang
dcccda7e7c Created a java wrapper for the callback OnAddTrack to PeerConnection.Observer
Created a java wrapper for the callback OnAddTrack in this CL since it has been added to native C++ API
The callback function is called when a track is signaled by remote side and a new RtpReceiver is created.
The application can tell when tracks are added to the streams by listening to this callback.

BUG=webrtc:6112

Review-Url: https://codereview.webrtc.org/2513723002
Cr-Commit-Position: refs/heads/master@{#15745}
2016-12-21 22:08:03 +00:00
nisse
b36ee8d498 New method StatsObserver::OnCompleteReports, passing ownership.
The new name, OnCompleteReports rather than OnComplete, is needed
because in C++ method lookup, overriding a method hides all otherwise
inherited methods with the same name, even if they have a different
signature. And here, the intention is that each subclass should
override one or the other of the two methods, and inherit the method it
doesn't override.

This cl is a prerequisite for
https://codereview.webrtc.org/2567143003/, because the Chrome glue
code needs to retain the stats report after the OnComplete method has
returned.

Currently, Chrome makes a copy of the stats mapping (which breaks when
changing ValuePtr from an rtc::linked_ptr to an std::unique_ptr). After
this cl, Chrome can be fixed to take ownership and no longer needs to
copy anything, unblocking cl 2567143003.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2584553002
Cr-Commit-Position: refs/heads/master@{#15708}
2016-12-20 11:30:00 +00:00
magjed
d5236e2948 Revert of Add disabled certificate check support to IceServer PeerConnection API. (patchset #8 id:140001 of https://codereview.webrtc.org/2557803002/ )
Reason for revert:
This CL broke all Chromium WebRTC FYI bots. A roll+fix was attempted here: https://codereview.chromium.org/2590783003/, but failed to land. I'm reverting this CL now to make the tree green again. Make the API change gradual when you reland so that we can update Chromium between.

Original issue's description:
> Add disabled certificate check support to IceServer PeerConnection API.
>
> Refactor "OPT_SSLTCP" renaming it to "OPT_TLS_FAKE", making it clear
> that it's not actually some kind of SSL over TCP. Also making it clear
> that it's mutually exclusive with OPT_TLS.
>
> Add "OPT_TLS_INSECURE" that implements the new certificate-check
> disabled TLS mode, which is also mutually exclusive with the other
> TLS options.
>
> PortAllocator: Add a new TLS policy enum TlsCertPolicy which defines
> the new insecure mode and added it as a RelayCredentials member.
>
> TurnPort: Add new TLS policy member with appropriate getter and setter
> to avoid constructor bloat. Initialize it from the RelayCredentials
> after the TurnPort is created.
>
> Expose the new feature in the PeerConnection API via
> IceServer.tls_certificate_policy as well as via the Android JNI
> PeerConnection API.
>
> For security reasons we ensure that:
>
> 	1) The policy is always explicitly initialized to secure.
>         2) API users have to explicitly integrate with the feature to
>            use it, and will otherwise get no change in behavior.
> 	3) The feature is not immediately exposed in non-native
> 	   contexts. For example, disabling of certificate validation
>            is not implemented via URI parsing since this would
>            immediately allow it to be used from a web page.
>
> BUG=webrtc:6840
>
> Review-Url: https://codereview.webrtc.org/2557803002
> Cr-Commit-Position: refs/heads/master@{#15670}
> Committed: b0f04fdb9e

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,hnsl@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6840

Review-Url: https://codereview.webrtc.org/2590153002
Cr-Commit-Position: refs/heads/master@{#15703}
2016-12-20 10:22:06 +00:00
hnsl
b0f04fdb9e Add disabled certificate check support to IceServer PeerConnection API.
Refactor "OPT_SSLTCP" renaming it to "OPT_TLS_FAKE", making it clear
that it's not actually some kind of SSL over TCP. Also making it clear
that it's mutually exclusive with OPT_TLS.

Add "OPT_TLS_INSECURE" that implements the new certificate-check
disabled TLS mode, which is also mutually exclusive with the other
TLS options.

PortAllocator: Add a new TLS policy enum TlsCertPolicy which defines
the new insecure mode and added it as a RelayCredentials member.

TurnPort: Add new TLS policy member with appropriate getter and setter
to avoid constructor bloat. Initialize it from the RelayCredentials
after the TurnPort is created.

Expose the new feature in the PeerConnection API via
IceServer.tls_certificate_policy as well as via the Android JNI
PeerConnection API.

For security reasons we ensure that:

	1) The policy is always explicitly initialized to secure.
        2) API users have to explicitly integrate with the feature to
           use it, and will otherwise get no change in behavior.
	3) The feature is not immediately exposed in non-native
	   contexts. For example, disabling of certificate validation
           is not implemented via URI parsing since this would
           immediately allow it to be used from a web page.

BUG=webrtc:6840

Review-Url: https://codereview.webrtc.org/2557803002
Cr-Commit-Position: refs/heads/master@{#15670}
2016-12-19 12:10:30 +00:00
minyue
50254636d4 Modify JavaToStdString to allow ISO-8859-1 encoded strings.
Current implementation of JavaToStdString applies additional encoding that modifies ISO-8859-1 encoded strings (e.g. byte array). This CL is to fix this.

A planned use of this is to pass a protobuf serialized string as a MediaConstraint to WebRTC to configure audio network adaptor.

BUG=webrtc:6815

Review-Url: https://codereview.webrtc.org/2549783002
Cr-Commit-Position: refs/heads/master@{#15509}
2016-12-09 14:13:48 +00:00
kthelgason
c8474178d6 Reland of Add ability to scale to arbitrary factors (patchset #1 id:1 of https://codereview.webrtc.org/2557323002/ )
Reason for revert:
There was a bug in the implementation where the adapter could get stuck at really low resolutions. That has now been fixed.

Original issue's description:
> Revert of Add ability to scale to arbitrary factors (patchset #7 id:120001 of https://codereview.webrtc.org/2555483005/ )
>
> Reason for revert:
> Issue discovered with scaling back up.
>
> Original issue's description:
> > Add ability to scale to arbitrary factors
> >
> > This CL adds a fallback for the case when no optimized scale factor produces a low enough resolution for what was requested. It also ensures that all resolutions provided by the video adapter are divisible by four. This is required by some hardware implementations.
> >
> > BUG=webrtc:6837
> >
> > Committed: https://crrev.com/710c335d785b104bda4a912bd7909e4d27f9b04f
> > Cr-Commit-Position: refs/heads/master@{#15469}
>
> TBR=magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6837
>
> Committed: https://crrev.com/7722a4cc8d31e5e924e9e6c5c97412ce8bbbe59d
> Cr-Commit-Position: refs/heads/master@{#15470}

R=magjed@webrtc.org
BUG=webrtc:6837,webrtc:6848

Review-Url: https://codereview.webrtc.org/2558243003
Cr-Commit-Position: refs/heads/master@{#15485}
2016-12-08 16:04:58 +00:00