67 Commits

Author SHA1 Message Date
nisse
f386876354 Rename some cricket::VideoFrame methods, to align with webrtc::VideoFrame.
GetVideoFrameBuffer --> video_frame_buffer
GetVideoRotation --> rotation
SetRotation --> set_rotation

BUG=webrtc:5682

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

Cr-Commit-Position: refs/heads/master@{#12342}
2016-04-13 10:29:20 +00:00
pbos
cbac40d321 Reland of Make QualityScaler more responsive to downgrades. (patchset #1 id:1 of https://codereview.webrtc.org/1880103002/ )
Reason for revert:
Regressed behavior is actually desirable (go down to 360p instead of producing super-bad 720p).

Original issue's description:
> Revert of Make QualityScaler more responsive to downgrades. (patchset #3 id:40001 of https://codereview.webrtc.org/1830593003/ )
>
> Reason for revert:
> Speculative revert: want to see if this causes the regression in https://crbug.com/602621
>
> Original issue's description:
> > Make QualityScaler more responsive to downgrades.
> >
> > Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
> > windows for going up quickly in the beginning of a call (before any
> > downscaling happens due to bad quality).
> >
> > BUG=webrtc:5678
> > R=glaznev@webrtc.org, stefan@webrtc.org
> >
> > Committed: https://crrev.com/85829fd90cc4e7a91c9857921b19e8fc126aeb60
> > Cr-Commit-Position: refs/heads/master@{#12219}
>
> TBR=glaznev@webrtc.org,stefan@webrtc.org,pbos@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5678
> NOTRY=true
>
> Committed: https://crrev.com/19b4fecf08e3fe215e431a260fb673553c15e569
> Cr-Commit-Position: refs/heads/master@{#12331}

TBR=glaznev@webrtc.org,stefan@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:602621, webrtc:5678

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

Cr-Commit-Position: refs/heads/master@{#12341}
2016-04-13 09:51:10 +00:00
Alex Glaznev
79299afa30 Enable H.264 HW decoder soft rest.
Also tune up scale thresholds a little.

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

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

Cr-Commit-Position: refs/heads/master@{#12337}
2016-04-12 23:39:50 +00:00
phoglund
19b4fecf08 Revert of Make QualityScaler more responsive to downgrades. (patchset #3 id:40001 of https://codereview.webrtc.org/1830593003/ )
Reason for revert:
Speculative revert: want to see if this causes the regression in https://crbug.com/602621

Original issue's description:
> Make QualityScaler more responsive to downgrades.
>
> Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
> windows for going up quickly in the beginning of a call (before any
> downscaling happens due to bad quality).
>
> BUG=webrtc:5678
> R=glaznev@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/85829fd90cc4e7a91c9857921b19e8fc126aeb60
> Cr-Commit-Position: refs/heads/master@{#12219}

TBR=glaznev@webrtc.org,stefan@webrtc.org,pbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5678
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#12331}
2016-04-12 16:06:02 +00:00
Peter Boström
f7704d197b Remove latency-based frame dropping on Android.
This logic currently prevents loopback calls on Nexus 5X when it's
slightly overloaded to maintain input framerate since encoding at ~25fps
with one framedrop results in >70ms between frames naturally.

With this change applied Nexus 5X can maintain ~25fps both in and out
without building excessive latency (>2 frames) (this is now covered by
CPU adaptation outside the codec wrapper).

BUG=
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12317}
2016-04-11 14:42:48 +00:00
Taylor Brandstetter
05697a62fc Gracefully continue if ConnectivityManager.requestNetwork fails.
This happens on Android 6.0.0, which requires the WRITE_SETTINGS
permission, which is somewhat impractical to obtain.

R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12288}
2016-04-08 00:36:55 +00:00
Magnus Jedvert
fae14804ee Android: Fix chroma sampling bug when converting from texture to YUV
The xUnit for the UV channels in SurfaceTextureHelper.YuvConverter is
currently calculated from 1 / (2 * width). It should be 1 / (width / 2)
instead.

R=nisse@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12274}
2016-04-07 07:26:54 +00:00
magjed
38d653c927 Revert of Switch to using EGL 1.0 for rendering and HW codec. (patchset #1 id:1 of https://codereview.webrtc.org/1829923002/ )
Reason for revert:
EGL 1.4 was not the cause of the deadlock. See https://bugs.chromium.org/p/webrtc/issues/detail?id=5702 for more info.

Original issue's description:
> Switch to using EGL 1.0 for rendering and HW codec.
>
> Using EGL 1.4 may cause texture rendering deadlock on some
> Android devices.
>
> R=jiayl@webrtc.org
>
> Committed: 887a19b9d2

BUG=webrtc:5702
TBR=jiayl@webrtc.org,glaznev@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

Cr-Commit-Position: refs/heads/master@{#12257}
2016-04-06 09:26:30 +00:00
magjed
9fdb6cf255 Andoid EglBase: Detect failure to find EGL config
BUG=b/27950559

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

Cr-Commit-Position: refs/heads/master@{#12239}
2016-04-05 13:08:13 +00:00
magjed
23b08eb531 Android VideoCapture: Add null checks in stopCaptureOnCameraThread
If stopCapture is called shortly after startCapture, and the first startCaptureOnCameraThread failed, but still hasn't retried 3 times, stopCaptureOnCameraThread will be called in a state where the camera is not initialized. This CL adds null checks in stopCaptureOnCameraThread to avoid crashes.

BUG=b/27939867

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

Cr-Commit-Position: refs/heads/master@{#12234}
2016-04-05 08:37:08 +00:00
deadbeef
60631775fa Allowing a Java object field to be null in a new JNI helper method.
Java objects in the API should be allowed to be null in some cases.
Specifically, a null value for maxBitrateBps in RtpParameters.java
has a specific meaning and doesn't imply an error has occurred.

NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#12221}
2016-04-04 17:27:31 +00:00
Peter Boström
85829fd90c Make QualityScaler more responsive to downgrades.
Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
windows for going up quickly in the beginning of a call (before any
downscaling happens due to bad quality).

BUG=webrtc:5678
R=glaznev@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12219}
2016-04-04 16:11:18 +00:00
nisse
71a0c2f9a6 Deprecate GetWidth() and GetHeight() methods. Replaced by width() and height().
Delete GetChromaWidth, GetChromaHeight, and GetChromaSize.

Delete unused function VideoFrameEqual.

BUG=webrtc:5682

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

Cr-Commit-Position: refs/heads/master@{#12213}
2016-04-04 07:57:37 +00:00
Magnus Jedvert
3db6f9b4df Android EGL: Synchronize calls to eglSwapBuffers and eglMakeCurrent
BUG=webrtc:5702
R=glaznev@webrtc.org, perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12178}
2016-03-31 11:17:20 +00:00
magjed
82b750b80e Android SurfaceTextureHelper: Distinguish thread names for decoder and camera
Review URL: https://codereview.webrtc.org/1843973002

Cr-Commit-Position: refs/heads/master@{#12176}
2016-03-31 07:54:18 +00:00
Taylor Brandstetter
f8711c0209 Adding JNI binding for 'active' field in RTP encodings.
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12153}
2016-03-30 00:21:40 +00:00
kwiberg
9708e9c599 Don't call operator== with scoped_ptr<T> and T*
That won't work when rtc::scoped_ptr becomes a type alias for
std::unique_ptr.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12145}
2016-03-29 17:17:45 +00:00
magjed
2378212e5a Android HW decoder: Add support for textures when using EGL 1.0
There is no reason to require EGL 1.4 for the decoder, it works fine with EGL 1.0 as well. It's important to support EGL 1.0 after https://codereview.webrtc.org/1829923002

BUG=webrtc:5702
TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12136}
2016-03-29 12:13:29 +00:00
skvlad
303b3c21a4 Added the JNI interface to get and set RtpParameters and the maximum bitrate limits.
Defined a JavaCollection convenience class to simplify iterating over collections from within JNI code
Follow-up to https://codereview.webrtc.org/1788583004/.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12125}
2016-03-25 02:36:54 +00:00
perkj
d61bf803d2 Removed MediaStreamTrackInterface::set_state
The track state should be implicitly set by the underlying source.
This removes the public method and cleans up how AudioRtpReceiver is created. Further more it cleans up how the RtpReceivers are destroyed.

Note that this cl depend on https://codereview.webrtc.org/1790633002.
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12115}
2016-03-24 10:16:23 +00:00
Alex Glaznev
887a19b9d2 Switch to using EGL 1.0 for rendering and HW codec.
Using EGL 1.4 may cause texture rendering deadlock on some
Android devices.

R=jiayl@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12109}
2016-03-23 22:01:54 +00:00
nisse
1509fa1aa9 Delete cricket::VideoRenderer.
TBR=glaznev@webrtc.org (deleting an #include in main_wnd.h)
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12101}
2016-03-23 11:06:05 +00:00
Niels Möller
8f59762897 Delete VideoRendererInterface.
Use in chromium was deleted a few days ago.

BUG=webrtc:5426
R=magjed@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12099}
2016-03-23 09:33:19 +00:00
perkj
c8f952deaa Propagate MediaStreamSource state to video tracks the same way as audio.
Also removes unused track states kLive and kFailed.
Since this also required a Video source to exist in all unit tests that create a track, a FakeVideoTrackSource is added and used in tests.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12098}
2016-03-23 07:34:01 +00:00
Peter Boström
01bcbd0df6 Make Android min-resolution rotation-agnostic.
Min resolution shouldn't have anything to do with CVO being enabled or
not, nor device rotation.

BUG=webrtc:5678
R=glaznev@webrtc.org
TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12092}
2016-03-22 20:44:43 +00:00
perkj
9e083d2ac5 Reland of Delete empty API files and cleaned up includes. (patchset #1 id:1 of https://codereview.webrtc.org/1813083002/ )
Reason for revert:
New attempt. Cl for removing videosourceinterface.h dep in chrome is landed here: https://codereview.chromium.org/1810273003/

Original issue's description:
> Revert of Delete empty API files and cleaned up includes. (patchset #2 id:20001 of https://codereview.webrtc.org/1809053002/ )
>
> Reason for revert:
> Breaks Chromium build. Need to remove the references to the obsolete header files from Chromium and reland.
>
> Original issue's description:
> > Delete empty API files and cleaned up includes.
> >
> > TBR=glaznev@webrtc.org
> >
> > BUG=webrtc:5426
> >
> > Committed: https://crrev.com/c9022f508644dc33c01b05cb22ebfc2be145d6b2
> > Cr-Commit-Position: refs/heads/master@{#12039}
>
> TBR=nisse@webrtc.org,glaznev@webrtc.org,perkj@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5426
>
> Committed: https://crrev.com/246b5273986d5a5b140b3d1a656baa8d40c36276
> Cr-Commit-Position: refs/heads/master@{#12042}

TBR=nisse@webrtc.org,glaznev@webrtc.org,deadbeef@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12065}
2016-03-20 16:38:44 +00:00
jbauch
eec21bdae3 Reland Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
This CL removes copy and assign support from Buffer and changes various
parameters from Buffer to CopyOnWriteBuffer so they can be passed along
and copied without actually copying the underlying data.

With this changed some parameters to be "const" and fixed an issue when
creating a CopyOnWriteBuffer with empty data.

BUG=webrtc:5155

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

Cr-Commit-Position: refs/heads/master@{#12062}
2016-03-20 13:15:48 +00:00
kjellander
194e3bcc53 Revert of Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (patchset #4 id:60001 of https://codereview.webrtc.org/1785713005/ )
Reason for revert:
I'm really sorry for having to revert this but it seems this hit an unexpected compile error downstream:

webrtc/media/sctp/sctpdataengine.cc: In function 'void cricket::VerboseLogPacket(const void*, size_t, int)':
webrtc/media/sctp/sctpdataengine.cc:172:37: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
              data, length, direction)) != NULL) {
                                     ^
In file included from webrtc/media/sctp/sctpdataengine.cc:20:0:
third_party/usrsctp/usrsctplib/usrsctp.h:964:1: error:   initializing argument 1 of 'char* usrsctp_dumppacket(void*, size_t, int)' [-fpermissive]
 usrsctp_dumppacket(void *, size_t, int);
 ^

I'm sure you can fix this easily and just re-land this CL, while I'm going to look into how to add this warning at the public bots (on Monday).

Original issue's description:
> Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
>
> This CL removes copy and assign support from Buffer and changes various
> parameters from Buffer to CopyOnWriteBuffer so they can be passed along
> and copied without actually copying the underlying data.
>
> With this changed some parameters to be "const" and fixed an issue when
> creating a CopyOnWriteBuffer with empty data.
>
> BUG=webrtc:5155
>
> Committed: https://crrev.com/944c39006f1c52aee20919676002dac7a42b1c05
> Cr-Commit-Position: refs/heads/master@{#12058}

TBR=kwiberg@webrtc.org,tkchin@webrtc.org,tommi@webrtc.org,pthatcher@webrtc.org,jbauch@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5155

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

Cr-Commit-Position: refs/heads/master@{#12060}
2016-03-19 19:12:58 +00:00
jbauch
944c39006f Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
This CL removes copy and assign support from Buffer and changes various
parameters from Buffer to CopyOnWriteBuffer so they can be passed along
and copied without actually copying the underlying data.

With this changed some parameters to be "const" and fixed an issue when
creating a CopyOnWriteBuffer with empty data.

BUG=webrtc:5155

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

Cr-Commit-Position: refs/heads/master@{#12058}
2016-03-19 08:57:40 +00:00
Alex Glaznev
56d4d059ac Detect and report camera close timeout.
BUG=b/27677113
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12043}
2016-03-17 22:15:01 +00:00
deadbeef
246b527398 Revert of Delete empty API files and cleaned up includes. (patchset #2 id:20001 of https://codereview.webrtc.org/1809053002/ )
Reason for revert:
Breaks Chromium build. Need to remove the references to the obsolete header files from Chromium and reland.

Original issue's description:
> Delete empty API files and cleaned up includes.
>
> TBR=glaznev@webrtc.org
>
> BUG=webrtc:5426
>
> Committed: https://crrev.com/c9022f508644dc33c01b05cb22ebfc2be145d6b2
> Cr-Commit-Position: refs/heads/master@{#12039}

TBR=nisse@webrtc.org,glaznev@webrtc.org,perkj@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12042}
2016-03-17 22:03:46 +00:00
perkj
c9022f5086 Delete empty API files and cleaned up includes.
TBR=glaznev@webrtc.org

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12039}
2016-03-17 16:57:30 +00:00
magjed
d8ddb796e4 SurfaceTextureHelper: Fix startListening()/stopListening() race
SurfaceTextureHelper.startListening() is asynchronous and posts a Runnable to the handler thread. If stopListening() is called before that Runnable is executed, the Runnable will set the listener after stopListening() has been called. Then the next call to startListening() will fail with "SurfaceTextureHelper listener has already been set."

This CL adds a test to reproduce this bug, and a fix.

BUG=5519,b/27677772

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

Cr-Commit-Position: refs/heads/master@{#12030}
2016-03-17 10:13:47 +00:00
magjed
80c2cd973d Android: Add more info for createPbufferSurface() exceptions
This CL adds the width and height to the createPbufferSurface exception
message. Also, when a Callable.call() fails in
ThreadUtils.invokeUninterruptibly() we rethrow a new exception, but that
excludes the callstack from Callable.call(). This CL adds the callstack
from Callable.call() to make debugging easier.

BUG=b/27581640,b/27516991

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

Cr-Commit-Position: refs/heads/master@{#11996}
2016-03-15 11:43:16 +00:00
Honghai Zhang
7fb69db670 Reland the CL to remove candidates when doing continual gathering
When doing candidate re-gathering in the same ICE generation, signal the remote side to remove its remote candidates.

Fixed the pure virtual method in jsep.h

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

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

Cr-Commit-Position: refs/heads/master@{#11985}
2016-03-14 18:59:34 +00:00
magjed
0dc2316e8b VideoCapturer: Update interface
This CL changes the interface by adding a SurfaceTextureHelper argument
to VideoCapturer.startCapture(). This removes the need for the
VideoCapturer to create the SurfaceTextureHelper itself. This also means
that it is no longer necessary to send an EGLContext to the
VideoCapturerAndroid.create() function.

The SurfaceTextureHelper is now created in AndroidVideoCapturerJni, and
the EGLContext is passed from PeerConnectionFactory in
nativeCreateVideoSource().

Another change in this CL is that the C++ SurfaceTextureHelper creates
the Java SurfaceTextureHelper instead of getting it passed as an
argument in the ctor.

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11977}
2016-03-14 10:59:42 +00:00
tommi
6f59a4fc4f Revert of Remove candidates when doing continual gathering (patchset #15 id:560001 of https://codereview.webrtc.org/1648813004/ )
Reason for revert:
Breaks the build.  Suggest we reland with a default implementation of the new method, update Chrome, land a change that changes |{}| -> |= 0;|

Here's the error:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=262839-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DOSX -DWEBRTC_MAC -DWEBRTC_POSIX -DXML_STATIC -DWEBRTC_CHROMIUM_BUILD -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/khronos -I../../gpu -I../../skia/config -Igen/angle -I../../third_party/WebKit/Source -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -Igen/ui/resources -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/WebKit -I../../ipc -I../../third_party/opus/src/include -I../../third_party/WebKit -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../v8/include -I../../third_party/webrtc_overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../third_party -I../../third_party/expat/files/lib -I../../third_party/libvpx/source/libvpx -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -fcolor-diagnostics -fno-strict-aliasing  -c ../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc -o obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o
../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc:404:14: error: allocating an object of abstract class type 'content::MockSessionDescription'
  return new MockSessionDescription(type, sdp);
             ^
../../third_party/webrtc/api/jsep.h💯18: note: unimplemented pure virtual method 'RemoveCandidates' in 'MockSessionDescription'
  virtual size_t RemoveCandidates(
                 ^
1 error generated.
ninja: build stopped: subcommand failed.

Original issue's description:
> When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
> and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.
>
> BUG=
>
> Committed: https://crrev.com/84430da6817ce69c53bfad088be5c9df8b420f01
> Cr-Commit-Position: refs/heads/master@{#11958}

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

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

Cr-Commit-Position: refs/heads/master@{#11960}
2016-03-11 22:05:15 +00:00
honghaiz
84430da681 When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11958}
2016-03-11 21:28:12 +00:00
magjed
a97e3cfe49 Reland of Android VideoCapturerAndroid: Move stopListening() call to stopCaptureOnCameraThread(): https://codereview.webrtc.org/1763673002/
This reland includes a fix for the cameraObserver bug.

BUG=webrtc:5519
,b/27497950
TBR=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11943}
2016-03-10 14:54:00 +00:00
magjed
430a9c3bfd Revert of VideoCapturerAndroid: Use one thread per startCapture()/stopCapture() session (patchset #2 id:60001 of https://codereview.webrtc.org/1763673002/ )
Reason for revert:
Frame rate and freeze detection not working properly after switchCamera(). This is because the previous cameraObserver is not removed before posting a new one.

Original issue's description:
> VideoCapturerAndroid: Use one thread per startCapture()/stopCapture() session
>
> Currently, VideoCapturerAndroid sets the thread and handler in the ctor
> and clears them in dispose(). This CL sets the handler in startCapture()
> instead and clears it in stopCapture(). The purpose is to prepare for
> sending in the SurfaceTextureHelper in startCapture() instead of letting
> VideoCapturerAndroid create it in the ctor.
>
> All access to the handler is now synchronized by a lock, and all
> Runnables are posted with a token so that they can be removed all at
> once in stopCapture() to guarantee that no pending operation will be
> executed after stopCapture().
>
> BUG=webrtc:5519
>
> Committed: https://crrev.com/9cbebee523dbd280a4f67ad414a432ed730f241f
> Cr-Commit-Position: refs/heads/master@{#11939}

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

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

Cr-Commit-Position: refs/heads/master@{#11941}
2016-03-10 12:30:32 +00:00
magjed
9cbebee523 VideoCapturerAndroid: Use one thread per startCapture()/stopCapture() session
Currently, VideoCapturerAndroid sets the thread and handler in the ctor
and clears them in dispose(). This CL sets the handler in startCapture()
instead and clears it in stopCapture(). The purpose is to prepare for
sending in the SurfaceTextureHelper in startCapture() instead of letting
VideoCapturerAndroid create it in the ctor.

All access to the handler is now synchronized by a lock, and all
Runnables are posted with a token so that they can be removed all at
once in stopCapture() to guarantee that no pending operation will be
executed after stopCapture().

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11939}
2016-03-10 10:16:38 +00:00
honghaiz
97aacee11d Filter out the network in networkmonitor if the linkProperties is null.
It may be null if the network is unknown.
Also revised the logging to replace network id with network.toString(). They are pretty much the same for logging but network.toString does not need to parse the int value.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11925}
2016-03-09 04:50:03 +00:00
Honghai Zhang
13e433902d Filter out network-change event with a null interface name.
This fixes an Android native crash.
This has happened occasionally.

BUG=
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11919}
2016-03-08 21:10:23 +00:00
Magnus Jedvert
1ae6a45986 Android VideoCapturerAndroid: Move stopListening() call to stopCaptureOnCameraThread()
switchCamera() only calls stopCaptureOnCameraThread(), not
stopCapture(), so the stopListening() call must be placed there.

BUG=webrtc:5519,b/27497950
R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11917}
2016-03-08 19:38:15 +00:00
glaznev
3816bfd87b Fix incorrect stride information reported by some HW decoders.
BUG=webrtc:4787

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

Cr-Commit-Position: refs/heads/master@{#11915}
2016-03-08 18:35:38 +00:00
glaznev
295c4c276b Reduce camera freeze timeout to 4 sec.
BUG=b/27496394

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

Cr-Commit-Position: refs/heads/master@{#11914}
2016-03-08 18:35:11 +00:00
perkj
a3ede6c510 Renamed VideoSourceInterface to VideoTrackSourceInterface.
Moved VideoSourceInterface to MediaStreamInterface.h
Renamed VideoSourceTest to VideoCapturerTrackSourceTest
Renamed VideoSource to VideoCaptureTrackSource and cl lint and cl format.
BUG=webrtc:5426
TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11893}
2016-03-08 00:28:03 +00:00
Alex Glaznev
6a4a03c59c Add an option to soft reset HW decoder.
Soft reset can be used when input frame resolution changes
to avoid re creating MediaCodec instance.
Instead MediaCodec is flushed and some variables are reset.

R=pbos@webrtc.org, perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11878}
2016-03-04 22:11:02 +00:00
magjed
81e8e374ec Android SurfaceTextureHelper: Add stopListening() function
This CL replaces the function SurfaceTextureHelper.setListener() that
could only be called once with the functions startListening() and
stopListening() that can be called multiple times. This is necessary
when the SurfaceTextureHelper will be passed to the VideoCapturerAndroid
in startCapture(). startListening() will be called in startCapture() and
stopListening() in stopCapture().

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11855}
2016-03-03 10:18:44 +00:00
Magnus Jedvert
ffdd41ecf2 jni_helpers: Optimize IsNull()
The current implementation is unnecessary expensive - we create a local reference frame for creating new Java objects and then create a new local reference. It's cheaper to just do jni->IsSameObject(obj, nullptr).

R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11825}
2016-03-01 09:10:11 +00:00