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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}