226 Commits

Author SHA1 Message Date
zstein
d89b0bcc8a JNI wrapper for PeerConnection::SetBitrate.
BUG=webrtc:7395

Review-Url: https://codereview.webrtc.org/2868413004
Cr-Commit-Position: refs/heads/master@{#19243}
2017-08-03 18:11:40 +00:00
deadbeef
0d48c69331 Relanding: Break peerconnection_jni.cc into multiple files, in "pc" directory.
Relanding after adding "androidnetworkmonitor_jni.h" header to jni/
directory, since some clients were including it directly.

This CL breaks peerconnection_jni.cc apart, into one file for each
class. It also moves the methods for converting between C++/Java
structs into "java_native_conversion.cc", and uses a consistent naming
scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
"pc" directory, of which deadbeef@ is added as an owner.

It also moves some relevant files to the "pc" directory that belong
there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
rtcstatscollectorcallbackwrapper. This directory is intended to hold
all the files that deal with the PeerConnection API specifically, or
related classes (like DataChannel, RtpSender, MediaStreamTrack) that
are tied to it closely.

BUG=webrtc:8055

Review-Url: https://codereview.webrtc.org/2992103002
Cr-Commit-Position: refs/heads/master@{#19241}
2017-08-03 17:20:17 +00:00
zhihuang
1b1daec013 Revert of Break peerconnection_jni.cc into multiple files, in "pc" directory. (patchset #6 id:100001 of https://codereview.webrtc.org/2992103002/ )
Reason for revert:
Borken in the internal projects.

Original issue's description:
> Break peerconnection_jni.cc into multiple files, in "pc" directory.
>
> This CL breaks peerconnection_jni.cc apart, into one file for each
> class. It also moves the methods for converting between C++/Java
> structs into "java_native_conversion.cc", and uses a consistent naming
> scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
> "pc" directory, of which deadbeef@ is added as an owner.
>
> It also moves some relevant files to the "pc" directory that belong
> there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
> rtcstatscollectorcallbackwrapper. This directory is intended to hold
> all the files that deal with the PeerConnection API specifically, or
> related classes (like DataChannel, RtpSender, MediaStreamTrack) that
> are tied to it closely.
>
> deadbeef@webrtc.org is added as an owner of the new "pc" subdirectory.
>
> BUG=webrtc:8055
>
> Review-Url: https://codereview.webrtc.org/2992103002
> Cr-Commit-Position: refs/heads/master@{#19223}
> Committed: dd7d8f1b60

TBR=magjed@webrtc.org,sakal@webrtc.org,deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:8055

Review-Url: https://codereview.webrtc.org/2989323002
Cr-Commit-Position: refs/heads/master@{#19226}
2017-08-03 01:01:05 +00:00
deadbeef
dd7d8f1b60 Break peerconnection_jni.cc into multiple files, in "pc" directory.
This CL breaks peerconnection_jni.cc apart, into one file for each
class. It also moves the methods for converting between C++/Java
structs into "java_native_conversion.cc", and uses a consistent naming
scheme ("JavaToNativeX, NativeToJavaX"). These files go into a new
"pc" directory, of which deadbeef@ is added as an owner.

It also moves some relevant files to the "pc" directory that belong
there: ownedfactoryandthreads, androidnetworkmonitor_jni, and
rtcstatscollectorcallbackwrapper. This directory is intended to hold
all the files that deal with the PeerConnection API specifically, or
related classes (like DataChannel, RtpSender, MediaStreamTrack) that
are tied to it closely.

deadbeef@webrtc.org is added as an owner of the new "pc" subdirectory.

BUG=webrtc:8055

Review-Url: https://codereview.webrtc.org/2992103002
Cr-Commit-Position: refs/heads/master@{#19223}
2017-08-02 22:05:10 +00:00
sakal
836f60cda1 Move matrix from VideoFrame to TextureBuffer.
Previously, the matrix in VideoFrame was used to crop and scale the
frame. This caused complications because webrtc::VideoFrame doesn't
include a matrix. cropAndScale method is added to VideoBuffer class for
cropping and scaling instead.

BUG=webrtc:7749, webrtc:7760

Review-Url: https://codereview.webrtc.org/2990583002
Cr-Commit-Position: refs/heads/master@{#19179}
2017-07-28 14:12:23 +00:00
deadbeef
28e2919cfd Adding Android binding for RTCConfiguration::max_ipv6_networks.
BUG=webrtc:7703

Review-Url: https://codereview.webrtc.org/2984863002
Cr-Commit-Position: refs/heads/master@{#19172}
2017-07-27 16:14:38 +00:00
sakal
9eb3d19ec0 Fix a crash in PeerConnectionFactory.SetVideoHwAccelerationOptions.
BUG=webrtc:8035

Review-Url: https://codereview.webrtc.org/2992523002
Cr-Commit-Position: refs/heads/master@{#19171}
2017-07-27 15:23:58 +00:00
deadbeef
54c721541d Fix issues with NetworkMonitor singleton when used by multiple clients.
When you create multiple "PeerConnectionFactory"s, they end up using
the same NetworkMonitor singleton. But the second one's
"AndroidNetworkMonitor" class (in C++) wasn't getting the expected
network list update, and as a result it wasn't binding sockets to
networks successfully, acting as if the networks didn't exist.

The solution is just to move "updateActiveNetworkList" to
"startMonitoring". This CL also does some other minor
cleanup/refactoring, and fixes a more corner-casey issue where, if the
first PeerConnection is destroyed, the second one would stop receiving
network updates.

BUG=webrtc:7946

Review-Url: https://codereview.webrtc.org/2990693002
Cr-Commit-Position: refs/heads/master@{#19156}
2017-07-26 18:56:49 +00:00
korniltsev.anatoly
f3a48ab6dc Delete unused field from AndroidVideoTrackSource
BUG=None

Review-Url: https://codereview.webrtc.org/2974713002
Cr-Commit-Position: refs/heads/master@{#19117}
2017-07-24 08:06:39 +00:00
sakal
8ac955be2c Set target API to 18 for MediaCodecUtils.
Target API 18 is needed for texture mode encoding.

BUG=None

Review-Url: https://codereview.webrtc.org/2982403002
Cr-Commit-Position: refs/heads/master@{#19107}
2017-07-21 10:30:02 +00:00
ehmaldonado
f6a861ab6c Remove remains of webrtc/base
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/2976293002
Cr-Commit-Position: refs/heads/master@{#19094}
2017-07-19 17:40:47 +00:00
sakal
9c0e0fa687 Fix fromAndroidGraphicsMatrix to use column-major order for output.
BUG=webrtc:7760

Review-Url: https://codereview.webrtc.org/2976423002
Cr-Commit-Position: refs/heads/master@{#19089}
2017-07-19 08:24:55 +00:00
Bjorn Mellem
0cf9a4a482 Add texture support to HardwareVideoEncoder.
HardwareVideoEncoderFactory can now take an EglBase.Context on creation.
When it does, it creates video encoders in texture mode.  It uses the
COLOR_FormatSurface colorFormat.  It passes the EglBase.Context to the
HardwareVideoEncoder.

The HardwareVideoEncoder sets up an input surface for its codec and handles
incoming frames by drawing them onto the input surface.

BUG=webrtc:7760
R=pthatcher@webrtc.org, sakal@webrtc.org

Review-Url: https://codereview.webrtc.org/2977153003 .
Cr-Commit-Position: refs/heads/master@{#19083}
2017-07-18 20:19:27 +00:00
Bjorn Mellem
8fb23618d8 Add texture support to HardwareVideoDecoder.
HardwareVideoDecoder is now a listener for SurfaceTextureHelper.  It takes a
SurfaceTextureHelper on construction.  If it is non-null, it operates in texture
mode instead of byte-buffer mode.

When in texture mode, the HardwareVideoDecoder renders output frames to a Surface,
listens for the texture frame to become available, wraps it in a VideoFrame, and
pushes it to the decoder callback.

As in MediaCodecVideoDecoder, it may queue up to three buffers while waiting for
the surface to become available for rendering.  If more buffers are queued, it will
drop the oldest.

This change also implements the VideoFrame.TextureBuffer and reorganizes code
for wrapping an existing ByteBuffer into an I420Buffer.  This makes it easier
to implement the texture buffer's ToI420() method.

BUG=webrtc:7760
R=pthatcher@webrtc.org, sakal@webrtc.org

Review-Url: https://codereview.webrtc.org/2977643002 .
Cr-Commit-Position: refs/heads/master@{#19081}
2017-07-18 18:33:44 +00:00
sakal
fcf97c3b75 Fix fullscreen scaling in AppRTCMobile.
The surface view renderer size was set to match parent so it couldn't
adjust based on the frame size. The size is now set to wrap_content
which allows the renderer to adjust. The root element of the call
activity is changed to FrameLayout to allow the renderer to center.

requestLayout is added to SurfaceView setScalingType so onMeasure gets
called again.

BUG=webrtc:7901

Review-Url: https://codereview.webrtc.org/2978173002
Cr-Commit-Position: refs/heads/master@{#19073}
2017-07-18 12:01:08 +00:00
Steve Anton
d960a0c7d1 Android bindings for ice_regather_interval_range RTCConfiguration option
Bug: webrtc:7969
Change-Id: I3fbb723d35fa6cc4c7b92aa1e155b974e9fb0b55
Reviewed-on: https://chromium-review.googlesource.com/567698
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@chromium.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19062}
2017-07-17 20:09:43 +00:00
tommi
e7251599a3 Reland of Make the default ctor of rtc::Thread, protected
This is a partial re-land. The change doesn't make the default Thread ctor protected anymore but it does mark it as deprecated and updates all use of it in WebRTC.

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/2977953002
Cr-Commit-Position: refs/heads/master@{#19031}
2017-07-14 21:44:46 +00:00
tserng
ff7acb19a1 Reset isFirstFrameRendered on init of SurfaceViewRenderer
If a SurfaceViewRenderer is reinitialized, the onFirstFrameRendered
callback is not fired.

Ensure that we reset the flag when the SurfaceViewRenderer is
initialized.

BUG=webrtc:7985

Review-Url: https://codereview.webrtc.org/2981793002
Cr-Commit-Position: refs/heads/master@{#19016}
2017-07-14 09:35:53 +00:00
charujain
a117b04113 Revert of Make the default ctor of rtc::Thread, protected (patchset #3 id:40001 of https://codereview.webrtc.org/2981623002/ )
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: a8a3515997

TBR=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}
2017-07-13 14:06:39 +00:00
tommi
a8a3515997 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}
2017-07-13 12:47:25 +00:00
Ingemar Ådahl
87b6ddb561 Suppress MissingPrefix using tools attribute
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}
2017-07-11 13:41:35 +00:00
jianjun.zhu
c024740b5e Use relative paths in GN files.
BUG=webrtc:7952
TBR=kjellander@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2974863003
Cr-Commit-Position: refs/heads/master@{#18970}
2017-07-11 13:20:45 +00:00
ehmaldonado
370dd47973 Revert of Remove remains of webrtc/base (patchset #7 id:120001 of https://codereview.webrtc.org/2973183002/ )
Reason for revert:
Breaks lots of downstream projects.

Original issue's description:
> Remove remains of webrtc/base
>
> 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}
> Committed:
9483b49baf

TBR=kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7634

Review-Url: https://codereview.webrtc.org/2976633002
Cr-Commit-Position: refs/heads/master@{#18949}
2017-07-10 12:58:42 +00:00
ehmaldonado
9483b49baf Remove remains of webrtc/base
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}
2017-07-10 11:50:54 +00:00
ehmaldonado
eaaae9e91b base->rtc_base: Update .c, .mm and .java files.
TBR=kwiberg@webrtc.org
BUG=webrtc:7634

Review-Url: https://codereview.webrtc.org/2974613003
Cr-Commit-Position: refs/heads/master@{#18926}
2017-07-07 10:09:51 +00:00
Edward Lemur
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
bdodson
6aa95117d8 Fix null ref in NetworkMonitorAutoDetect if Connectivity Manager service is unavailable
BUG=webrtc:7917
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2963363002
Cr-Commit-Position: refs/heads/master@{#18906}
2017-07-05 16:55:09 +00:00
Henrik Kjellander
a80c16a67c Revert "Update includes for webrtc/{base => rtc_base} rename (2/3)"
This reverts commit c3771cc4d37f5573fe53b7c7cff295a4f0f9560f.
(breaks downstream internal project)

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2972463002 .
Cr-Commit-Position: refs/heads/master@{#18873}
2017-07-01 14:48:18 +00:00
kjellander
c3771cc4d3 Update includes for webrtc/{base => rtc_base} rename (2/3)
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}
2017-06-30 20:42:44 +00:00
bdodson
06b47c520d Listen for Wifi-Direct networks and include them in the network list
BUG=webrtc:7708
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2951803003
Cr-Commit-Position: refs/heads/master@{#18839}
2017-06-29 15:57:01 +00:00
peah
a9cc40b7d2 Allow an external audio processing module to be used in WebRTC
[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}
2017-06-29 15:32:09 +00:00
Sami Kalliomäki
8d08a92c05 Do not copy I420 frames in the decoder when not necessary.
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}
2017-06-29 08:10:16 +00:00
Henrik Kjellander
c03627683f Reland "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
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}
2017-06-29 06:04:25 +00:00
Henrik Kjellander
ec78f1cebc Revert "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
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}
2017-06-29 05:54:22 +00:00
Henrik Kjellander
6776518bea Move webrtc/{base => rtc_base}
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}
2017-06-28 18:58:10 +00:00
Sami Kalliomäki
372e587ea8 Fix samplingMatrix for I420Frames converted from VideoFrame.
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}
2017-06-28 07:58:42 +00:00
Sami Kalliomäki
3aa3ea7913 Improve HardwareVideoDecoder stability.
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}
2017-06-28 07:38:22 +00:00
Henrik Kjellander
a7d0df7ac1 Enable libjingle_peerconnection_datachannelonly_so target.
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}
2017-06-27 20:20:05 +00:00
Sami Kalliomäki
471f63559f Allow passing in decoder factory to PeerConnectionFactory.
Bug: webrtc:7760
Change-Id: I8509de8f0170f1f60f917992b5806b926a8bb392
Reviewed-on: https://chromium-review.googlesource.com/535561
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18787}
2017-06-27 15:31:13 +00:00
Sami Kalliomäki
93ad1f7f1b Reland C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
This reverts commit 37a23504980bbd06fa9b1709357ce6a33afada30.

Reason for revert: Fix compilation error on release builds.

Original change's description:
> Revert "C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces."
> 
> This reverts commit ef4342f21ba9448138fc7d22482f3210cb20fd7e.
> 
> Reason for revert: Breaks chromium.webrtc.fyi
> 
> Original change's description:
> > C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
> > 
> > Bug: webrtc:7760
> > Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
> > Reviewed-on: https://chromium-review.googlesource.com/535475
> > Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#18773}
> 
> TBR=magjed@webrtc.org,sakal@webrtc.org
> 
> Change-Id: I45810b9f3573074bb52539aa63843d59865c02f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7760
> Reviewed-on: https://chromium-review.googlesource.com/549337
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18776}

TBR=magjed@webrtc.org,sakal@webrtc.org

Change-Id: Id38836a1cb63ff265af6562a0512818acb8afb0a
Bug: webrtc:7760
Reviewed-on: https://chromium-review.googlesource.com/549338
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18777}
2017-06-27 08:26:00 +00:00
Sami Kalliomäki
37a2350498 Revert "C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces."
This reverts commit ef4342f21ba9448138fc7d22482f3210cb20fd7e.

Reason for revert: Breaks chromium.webrtc.fyi

Original change's description:
> C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
> 
> Bug: webrtc:7760
> Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
> Reviewed-on: https://chromium-review.googlesource.com/535475
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18773}

TBR=magjed@webrtc.org,sakal@webrtc.org

Change-Id: I45810b9f3573074bb52539aa63843d59865c02f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://chromium-review.googlesource.com/549337
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18776}
2017-06-27 07:35:42 +00:00
Sami Kalliomäki
ef4342f21b C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
Bug: webrtc:7760
Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
Reviewed-on: https://chromium-review.googlesource.com/535475
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18773}
2017-06-27 07:15:00 +00:00
Bjorn Mellem
852a560088 Fix some bugs in the HardwareVideoDecoder.
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}
2017-06-26 06:11:21 +00:00
yuweih
23cc468ddf Return WrappedI444Buffer in VP9Impl
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}
2017-06-23 03:28:06 +00:00
Bjorn Mellem
38145241a2 Create VideoDecoderFactory interface and implementation.
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}
2017-06-20 18:37:30 +00:00
Bjorn Mellem
b080b46df4 Create a hardware VideoDecoder implementation using Android MediaCodec.
BUG=webrtc:7760

Change-Id: Ieae3852d22cadf24cf4184ae985062918a85f02c
Reviewed-on: https://chromium-review.googlesource.com/536237
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@{#18685}
2017-06-20 18:04:08 +00:00
Magnus Jedvert
3352ce92f9 Android: Modular WebRTC follow-up
This CL cleans up parts from https://codereview.webrtc.org/2939203002/.

Bug: webrtc:7613
Change-Id: I96d1a2cc91174f43d3cae2cb41b2e0fe7142e3e9
Reviewed-on: https://chromium-review.googlesource.com/539456
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18665}
2017-06-19 16:05:53 +00:00
Magnus Jedvert
3093ef193e Android JNI: Clean up AndroidVideoTrackSource and NativeHandleImpl
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}
2017-06-19 14:46:08 +00:00
ilnik
04f4d126f8 Implement timing frames.
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}
2017-06-19 14:18:55 +00:00
zhihuang
af6293517f Support building WebRTC without audio and video for Android
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}
2017-06-18 05:31:24 +00:00