Enable the -Wformat-security and -Wformat warnings for talk/.
Remove *.def and *.h.pump files from webrtc/base/base.gyp since they're not supported by some tools.
BUG=4242
R=henrika@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49969004
Cr-Commit-Position: refs/heads/master@{#9191}
Addressing discrepancy where NACK used to be set from send codecs in
WebRtcVideoEngine(1), and before this change, from recv codecs in
WebRtcVideoEngine2. This should address that NACK might be sent even if
the remote side does not support it.
BUG=4626
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53409004
Cr-Commit-Position: refs/heads/master@{#9171}
Fixes bug where Chromium would send REMB even though the remote party
doesn't announce support for it (because it was based on local codec
settings instead of remote ones).
BUG=4626
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/54389004
Cr-Commit-Position: refs/heads/master@{#9170}
Attempts to get wireshark to decode the DTLS were problematic (wireshark only does it for certain versions of some DTLS implementations), so just do what firefox does and dump a txt2pcap-compatible log when requested.
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49159004
Cr-Commit-Position: refs/heads/master@{#9162}
This CL will change the behavior when enabling Delay Agnostic AEC through the media constraint (and AudioOption delay_agnostic_aec)
FROM
Use DA-AEC instead of AECM if there is no HW-AEC
TO
Use DA-AEC even if there is a HW-AEC
Before this change the user will not really know if the Delay Agnostic AEC is running or not, so it is more intuitive if the option overrides the built-in one if the user has asked for it.
BUG=4472
TESTED=locally with a modified AppRTCDemo app
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49859004
Cr-Commit-Position: refs/heads/master@{#9147}
Introduces a new capture class derived from cricket::VideoCapturer that
provides the ability to switch cameras and updates AppRTCDemo to use it.
Some future work pending to clean up AppRTCDemo UI.
BUG=4070
R=magjed@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48279005
Cr-Commit-Position: refs/heads/master@{#9137}
This CL makes two changes to rtc::Buffer that have had to wait for
Chromium's use of it to be modernized:
1. Change default return type of rtc::Buffer::data() from char* to
uint8_t*. uint8_t is a more natural type for bytes, and won't
accidentally convert to a string. (Chromium previously expected
the default return type to be char, which is why
rtc::Buffer::data() initially got char as default return type in
9478437f, but that's been fixed now.)
2. Stop accepting void* inputs in constructors and methods. While
this is convenient, it's also dangerous since any pointer type
will implicitly convert to void*.
(This was previously committed (9e1a6d7c) but had to be reverted
(cbf09274) because Chromium on Android wasn't quite ready for it).
TBR=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47109004
Cr-Commit-Position: refs/heads/master@{#9132}
This CL makes two changes to rtc::Buffer that have had to wait for
Chromium's use of it to be modernized:
1. Change default return type of rtc::Buffer::data() from char* to
uint8_t*. uint8_t is a more natural type for bytes, and won't
accidentally convert to a string. (Chromium previously expected
the default return type to be char, which is why
rtc::Buffer::data() initially got char as default return type in
9478437f, but that's been fixed now.)
2. Stop accepting void* inputs in constructors and methods. While
this is convenient, it's also dangerous since any pointer type
will implicitly convert to void*.
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/44269004
Cr-Commit-Position: refs/heads/master@{#9121}
Instead a ViECapturer object is allocated and directly operated on. This
additionally exposes ViESharedData to Call to access the module
ProcessThread, moving towards Call ownership of shared resources.
BUG=1695
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/45339004
Cr-Commit-Position: refs/heads/master@{#9119}
https://codereview.chromium.org/1051343002 adds a dependency
on Chromium's third_party/junit into base/ which affects our
Android tests that uses that code.
The precompiled JUnit 4.11 JAR file that is only by the
libjingle_peerconnection_java_unittest target on Linux has been
moved to third_party/junit-jar, since it collided with the expected
path for the JUnit dependency mentioned above.
It had to be kept since the Chromium JUnit is only possible to build
when OS==android.
This CL also brings in Mockito and Robolectric, which should be
useful for our Android tests.
Other relevant changes:
* src/buildtools: 3b302fe..15308f4
* src/third_party/libjpeg_turbo: 034e9a9..9e9058b
* src/third_party/libyuv: 32ad6e0..01db3d1
Details: a12e1e1..0cb2549/DEPS
Clang version was not updated in this roll.
BUG=4499
R=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48239004
Cr-Commit-Position: refs/heads/master@{#9113}
Replaces interface usage with direct calls on ViEEncoder removing a
layer of indirection. Also removing some methods from ViEImageProcess
that were only added for Video{Send,Receive}Stream usage.
BUG=1695
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/45319004
Cr-Commit-Position: refs/heads/master@{#9111}
Alson includes
- a test verifying that the option is set
- changed the test verifying delay_agnostic_aec option is set to use non-default value
BUG=4555
TESTED=locally through AppRTCDemo on N7 and Android One
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/46059004
Cr-Commit-Position: refs/heads/master@{#9109}
This makes the build more flexible when linking against
prebuilt external libraries.
Use existing build_* variables for libyuv and json in talk/
(already in use in webrtc/).
Also make it possible to avoid building the GTK parts of the Linux build.
BUG=4242
R=andrew@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/44179005
Cr-Commit-Position: refs/heads/master@{#9087}
Receive streams seem to be reconfigured with identical codecs when
another stream is removed. Preventing this reconfiguration makes sure
that existing streams don't report stats during teardown when the stream
is still supposed to be running.
BUG=1788
R=asapersson@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/44249004
Cr-Commit-Position: refs/heads/master@{#9059}
This implementation registers RTX-APT map inside RTP sender and receiver.
While it only generates SDP with RTX associated with VP8 to make it
compatible with previous Chrome versions.
Should add following changes after reaches stable,
* Use RTX-APT map for building and restoring RTP packets.
* Add RTX support for RED or VP9 in Video engine.
* Set RTX payload type for RED inside FecConfig in EndToEndTest.
BUG=4024
R=mflodman@webrtc.org, pbos@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/36889004
Cr-Commit-Position: refs/heads/master@{#9040}
AndroidVideoCapturerJni dtor is called on signaling thread
and may destroy JNI global refs while processing late camera
frame arrival in ReturnBuffer_w() in worker thread.
Fix this by waiting for all function invoked on worker thread
to complete in camera JNI dtor.
R=wzh@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49099004
Cr-Commit-Position: refs/heads/master@{#9037}
1. Constructors, SetData(), and AppendData() now accept uint8_t*,
int8_t*, and char*. Previously, they accepted void*, meaning that
any kind of pointer was accepted. I think requiring an explicit
cast in cases where the input array isn't already of a byte-sized
type is a better compromise between convenience and safety.
2. data() can now return a uint8_t* instead of a char*, which seems
more appropriate for a byte array, and is harder to mix up with
zero-terminated C strings. data<int8_t>() is also available so
that callers that want that type instead won't have to cast, as
is data<char>() (which remains the default until all existing
callers have been fixed).
3. Constructors, SetData(), and AppendData() now accept arrays
natively, not just decayed to pointers. The advantage of this is
that callers don't have to pass the size separately.
4. There are new constructors that allow setting size and capacity
without initializing the array. Previously, this had to be done
separately after construction.
5. Instead of TransferTo(), Buffer now supports swap(), and move
construction and assignment, and has a Pass() method that works
just like std::move(). (The Pass method is modeled after
scoped_ptr::Pass().)
R=jmarusic@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/42989004
Cr-Commit-Position: refs/heads/master@{#9033}
It breaks integration with upstream re2 library on Chromium.
Without patching re2 library, with this define, it produces the
following error:
../../third_party/re2/re2/re2.h:254:5: error: expected identifier
POSIX, // POSIX syntax, leftmost-longest match
As we define POSIX on the command line, the C preprocessor changes
RE2::POSIX to nothing and thus break the compilation. :(
See chromium-dev mailing list for this discussion in
https://groups.google.com/a/chromium.org/d/topic/chromium-dev/UXCHnX7pV44/discussion
BUG=None
TEST=ninja -C out/Debug, everything compiles as before
R=sergeyu@chromium.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/46049004
Patch from Thiago Farina <tfarina@chromium.org>.
Cr-Commit-Position: refs/heads/master@{#9032}
NVidia HW encoder bitrate control is allowing too much
bitrate fluctuation. Plus average encoding time is not enough
for 720p 30 fps support.
R=wzh@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48099004
Cr-Commit-Position: refs/heads/master@{#9014}
Add separate functions for returning stats from send/receive stream and updated how functions are used.
Add test implementation for histogram methods in system_wrappers/interface/metrics.h.
BUG=4519
R=pbos@webrtc.org, stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49639004
Cr-Commit-Position: refs/heads/master@{#9009}
This is a major libyuv update (almost 200 revisions):
d204db6..32ad6e0
Relevant changes:
* src/third_party/libyuv: d204db6..32ad6e0
* src/third_party/nss: d1edb68..9506806
Details: 8af41b3..dcb0929/DEPS
Since bayer and Q420 format support have been removed from libyuv, all tests related to those format are removed.
Clang version was not updated in this roll.
R=kjellander@webrtc.org
TBR=tommi
Review URL: https://webrtc-codereview.appspot.com/48989004
Cr-Commit-Position: refs/heads/master@{#9008}
If a codec fails to set (e.g. there's no codec configured), this
prevents a stream reconfigure with an invalid config. Reconfiguring a
stream without correct codec settings causes a CHECK failure.
BUG=chromium:475116
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/44219004
Cr-Commit-Position: refs/heads/master@{#9007}
Acquiring stream_lock_ in WebRtcVideoChannel2 in a callback from Call
forms a lock-order inversion between process-thread locks and libjingle
locks, manifesting as CPU adaptation requests blocking on stream
creation that is blocked on the CPU adaptation request finishing.
R=asapersson@webrtc.org, mflodman@webrtc.org
BUG=4535,chromium:475065
Review URL: https://webrtc-codereview.appspot.com/50679004
Cr-Commit-Position: refs/heads/master@{#8985}
Buildbot Android Tests (L Nexus9)(dbg) consistently fails on Instrumentation test libjingle_peerconnection_android_unittest (VideoCapturerAndroidTest) after this CL was landed.
This reverts commit f4acf46c86.
BUG=
TBR=perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/45079004
Cr-Commit-Position: refs/heads/master@{#8981}
- Do not handle more than one camera switch request at a time
to avoid blocking camera thread with multiple switch requests.
- Add a callback to notify when camera switch has been done.
R=perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/46859004
Cr-Commit-Position: refs/heads/master@{#8978}
Also prevents that we try to restore audio mode when it has not been changed.
TBR=glaznev
BUG=NONE
TEST=AppRTCDemo and verify that volume control switches from "Ringtone to Phone" mode when call starts and switches back to Ringtone mode when call ends.
Review URL: https://webrtc-codereview.appspot.com/46879004
Cr-Commit-Position: refs/heads/master@{#8975}
It is just a pass through to webrtc/video_frame.h. Updated the callers
to include webrtc/video_frame.h instead and removed i420_video_frame.h.
This should fix pbos' TODO in i420_video_frame.h.
Tested on Linux with the following command lines:
$ rm -rf out/
$ ./webrtc/build/gyp_webrtc
$ ninja -C out/Debug
BUG=None
TEST=see above
R=magjed@webrtc.org, pbos@webrtc.org, tommi@webrtc.orgTBR=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/46819004
Patch from Thiago Farina <tfarina@chromium.org>.
Cr-Commit-Position: refs/heads/master@{#8973}
- Check texture properties update flag using the same lock under which
the flag value is set.
- Adjust texture properties inside frame queue lock.
- Plus adding extra logging to track video renderer properties updates.
R=wzh@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/45929004
Cr-Commit-Position: refs/heads/master@{#8941}
- Make PeerConnectionClient a singleton.
- Fix crash in CpuMonitor.
- Remove reading constraints from room response.
- Catch and report camera errors.
R=wzh@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/43059004
Cr-Commit-Position: refs/heads/master@{#8930}
No need to include this header since the API is just taking a pointer to
it.
BUG=1092
TEST=./webrtc/build/gyp_webrtc && ninja -C out/Debug
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/44059004
Patch from Thiago Farina <tfarina@chromium.org>.
Cr-Commit-Position: refs/heads/master@{#8928}
This cl uses the YV12 buffers from Java without a copy if no rotation is needed. Buffers are returned to the camera when the encoder and renderers no longer needs them.
This add a new frame type WrappedI420Buffer based in that allows for wrapping existing memory buffers and getting a notification when it is no longer used.
AndroidVideoCapturer::FrameFactory::CreateAliasedFrame wraps frame received from Java. For each wrapped frame a new reference to AndroidVideoCapturerDelegate is held to ensure that the delegate can not be destroyed until all frames have been returned.
Some overlap exist in webrtcvideoframe.cc and webrtcvideengine.cc with https://webrtc-codereview.appspot.com/47399004/ that is expected to be landed before this cl.
BUG=1128
R=glaznev@webrtc.org, magjed@webrtc.orgTBR=mflodman@webrtc.org // For changes in webrtc/common_video/video_frame_buffer
Review URL: https://webrtc-codereview.appspot.com/49459004
Cr-Commit-Position: refs/heads/master@{#8923}
This should fix the TODO in that header.
BUG=None
TEST=ninja -C out/Debug still compiles everything.
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47919004
Patch from Thiago Farina <tfarina@chromium.org>.
Cr-Commit-Position: refs/heads/master@{#8921}
All RTP packets from sender side will carry the rotation info. (will file a bug to track this) On the receiving side, only packets with marker bit set will be examined.
Tests completed:
1. android standalone to android standalone
2. android standalone to chrome (with and without this change)
3. android on chrome
BUG=4145
R=glaznev@webrtc.org, mflodman@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47399004
Cr-Commit-Position: refs/heads/master@{#8905}
RenderFrame should not modify the I420VideoFrame (and we don't).
This CL changes the declaration of RenderFrame from:
int32_t RenderFrame(const uint32_t streamId, I420VideoFrame& videoFrame)
to:
int32_t RenderFrame(const uint32_t streamId, const I420VideoFrame& videoFrame)
BUG=1128
R=mflodman@webrtc.org, perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/46689005
Cr-Commit-Position: refs/heads/master@{#8902}