Reason for revert:
Break projects.
Original issue's description:
> Make the default ctor of rtc::Thread, protected.
> The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.
>
> The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.
>
> BUG=none
>
> Review-Url: https://codereview.webrtc.org/2981623002
> Cr-Commit-Position: refs/heads/master@{#19001}
> Committed: a8a3515997TBR=kthelgason@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none
Review-Url: https://codereview.webrtc.org/2979963002
Cr-Commit-Position: refs/heads/master@{#19003}
The goal is to force use of Thread::Create or Thread::CreateWithSocketServer.
The default constructor constructs a 'default' socket server, which is usually a 'physical' socket server, but not always. Not every instance of Thread actually needs to have network support, so it's better to have this be explicit instead of unknowingly instantiate one.
BUG=none
Review-Url: https://codereview.webrtc.org/2981623002
Cr-Commit-Position: refs/heads/master@{#19001}
Suppressing lint errors using comments is an undocumented feature of the
linter, and suppressing using the tools:ignore attribute should be
preferred.
Suppressing using comments becomes a problem when using the manifest
merger introduced in
6ada47bc79
as it reformats the comments slightly:
<!--suppress MissingPrefix -->
becomes
<!-- supress MissingPrefix -->
which causes the linter to disregard the suppression.
Bug: 740657
Change-Id: I8e365744d089271c390254e7c958b24b81043766
Reviewed-on: https://chromium-review.googlesource.com/566860
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Ingemar Ådahl <ingemara@opera.com>
Cr-Commit-Position: refs/heads/master@{#18971}
All downstream code have been updated to the new location.
In PRESUBMIT.py:
* Remove webrtc/rtc_base from CPP_BLACKLIST
* Add webrtc/rtc_base to LEGACY_API_DIRS
Fix some duplicated paths in
webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
BUG=webrtc:7634
TBR=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2973183002
Cr-Commit-Position: refs/heads/master@{#18948}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
BUG=webrtc:7634
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
Review-Url: https://codereview.webrtc.org/2969623003
Cr-Commit-Position: refs/heads/master@{#18870}
[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]
Allow an external audio processing module to be used in WebRTC
This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.
As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.
BUG=webrtc:7775
Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
In most cases we can just return a frame referencing the buffer
returned by the decoder.
Bug: webrtc:7760
Change-Id: I0b42ab9662b39149e42a3c83adfd38a9d80e0e30
Reviewed-on: https://chromium-review.googlesource.com/544299
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18824}
Reland the base->rtc_base without adding stub headers (will be
done in follow-up CL). This preserves git blame history of all files.
BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org
Change-Id: Iea3bb6f3f67b8374c96337b63e8f5aa3e6181012
Reviewed-on: https://chromium-review.googlesource.com/554611
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18821}
Will reland in two different commits to preserve git blame history.
BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org
Change-Id: I550da8525aeb9c5b8f96338fcf1c9714f3dcdab1
Reviewed-on: https://chromium-review.googlesource.com/554610
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18820}
This refactoring takes a careful approach to avoid rushing the change:
* stub headers are left in all the old locations of webrtc/base
* existing GN targets are kept and now just forward to the moved ones
using public_deps.
The only exception to the above is the base_java target and its .java files,
which were moved to webrtc/rtc_base right away since it's not possible
to use public_deps for android_library.
To avoid breaking builds, a temporary Dummy.java file was added to
the new intermediate target in webrtc/rtc_base:base_java as well to avoid
hitting a GN assert in the android_library template.
The above approach should make the transition smooth without breaking
downstream.
A helper script was created (https://codereview.webrtc.org/2879203002/)
and was run like this:
stub-headers.py -s webrtc/base -d webrtc/rtc_base -i 7634
stub-headers.py -s webrtc/base/numerics -d webrtc/rtc_base/numerics -i 7634
Fixed invalid header guards in the following files:
webrtc/base/base64.h
webrtc/base/cryptstring.h
webrtc/base/event.h
webrtc/base/flags.h
webrtc/base/httpbase.h
webrtc/base/httpcommon-inl.h
webrtc/base/httpcommon.h
webrtc/base/httpserver.h
webrtc/base/logsinks.h
webrtc/base/macutils.h
webrtc/base/nattypes.h
webrtc/base/openssladapter.h
webrtc/base/opensslstreamadapter.h
webrtc/base/pathutils.h
webrtc/base/physicalsocketserver.h
webrtc/base/proxyinfo.h
webrtc/base/sigslot.h
webrtc/base/sigslotrepeater.h
webrtc/base/socket.h
webrtc/base/socketaddresspair.h
webrtc/base/socketfactory.h
webrtc/base/stringutils.h
webrtc/base/testbase64.h
webrtc/base/testutils.h
webrtc/base/transformadapter.h
webrtc/base/win32filesystem.h
Added new header guards to:
sslroots.h
testbase64.h
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
R=kwiberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2877023002 .
Cr-Commit-Position: refs/heads/master@{#18816}
The conversion code was wrong because it assumed the 3x3 matrix is a
XYZ-matrix when it really is XYW-matrix. We have to override the matrix
for I420 frames to flip the vertically before rendering.
R=magjed@webrtc.org
Bug: webrtc:7760
Change-Id: I1f08c1a929bf5721706e2a902701100cf7a9c31d
Reviewed-on: https://chromium-review.googlesource.com/541346
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18801}
Adds a timeout to the dequeue input buffer call. This improves stability
because WebRTC quickly queues frames multiple when the call starts. This
might cause the decoder to run out of input buffers. Waiting for
dequeueOutputBuffers call is no longer necessary.
Bug: webrtc:7760
Change-Id: I503ff1cf44042c4d8610077090148d9dfef169f5
Reviewed-on: https://chromium-review.googlesource.com/548357
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18800}
This change also wires up the rest of the production code in
webrtc/sdk/android to be built when the directory is a dependency.
BUG=webrtc:7613
NOTRY=True
Change-Id: Ideda181970a5a570c3f8148b033e471e926243d1
Reviewed-on: https://chromium-review.googlesource.com/548038
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18791}
This change preserves rotation through the decoder, rather than requiring
callers to keep track of rotation. The test now uses a non-zero rotation
to ensure it is preserved.
Commit 3814524 inadvertently reverted several changes that weren't merged
properly before submit. In particular, it clobbered some log messages,
comments, and error codes. This change fixes those mistakes.
BUG=webrtc:7760
Change-Id: If529ee59fc56de7937e362dc15591295e2cf9f79
Reviewed-on: https://chromium-review.googlesource.com/546415
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18752}
This CL allows VP9Impl to return a WrappedI444Buffer if the image format is
VPX_IMG_FMT_I444.
Needs to be checked in after Chromium CL 2876363003 is checked in.
BUG=webrtc:7506
Review-Url: https://codereview.webrtc.org/2927943003
Cr-Commit-Position: refs/heads/master@{#18727}
The implementation creates an Android hardware video decoder. It is built
around the same patterns as the HardwareVideoEncoderFactory.
This change pulls some shared code and constants into a common "utils" class.
Finally, adds an instrumentation test for the HardwareVideoDecoder.
BUG=webrtc:7760
Change-Id: Iea6eaae7727925743cb54f7c3153a6c07d62f55d
Reviewed-on: https://chromium-review.googlesource.com/536254
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18686}
I'm preparing adding support for Java VideoFrames in
AndroidVideoTrackSource. I split out small unrelated clean-ups into this
CL in order to make the big CL more focused.
Bug: webrtc:7749
Change-Id: Ib261ab8eb055898b39307d4e78935bf60d323820
Reviewed-on: https://chromium-review.googlesource.com/539638
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18660}
Timing information is gathered in EncodedImage,
starting at encoders. Then it's sent using RTP header extension. In the
end, it's gathered at the GenericDecoder. Actual reporting and tests
will be in the next CLs.
BUG=webrtc:7594
Review-Url: https://codereview.webrtc.org/2911193002
Cr-Commit-Position: refs/heads/master@{#18659}
This CL makes the WebRTC Java Wrapper more modular and allows the android
users to build WebRTC without audio and video(DataChannel only).
The BUILD file in sdk/android/ is modified to support modular WebRTC.
The peerconnection_jni.cc is split into peerconnection_jni.cc, video_jni.cc,
video_renderer_jni.cc and ownedfactoryandthreads.h/cc.
Add new modular build targets to JNI layer: audio_jni, video_jni,
null_audio_jni, null_video_jni. The users can link with different
targets to for different WebRTC functionalities.
This is split from CL: https://codereview.webrtc.org/2854123003/TBR=magjed@webrtc.org
BUG=webrtc:7613
Review-Url: https://codereview.webrtc.org/2939203002
Cr-Commit-Position: refs/heads/master@{#18647}
Adds the VideoEncoderFactory interface and implements it for use with HardwareVideoEncoder. This uses MediaCodecVideoEncoder's initialization code as an example.
BUG=webrtc:7760
Change-Id: I9fbc93ce9ac4ad866750a4386c4f15e800a3073e
Reviewed-on: https://chromium-review.googlesource.com/530063
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18636}
Guarded by field trial - similar to high profile encoder.
If high profile is requested, but device do not support it
then fallback to baseline profile.
BUG=b/34816463
Review-Url: https://codereview.webrtc.org/2936313002
Cr-Commit-Position: refs/heads/master@{#18619}
This CL makes the WebRTC more modular and allows the users to build
WebRTC without audio and video(DataChannel only).
The BUILD files in call/, logging/, media/ and pc/ are modified to
support modular WebRTC.
The dependencies on Call and RtcEventLog are removed from the
PeerConnection. Instead of being created internally, they would be
passed in by the PeerConnectionFactory.
Add the CreateModularPeerConnectionFactory function which allow the
users to create a PeerConnectionFactory with the modules they need.
If the users want to build WebRTC without audio and video, they can
pass in null pointers for modules they don't need. (MediaEngine,
VideoEncoderFactory etc.)
BUG=webrtc:7613
Review-Url: https://codereview.webrtc.org/2854123003
Cr-Commit-Position: refs/heads/master@{#18617}
This functionality is needed when sending C++ I420 buffers to Java
VideoSinks or Java encoders.
Bug: webrtc:7749
Change-Id: Ied783470b90b9d2e0cb5930795f35de4a296d499
Reviewed-on: https://chromium-review.googlesource.com/532961
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18597}
This field shouldn't have been in the class in the first place.
Bug: webrtc:7760
Change-Id: If3c1d24f18a643249da1ed072bdfe06a37a7da12
Reviewed-on: https://chromium-review.googlesource.com/535539
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18593}
This is to make it possible to override the rtc_task_queue target only.
BUG=none
Review-Url: https://codereview.webrtc.org/2931273002
Cr-Commit-Position: refs/heads/master@{#18534}
These interfaces will be used by the future refactoring that will
allow clients to provide custom codec implementations.
Change-Id: If199bc2807e1c27094c05983c62fa43d2eec5700
Bug: webrtc:7760
Reviewed-on: https://chromium-review.googlesource.com/522065
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18441}
Color distortion also happens on Android L. Tested on the Mi 4.
BUG=webrtc:7681
Review-Url: https://codereview.webrtc.org/2894643003
Cr-Commit-Position: refs/heads/master@{#18423}
Passing the call through JNI is unnecessary.
Bug: webrtc:7730
Change-Id: Icf1ecd7e2ea54033342120311c70d47b4a4f7c9a
Reviewed-on: https://chromium-review.googlesource.com/521050
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18408}
This new VideoFrame class closesly matches the C++ webrtc::VideoFrame
and webrtc::VideoFrameBuffer classes. It's supposed to replace the
existing VideoRenderer.I420Frame. The purpose is to clean up the code
and support more frame formats.
BUG=webrtc:7749
Review-Url: https://codereview.webrtc.org/2915083002
Cr-Commit-Position: refs/heads/master@{#18404}