This ensures memory is released timely and avoids problems with garbage
collection.
Native buffers don't support array operation, so FileVideoCapturer had
to be update to use FileChannel to write ByteBuffers directly.
Bug: None
Change-Id: I3f63d2adc159e9f39f0c68dd0bd6b1747686584e
Reviewed-on: https://webrtc-review.googlesource.com/55262
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22118}
In practice, this is safe since WebRTC doesn't access the buffer after the
callback returns. This avoids unnecessary memory allocations causing out of
memory errors.
Bug: b/72675429
Change-Id: I2ed0224f40b7e1fa67c7aba625b99211f9c1e0a3
Reviewed-on: https://webrtc-review.googlesource.com/49162
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21932}
This removes the DefaultAudioProcessingFactory, PostProcessingFactory and DefaultAudioProcessingFactoryTest classes and leaves the interface AudioProcessingFactory without any default implementation (as the default APM is already created by the PeerConnectionFactory JNI).
Bug: webrtc:8701
Change-Id: I259108afbc5b24cab5161485f45af4236f775c18
Reviewed-on: https://webrtc-review.googlesource.com/37220
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21577}
C++ API allows passing all configuration through RTCConfiguration
object. This adds all values previously passed through PC constraints
to Java RTCConfiguration object and deprecates API that takes PC
contraints.
Using the deprecated API overrides the values in RTCConfigration
object.
Bug: webrtc:8663, webrtc:8662
Change-Id: I128432c3caba74403513fb1347ff58830c643885
Reviewed-on: https://webrtc-review.googlesource.com/33460
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21357}
This is similar to https://webrtc-review.googlesource.com/c/src/+/3620
for iOS.
Using the new WebRtcMediaEngineFactory::Create API, the built-in
software video codecs are no longer appended to the injected codecs.
To be able to use the software codecs, they are exposed as Java
classes through SoftwareVideoEncoderFactory etc.
There is also a new DefaultVideoEncoderFactory used by AppRTCMobile.
This factory tries to use hardware implementations where available,
but falls back to using the injected software codecs.
The HardwareVideoEncoderFactory is temporarily also falling back on
the software codecs in its default configuration in order to
maintain backwards compatibility.
Bug: webrtc:7925
Change-Id: I3e8c5ed492ccd160aca968986ad217d7978a951c
Reviewed-on: https://webrtc-review.googlesource.com/17480
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20647}
In https://chromium-review.googlesource.com/c/chromium/src/+/750645
Chromium started to use an ErrorProne plugin to discourage synchronized
public methods (an encourage the usage of synchronized blocks).
In order to unblock the Chromium Roll we can suppress these warnings
and decide if we want to align with Chromium on this check or ask
them to make it optional.
More details in the bug.
TBR=magjed@webrtc.org
Bug: webrtc:8491
Change-Id: Ie77a324e54aab44a4f59853959549f1d21f884a0
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/20060
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20569}
Previously input buffers would be filled incorrectly for sparsely
packed buffers where stride is not equal to the plane width.
Bug: webrtc:8478
Change-Id: I080fa3c354a27982bb996be8c1e41b103384e4bc
Reviewed-on: https://webrtc-review.googlesource.com/17321
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20550}
This is done in preparation to make all javac warnings into errors for
WebRTC targets.
Bug: webrtc:6597
Change-Id: I402043157bd75943adf0de52111e5a1bb179c6d1
Reviewed-on: https://webrtc-review.googlesource.com/15104
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20450}
This allows injection of a user-defined post processing module from
the Android layer.
Bug: webrtc:8163
Change-Id: If3a6b4726c34c5f82d186b8cf95373c283cbd3f6
Reviewed-on: https://webrtc-review.googlesource.com/7610
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20367}
In order to enable errorprone [1] we have to fix this finding.
third_party/errorprone has been recently enabled in Chromium and in
order to unblock the Chromium Roll we have to fix these errors.
[1] - https://cs.chromium.org/chromium/src/third_party/errorprone/
Bug: webrtc:8390
Change-Id: Ic737def5ae2a8c6ad1216d9b485af59987fe511c
Tbr: magjed@webrtc.org
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/9161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20273}
This will handle the scenario where, for example, the initial
offer/answer only negotiates audio, and video is added later (to the
same stream). Previously, there was absolutely no way to get a handle to
the new track without hacking the SDP. Now, the stream will be updated
after setRemoteDescription finishes.
Bug: webrtc:5677
Change-Id: Iea31bb7744da6b82afdaf44c8f74d721298a9474
Reviewed-on: https://webrtc-review.googlesource.com/6261
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20228}
This renames I420BufferImpl to JavaI420Buffer and moves it as part of
the API.
Bug: webrtc:7749
Change-Id: I70726f248ba4601b4922996712bdfdafbfa4a1e1
Reviewed-on: https://webrtc-review.googlesource.com/5381
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20145}
This is a reland of 7a2bfd22e6
Original change's description:
> Improve unit testing for HardwareVideoEncoder and fix bugs.
>
> Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
> The main added feature is support for dynamically switching between
> texture and byte buffer modes.
>
> Bug: webrtc:7760
> Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
> Reviewed-on: https://webrtc-review.googlesource.com/2682
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19963}
Bug: webrtc:7760
Change-Id: I605647da456525de8e535cc66cab9d0b3f14240b
Reviewed-on: https://webrtc-review.googlesource.com/3641
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20013}
This reverts commit 7a2bfd22e6.
Reason for revert: Breaks external test.
Original change's description:
> Improve unit testing for HardwareVideoEncoder and fix bugs.
>
> Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
> The main added feature is support for dynamically switching between
> texture and byte buffer modes.
>
> Bug: webrtc:7760
> Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
> Reviewed-on: https://webrtc-review.googlesource.com/2682
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19963}
TBR=magjed@webrtc.org,sakal@webrtc.org
Change-Id: If1e283a8429c994ad061c7a8320d76633bd0d66b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://webrtc-review.googlesource.com/3640
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19964}
Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
The main added feature is support for dynamically switching between
texture and byte buffer modes.
Bug: webrtc:7760
Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
Reviewed-on: https://webrtc-review.googlesource.com/2682
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19963}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}