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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
This change is done to remove abnormally high decode time measurements for H264 decoding. H264 decoding sometimes keeps a few frames as reference before outputting a new decoded frame. This pipeline causes some frames to get stuck when the source stops sending new frames. When the source starts sending frames again, the decode time measurements for the frames that were stuck will include the pause time, which can be arbitrary high. This CL is a simple fix for this problem by constraining the decode time values to a "reasonable" range.
BUG=b/27306053
Review URL: https://codereview.webrtc.org/1725243007
Cr-Commit-Position: refs/heads/master@{#11792}
Currently, VideoCapturerAndroid owns a dedicated tread, and
SurfaceTextureHelper get this thread passed in the ctor. In
VideoCapturerAndroid.dispose(), ownership of the thread is passed to
SurfaceTextureHelper so that we can return directly instead of waiting
for the last frame to return.
This CL makes the SurfaceTextureHelper own the thread the whole time
instead, and VideoCapturerAndroid calls getHandler() to get it instead.
BUG=webrtc:5519
Review URL: https://codereview.webrtc.org/1738123002
Cr-Commit-Position: refs/heads/master@{#11790}
Boost low QP threashold to 21, otherwise VGA encoding never
scales up even at 2.5 Mbps.
Also reduce high QP threshold to scale down faster.
BUG=b/26504665
R=jackychen@google.com
Review URL: https://codereview.webrtc.org/1717763003 .
Cr-Commit-Position: refs/heads/master@{#11712}
This CL simplifies the VideoCapturer interface from 'String getSupportedFormatsAsJson() throws JSONException' to 'List<CaptureFormat> getSupportedFormats()'. The intermediate conversion to/from a JSON string is removed, and AndroidVideoCapturerJni converts the Java list to a C++ vector directly instead.
BUG=webrtc:5519
R=perkj@webrtc.org
Review URL: https://codereview.webrtc.org/1702603002 .
Cr-Commit-Position: refs/heads/master@{#11669}
This CL adds a check to see if the return value of GLES20.glCreateShader() is zero. Also, shaders are flagged for deletion immediately after glLinkProgram() instead of doing it in release().
BUG=b/27197590
Review URL: https://codereview.webrtc.org/1702953002
Cr-Commit-Position: refs/heads/master@{#11668}
For now, the network cost is purely based on the network type (cellular has cost 0xFFFF and everything else has cost 0).
Add cost to the candidate signaling and the stun request signaling (which is needed for peer reflexive candidates).
BUG=webrtc:4325
Review URL: https://codereview.webrtc.org/1668073002
Cr-Commit-Position: refs/heads/master@{#11642}
This CL factors out the interface that AndroidVideoCapturerJni is using to communicate with the Java counterpart. This interface is moved into VideoCapturer. The interface is not touched in this CL, and a follow-up CL is planned to simplify and improve it.
Another change is that the native part of VideoCapturer is created in PeerConnectionFactory.createVideoSource() instead of doing it immediately in the ctor.
BUG=webrtc:5519
R=perkj@webrtc.org
Review URL: https://codereview.webrtc.org/1696553003 .
Cr-Commit-Position: refs/heads/master@{#11606}
Reason for revert:
Breaks downstream compilation. Please reland in a non-breaking fashion.
Original issue's description:
> Android: Remove VideoCapturer
>
> This CL makes PeerConnectionFactory.createVideoSource() and nativeCreateVideoSource work directly with VideoCapturerAndroid instead of going via VideoCapturer. The native part is now created in nativeCreateVideoSource() instead of doing it immediately in VideoCapturerAndroid.create().
>
> BUG=webrtc:5519
> R=perkj@webrtc.org
>
> Committed: https://crrev.com/09eab315fddc3432c19d8f662f4b9360f2a58010
> Cr-Commit-Position: refs/heads/master@{#11582}
TBR=perkj@webrtc.org,magjed@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/1690073002
Cr-Commit-Position: refs/heads/master@{#11586}
Also fixing an issue with the Java PeerConnection unit test.
It wasn't correctly waiting for 10 video frames to be received.
And fixed an issue with the video engine, where generated
black frames don't get any rotation.
BUG=webrtc:5128
Review URL: https://codereview.webrtc.org/1639583003
Cr-Commit-Position: refs/heads/master@{#11583}
This CL makes PeerConnectionFactory.createVideoSource() and nativeCreateVideoSource work directly with VideoCapturerAndroid instead of going via VideoCapturer. The native part is now created in nativeCreateVideoSource() instead of doing it immediately in VideoCapturerAndroid.create().
BUG=webrtc:5519
R=perkj@webrtc.org
Review URL: https://codereview.webrtc.org/1684403002 .
Cr-Commit-Position: refs/heads/master@{#11582}
In addition to the code moved from talk/app/webrtc
there were some files in webrtc/api/objctests that still
had the libjingle license header.
BUG=webrtc:5418
TBR=tkchin@webrtc.org
NOTRY=True
Review URL: https://codereview.webrtc.org/1680293005
Cr-Commit-Position: refs/heads/master@{#11552}
The previously disabled warnings that were inherited from
talk/build/common.gypi are now replaced by target-specific disabling
of only the failing warnings. Additional disabling was needed since the stricter
compilation warnings that applies to code in webrtc/.
License headers will be updated in a follow-up CL.
Other modifications:
* Updated the header guards.
* Sorted the includes using chromium/src/tools/sort-headers.py
except for these files:
talk/app/webrtc/peerconnectionendtoend_unittest.cc
talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
webrtc/media/devices/win32devicemanager.cc
The HAVE_SCTP define was added for the peerconnection_unittests target
in api_tests.gyp.
I also checked that none of
SRTP_RELATIVE_PATH
HAVE_SRTP
HAVE_WEBRTC_VIDEO
HAVE_WEBRTC_VOICE
were used by the talk/app/webrtc code.
For Chromium, the following changes will need to be applied to the roll CL that updates the
DEPS for WebRTC and libjingle:
https://codereview.chromium.org/1615433002
BUG=webrtc:5418
NOPRESUBMIT=True
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1610243002 .
Cr-Commit-Position: refs/heads/master@{#11545}