Commit graph

10 commits

Author SHA1 Message Date
Rasmus Brandt
5e4ef774de Add unit test for JavaToNativeVideoCodecInfo.
Bug: webrtc:9495
Change-Id: I8f667f81754ed299a99ddc85af8ee73b148a2335
Reviewed-on: https://webrtc-review.googlesource.com/87580
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23885}
2018-07-09 13:26:34 +00:00
Sami Kalliomäki
b2daaaacbd Update capturer/test code to use the new interface VideoCapturer.
Bug: webrtc:9496
Change-Id: I9adf2c341b831820bbe71f2511616b629c9e1acc
Reviewed-on: https://webrtc-review.googlesource.com/87306
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23869}
2018-07-06 10:42:11 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Magnus Jedvert
f4aeb891b7 Android: Handle StartRecording() failure gracefully
This CL also adds a test to test the behavior when StartRecording()
fails, which is the case when e.g. the microphone is already in use.

Bug: webrtc:9491
Change-Id: Ifce60ce5e9b7fa7521ca5c9fe20794233456b9ce
Reviewed-on: https://webrtc-review.googlesource.com/87105
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23842}
2018-07-04 14:08:54 +00:00
Magnus Jedvert
6507054db1 Android: Add tests for VideoFrame.Buffer.toI420() and cropAndScale()
This CL adds tests that are primarily targeting
VideoFrame.Buffer.toI420() and cropAndScale(), but includes the whole
chain for YuvConverter, GlRectDrawer, and VideoFrameDrawer.

It also includes a couple of fixes to bugs that were exposed by the new
tests.

Bug: webrtc:9186, webrtc:9391
Change-Id: I5eb62979a8fd8def28c3cb2e82dcede57c42216f
Reviewed-on: https://webrtc-review.googlesource.com/83163
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23611}
2018-06-14 11:06:37 +00:00
Magnus Jedvert
c7da266cb8 Android JNI generation: Set JNI namespace in build files
This CL removes the use of the @JNINamespace annotation and instead
sets the correct JNI namespace in the build file.

Bug: webrtc:8278
Change-Id: Ia4490399e45a97d56b02c260fd80df4edfa092bf
Reviewed-on: https://webrtc-review.googlesource.com/76440
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23299}
2018-05-18 10:44:38 +00:00
Sami Kalliomäki
ff1de0af6b Add Android native API: CreateJavaVideoSource
Adds Android native API for creating VideoTrackSourceInterface objects
that can be fed frames using VideoCapturer.CapturerObserver.

NativeCapturerObserver is moved out of VideoSource because it will now
be used without a VideoSource. It now takes a pointer to
AndroidVideoTrackSource directly instead of VideoTrackSourceProxy.

VideoSource and NativeCapturerObserver JNI code is moved away from
androidvideotracksource.cc to their own files. This allows using
AndroidVideoTrackSource independently.

Bug: webrtc:8769
Change-Id: Ifb9e1eb27d4c8237597d19d932ca6e863abb4d27
Reviewed-on: https://webrtc-review.googlesource.com/76924
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23269}
2018-05-17 07:41:51 +00:00
Paulina Hensman
a2a9875dc2 Add unit tests for Android audio device module
The tests are a combination of the old audio_device_unittest.cc and
audio_manager_unittest.cc, with the exception of a few that were no
longer relevant.

RunPlayoutAndRecordingInFullDuplex remains disabled according to its
comment, but has been verified to pass on at least one device.
MeasureLoopbackLatency also remains disabled, but has not been tested due
to lack of necessary hardware.

Bug: webrtc:7452
Change-Id: Ie361bc8f5e1990729d7b4699faf2a73abe3cbe8d
Reviewed-on: https://webrtc-review.googlesource.com/69340
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22836}
2018-04-12 09:27:45 +00:00
Artem Titov
70899e012f Add support for creating java PCF from native one.
Add support for creating java PeerConnectionFactory from native one
by adding:
1. Constructor from native pointer in java PeerConnectionFactory
2. Method NativeToJavaPeerConnectionFactory in
sdk/android/native/api/peerconnection/peerconnectionfactory.h that
provides ability to convert native factory to java one.

Bug: webrtc:8946
Change-Id: Ibe8b019bd0d45849e2b16d74663d054784526746
Reviewed-on: https://webrtc-review.googlesource.com/62344
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22564}
2018-03-22 13:37:24 +00:00
Sami Kalliomäki
78498cf5ee Implements JavaToNativeStringMap and adds tests for native API.
Implements JavaToNativeStringMap that is a replacement for
JavaToStdMapStrings. It uses a new template method JavaToNativeMap. Also
adds testing support for native API and a test for JavaToNativeStringMap.

Bug: webrtc:8769
Change-Id: I580d4992a899ebe02da39af450fa51d52ee9b88b
Reviewed-on: https://webrtc-review.googlesource.com/48060
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21967}
2018-02-09 10:34:44 +00:00