Generate new Android.bp file and correct build errors

The following are not yet available in their respective libraries so
attempts to use it in webrtc result in a call to abort():
* libvpx's CONSTRAINED_FROM_ABOVE_DROP constant
* libyuv's I010 buffers

The original webrtc project expects to have third party libraries
checked out in third_party/ and base/third_party/. Added some headers
in those libraries with a single line including the right header from
external/<library>. Updated .gitignore to keep track of said headers.

Bug: 153469641
Test: mm, also built cuttlefish using this library and ran it locally
Change-Id: I2d596942e34093dccc65d4b7b8249b6afc14d31f
This commit is contained in:
Jorge E. Moreira
2020-07-01 16:41:11 -07:00
parent 85770cd25b
commit 889b21a2e1
27 changed files with 6445 additions and 2 deletions

2
.gitignore vendored
View File

@ -39,14 +39,12 @@
.settings
.sw?
/Makefile
/base
/build
/buildtools
/ios
/mojo
/out
/testing
/third_party
/tools
/tools_webrtc/android/profiling/flamegraph
/tools_webrtc/android/profiling/simpleperf

6391
Android.bp Normal file

File diff suppressed because it is too large Load Diff

0
Android.mk Normal file
View File

View File

@ -66,12 +66,16 @@ rtc::scoped_refptr<I010Buffer> I010Buffer::Copy(
const int width = source.width();
const int height = source.height();
rtc::scoped_refptr<I010Buffer> buffer = Create(width, height);
#if 0
RTC_CHECK_EQ(
0, libyuv::I010Copy(
source.DataY(), source.StrideY(), source.DataU(), source.StrideU(),
source.DataV(), source.StrideV(), buffer->MutableDataY(),
buffer->StrideY(), buffer->MutableDataU(), buffer->StrideU(),
buffer->MutableDataV(), buffer->StrideV(), width, height));
#else
abort();
#endif
return buffer;
}
@ -81,12 +85,16 @@ rtc::scoped_refptr<I010Buffer> I010Buffer::Copy(
const int width = source.width();
const int height = source.height();
rtc::scoped_refptr<I010Buffer> buffer = Create(width, height);
#if 0
RTC_CHECK_EQ(
0, libyuv::I420ToI010(
source.DataY(), source.StrideY(), source.DataU(), source.StrideU(),
source.DataV(), source.StrideV(), buffer->MutableDataY(),
buffer->StrideY(), buffer->MutableDataU(), buffer->StrideU(),
buffer->MutableDataV(), buffer->StrideV(), width, height));
#else
abort();
#endif
return buffer;
}
@ -150,11 +158,15 @@ rtc::scoped_refptr<I010Buffer> I010Buffer::Rotate(
rtc::scoped_refptr<I420BufferInterface> I010Buffer::ToI420() {
rtc::scoped_refptr<I420Buffer> i420_buffer =
I420Buffer::Create(width(), height());
#if 0
libyuv::I010ToI420(DataY(), StrideY(), DataU(), StrideU(), DataV(), StrideV(),
i420_buffer->MutableDataY(), i420_buffer->StrideY(),
i420_buffer->MutableDataU(), i420_buffer->StrideU(),
i420_buffer->MutableDataV(), i420_buffer->StrideV(),
width(), height());
#else
abort();
#endif
return i420_buffer;
}

1
base/third_party/libevent/event.h vendored Normal file
View File

@ -0,0 +1 @@
#include <event.h>

View File

@ -187,11 +187,15 @@ class I010BufferBase : public I010BufferInterface {
rtc::scoped_refptr<I420BufferInterface> I010BufferBase::ToI420() {
rtc::scoped_refptr<I420Buffer> i420_buffer =
I420Buffer::Create(width(), height());
#if 0
libyuv::I010ToI420(DataY(), StrideY(), DataU(), StrideU(), DataV(), StrideV(),
i420_buffer->MutableDataY(), i420_buffer->StrideY(),
i420_buffer->MutableDataU(), i420_buffer->StrideU(),
i420_buffer->MutableDataV(), i420_buffer->StrideV(),
width(), height());
#else
abort();
#endif
return i420_buffer;
}

View File

@ -768,7 +768,13 @@ int VP9EncoderImpl::InitAndSetControlSettings(const VideoCodec* inst) {
// Screenshare dropping mode: drop a layer only together with all lower
// layers. This ensures that drops on lower layers won't reduce frame-rate
// for higher layers and reference structure is RTP-compatible.
#if 0
// CONSTRAINED_FROM_ABOVE_DROP is not defined in the available version of
// libvpx
svc_drop_frame_.framedrop_mode = CONSTRAINED_FROM_ABOVE_DROP;
#else
abort();
#endif
svc_drop_frame_.max_consec_drop = 5;
for (size_t i = 0; i < num_spatial_layers_; ++i) {
svc_drop_frame_.framedrop_thresh[i] = config_->rc_dropframe_thresh;

View File

@ -0,0 +1 @@
#include <aom/aom_codec.h>

View File

@ -0,0 +1 @@
#include <aom/aom_decoder.h>

View File

@ -0,0 +1 @@
#include <aom/aom_encoder.h>

View File

@ -0,0 +1,12 @@
#pragma once
#include <aom/aomcx.h>
#include <stdlib.h>
aom_codec_iface_t *aom_codec_av1_cx(void) {
// external/libaom doesn't include encoder sources, which makes this function
// not available. Defined here to make it build, but ensure it fails fast if
// called in runtime.
abort();
}

View File

@ -0,0 +1 @@
#include <aom/aomdx.h>

View File

@ -0,0 +1 @@
#include <auth.h>

View File

@ -0,0 +1 @@
#include <crypto_types.h>

1
third_party/libsrtp/include/srtp.h vendored Normal file
View File

@ -0,0 +1 @@
#include <srtp.h>

View File

@ -0,0 +1 @@
#include <srtp_priv.h>

1
third_party/libyuv/include/libyuv.h vendored Normal file
View File

@ -0,0 +1 @@
#include <libyuv.h>

View File

@ -0,0 +1 @@
#include <libyuv/compare.h>

View File

@ -0,0 +1 @@
#include <libyuv/convert.h>

View File

@ -0,0 +1 @@
#include <libyuv/convert_argb.h>

View File

@ -0,0 +1 @@
#include <libyuv/convert_from.h>

View File

@ -0,0 +1 @@
#include <libyuv/planar_functions.h>

View File

@ -0,0 +1 @@
#include <libyuv/rotate_argb.h>

View File

@ -0,0 +1 @@
#include <libyuv/scale.h>

1
third_party/pffft/src/pffft.h vendored Normal file
View File

@ -0,0 +1 @@
#include <pffft.h>

View File

@ -0,0 +1 @@
#include <rnn_activations.h>

View File

@ -0,0 +1 @@
#include <rnn_vad_weights.h>