This CL adds a way to extract the underlying android.opengl.EGLContext
and javax.microedition.khronos.egl.EGLContext for EglBase14 and
EglBase10 respectively. The reason is that clients can't be expected to
use only WebRTC's OpenGL code and might need to integrate with their
own GL code.
Bug: None
Change-Id: Ie00a564de45a090683542a52005da7e43c586ced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127888
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27205}
The stacktrace unit test was flaking on arm32; my theory is that this
happened when the thread whose stack we were dumping was doing a
system call inside `params->deadlock_start_event.Set();` in
ThreadFunction(). (This would be a problem because, according to the
comment at the bottom of the file, "stack traces originating from
kernel space do not include user space stack traces for ARM32.")
Attempt to solve this problem by spinning on an atomic flag instead,
since this involve no system calls. And add a short sleep to the main
thread, to give the other thread time to get from the barrier to the
thing it's actually supposed to deadlock on.
Bug: webrtc:10420
Change-Id: I4c6392157c8a06c64cb11146ffe9368e5bade6fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128340
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27158}
The video decoder thread is the pilot user.
For now this is an Android-only feature, since that's the only
platform we can print stack traces on.
Bug: webrtc:9987
Change-Id: Ie638c619673b5f159d91a32683fd787baf46479a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126222
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27127}
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.
After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.
Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
This is preparing for upstream removing the alias java_groups for the
individual support library targets: https://crrev.com/c/1500780
Bug: chromium:937987
Change-Id: I1c9efd83f6997288b334f3dc2f41233fa4e2ab61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125961
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#26995}
Ignore rtc_link_task_queue_impl flag,
instead use build_with_chromium for custom chromium implementation injection
This changes TaskQueue implementation used in webrtc fuzzers in chromium:
from own webrtc implementation to chromium's.
Bug: webrtc:10191
Change-Id: I63be28b680ae8ea8ee1dbf0c699263c392ce29d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125196
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26977}
Previously, we have created a Legacy ADM when no ADM is supplied.
With this change we will start creating a Java ADM instead.
The end goal is to make injection mandatory, and never creating ADMs.
This is one step on the way, and will allow us to clean up the Legacy
ADM code.
Bug: webrtc:7452
Change-Id: Ib99adc50346fe6b748f9435d2fc6321a50c3ee4e
Reviewed-on: https://webrtc-review.googlesource.com/c/123887
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26949}
CodecSpecificInfo has a default constructor, so initializing by memset is not necessary and is in the way of adding non-trivial members.
Related chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1495533
Bug: webrtc:10342
Change-Id: I36046f919f5fc34ea51de7288ff5c9cc0f2950b8
Reviewed-on: https://webrtc-review.googlesource.com/c/125093
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26924}
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).
The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.
Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.
[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
While passing negative delta is an error it is not fatal and recovered next line.
Bug: None
Change-Id: I3b9ce234a7763ba92bd158c9eda8ba4bd7a06f4b
Reviewed-on: https://webrtc-review.googlesource.com/c/124702
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26916}
There has been some crashes due to frames having illegal sizes, most
likely 0x0. Probably these frames are created as a workaround for
something.
It would be best to stop 0x0 frames from being created in the first
place, but a reasonable quick fix is to just not draw those frames.
Bug: webrtc:10367
Change-Id: Ib93057c4de7285773c99614b4e7d9bd4b099c4dc
Reviewed-on: https://webrtc-review.googlesource.com/c/124988
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26897}
It was previously possible to escape the sandbox by calling
rtc::Thread::SetAllowBlockingCalls(true).
This CL only removes the loophole on non-Android builds, because we
still have old Android code that relies on it. We expect that code to
go away soon-ish, though.
Bug: webrtc:9987
Change-Id: Ida96400d0abe430af4c2046284795d37d64f6613
Reviewed-on: https://webrtc-review.googlesource.com/c/123523
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26792}
Added audio format field and set method to Builder. - WebRTCAudioRecord. Added audio format field, added to constructor. Default audio format value AudioFormat.ENCODING_PCM_16BIT. initRecord(), added how to calculate bytesPerFrame, depends on audioFormat.
First commit and contribution, updated AUTHORS file
Bug: None
Change-Id: I16f660d42350ec9ce2e329b239bd7f6324e76dfe
Reviewed-on: https://webrtc-review.googlesource.com/c/122302
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26775}
This CL adds an API for injecting video processing after the WebRTC
CPU and QP scaling step.
Bug: webrtc:10247
Change-Id: I776498e1e9113f50e953ee411bbb31f181863312
Reviewed-on: https://webrtc-review.googlesource.com/c/119953
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26740}
New Robolectric version doesn't allow Surface to be constructed with a
null SurfaceTexture.
Bug: webrtc:10323
Change-Id: Ib6991d40b12b81d16ecb04787945cc4045e99b40
Reviewed-on: https://webrtc-review.googlesource.com/c/123236
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26734}
AndroidVideoTrackSource::OnFrameCaptured currently does adaptation
before passing frames on. We want to add video processing between
adaptation and delivering the frame to the rest WebRTC C++. This
CL prepares for that by splitting OnFrameCaptured() into a separate
adaptation step and delivery step.
Bug: webrtc:10247
Change-Id: Iab759bac7f3072d4552ece80d0b81fc3e634c64c
Reviewed-on: https://webrtc-review.googlesource.com/c/119952
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26571}
This CL attempts to do separation of concerns by introducing a simple
class that only handles JNI wrapping of a C++ AndroidVideoTrackSource.
This layer can be easiliy mocked out in Java unit tests.
Bug: webrtc:10247
Change-Id: Idbdbfde6d3e00b64f3f310f76505801fa496580d
Reviewed-on: https://webrtc-review.googlesource.com/c/121562
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26556}
This layer is not needed since the methods are thread safe, and the
classes those method touches (VideoBroadcaster, cricket::VideoAdapter)
are thread safe.
Bug: webrtc:10247
Change-Id: Id4e309de4ac1b9669052aaa60d3bd1ed965aaa29
Reviewed-on: https://webrtc-review.googlesource.com/c/120801
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26543}
JNI_COMMIT doesn't actually free the buffer.
From JNI docs:
0: copy back the content and free the elems buffer
JNI_COMMIT: copy back the content but do not free the elems buffer
JNI_ABORT: free the buffer without copying back the possible changes
Also introduces helper methods to help avoid this problem in the
future.
Bug: webrtc:10132
Change-Id: I769df286d3bd186fdf39ee2363e9002f36454509
Reviewed-on: https://webrtc-review.googlesource.com/c/120600
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26529}
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.
More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.
Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
This CL hooks up the recently added native stack trace functionality to
the existing PeerConnectionFactory API.
Bug: webrtc:10168
Change-Id: I16189d2988b1359fc53f9a4d0b3d06f34e2a8fd5
Reviewed-on: https://webrtc-review.googlesource.com/c/118600
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26344}
This is a reland of dc32cc00e8
Relanding because this CL was not the culprit for the Chrome bot.
(This code shouldn't even be executed in Chrome).
Original change's description:
> Android: Add helper methods for printing native stack traces
>
> This CL adds utility functions to unwind the stack for a given thread on
> Android ARM devices. This works on top of unwind.h and unwinds native
> (C++) stack traces only. Unwinding a thread from another thread is done
> by overriding the signal handler with a custom function and then
> interrupting the specific thread.
>
> Bug: webrtc:10168
> Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
> Reviewed-on: https://webrtc-review.googlesource.com/c/118141
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26328}
TBR=tommi
Bug: webrtc:10168
Change-Id: I4c33c2c147cf10c0172c98a55d32dd35a08517c8
Reviewed-on: https://webrtc-review.googlesource.com/c/118704
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26341}
This CL prepares for adding stack trace capability to the native part of
the Android PeerConnectionFactory code. The main blocker this CL removes
is the static printStackTrace() function. We need this function to be
non-static since the C++ counterpart of PCF is non-static. This Cl also
performs various other cleanups in surrounding code.
This CL:
* Removes static thread references from PeerconnectionFactory and turns
them into non-static member variables.
* Adds a non-static alternative to
PeerconnectionFactory.printStackTraces().
* Removes the rtc::Thread::Invoke() calls, and turns them into
asynchronous posts.
* Consolidates the two different Java PCF ctors into one, so that there
is one shared path used by both native API and Java API.
Bug: webrtc:10168
Change-Id: I05dbf5b17069d4a115d9adafc25faa121f23b945
Reviewed-on: https://webrtc-review.googlesource.com/c/115961
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26329}
This CL adds utility functions to unwind the stack for a given thread on
Android ARM devices. This works on top of unwind.h and unwinds native
(C++) stack traces only. Unwinding a thread from another thread is done
by overriding the signal handler with a custom function and then
interrupting the specific thread.
Bug: webrtc:10168
Change-Id: If5adffd3a6bb57bf502168743e09a7eefc292bf3
Reviewed-on: https://webrtc-review.googlesource.com/c/118141
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26328}
kMaxSimulcastStreams, kMaxSpatialLayers and kMaxTemporalStreams don't
really beling on VideoBitrateAllocation.
common_types.h is going away and it feels dubious to requrie include
of the full VideoEncoder api to use them. Therefore moving them into a
seprate file/target.
Also includes some remaining cleanup of includes.
Bug: webrtc:9271
Change-Id: I7ded3d97a9a835ac756159700774445a2b93a697
Reviewed-on: https://webrtc-review.googlesource.com/c/117305
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26299}
Use size() accessor function. Also replace most nearby uses of _buffer
with data().
Bug: webrtc:9378
Change-Id: I1ac3459612f7c6151bd057d05448da1c4e1c6e3d
Reviewed-on: https://webrtc-review.googlesource.com/c/116783
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26273}
- Remove visibility of encoder target.
- Remove unnecessary dependency on task_queue.
- Remove CreateRtcEventLogFactory() declaration from the rtc_event_log_api target
since the function is not defined in that target.
Bug: None
Change-Id: Id9edee86f358d08ea063d62bd96e9653c5b06d55
Reviewed-on: https://webrtc-review.googlesource.com/c/116060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26215}