aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-01 00:35:39 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-01 00:35:39 +0000
commit1d8714b5dcea5ef9bb1bc0b8675b7613e218c263 (patch)
tree0ba69160b62d105569d4f5d1c03b22f0db354c51
parentfc1afdafa1582f61bdf8c61c9d8facf71f12be1b (diff)
parent29601f2cae48d941fa1bdaf4f87ede9820f0779a (diff)
downloadcuttlefish-emu-34-3-release.tar.gz
Snap for 11518112 from 29601f2cae48d941fa1bdaf4f87ede9820f0779a to emu-34-3-releaseemu-34-3-release
Change-Id: I6c0b7c62d56e0363586d16d285ce773e4156bc87
-rw-r--r--host/commands/assemble_cvd/graphics_flags.cc5
-rw-r--r--host/commands/process_sandboxer/main.cpp1
-rw-r--r--host/frontend/webrtc/audio_handler.cpp8
-rw-r--r--host/frontend/webrtc/libdevice/audio_sink.h2
-rw-r--r--host/frontend/webrtc/libdevice/audio_track_source_impl.cpp6
-rw-r--r--host/frontend/webrtc/libdevice/audio_track_source_impl.h4
6 files changed, 14 insertions, 12 deletions
diff --git a/host/commands/assemble_cvd/graphics_flags.cc b/host/commands/assemble_cvd/graphics_flags.cc
index 2a0f7c78d..19aebc519 100644
--- a/host/commands/assemble_cvd/graphics_flags.cc
+++ b/host/commands/assemble_cvd/graphics_flags.cc
@@ -71,8 +71,9 @@ Result<RenderingMode> GetRenderingMode(const std::string& mode) {
struct AngleFeatures {
// Prefer linear filtering for YUV AHBs to pass
- // android.media.decoder.cts.DecodeAccuracyTest.
- bool prefer_linear_filtering_for_yuv = true;
+ // android.media.decoder.cts.DecodeAccuracyTest on older branches.
+ // Generally not needed after b/315387961.
+ bool prefer_linear_filtering_for_yuv = false;
// Map unspecified color spaces to PASS_THROUGH to pass
// android.media.codec.cts.DecodeEditEncodeTest and
diff --git a/host/commands/process_sandboxer/main.cpp b/host/commands/process_sandboxer/main.cpp
index 3c5af47d5..2ddcfb5f3 100644
--- a/host/commands/process_sandboxer/main.cpp
+++ b/host/commands/process_sandboxer/main.cpp
@@ -24,6 +24,7 @@
#include "absl/flags/parse.h"
#include "absl/log/check.h"
#include "absl/log/initialize.h"
+#include "absl/strings/numbers.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include "sandboxed_api/sandbox2/executor.h"
diff --git a/host/frontend/webrtc/audio_handler.cpp b/host/frontend/webrtc/audio_handler.cpp
index 52a2294d7..be15ed7c2 100644
--- a/host/frontend/webrtc/audio_handler.cpp
+++ b/host/frontend/webrtc/audio_handler.cpp
@@ -443,7 +443,7 @@ void AudioHandler::OnPlaybackBuffer(TxBuffer buffer) {
// webrtc api doesn't expect volatile memory. This should be safe though
// because webrtc will use the contents of the buffer before returning
// and only then we release it.
- auto audio_frame_buffer = std::make_shared<CvdAudioFrameBuffer>(
+ CvdAudioFrameBuffer audio_frame_buffer(
const_cast<const uint8_t*>(&buffer.get()[pos]),
stream_desc.bits_per_sample, stream_desc.sample_rate,
stream_desc.channels, frames);
@@ -453,9 +453,9 @@ void AudioHandler::OnPlaybackBuffer(TxBuffer buffer) {
pos += holding_buffer.Add(buffer.get() + pos, buffer.len() - pos);
if (holding_buffer.full()) {
auto buffer_ptr = const_cast<const uint8_t*>(holding_buffer.data());
- auto audio_frame_buffer = std::make_shared<CvdAudioFrameBuffer>(
- buffer_ptr, stream_desc.bits_per_sample,
- stream_desc.sample_rate, stream_desc.channels, frames);
+ CvdAudioFrameBuffer audio_frame_buffer(
+ buffer_ptr, stream_desc.bits_per_sample, stream_desc.sample_rate,
+ stream_desc.channels, frames);
audio_sink_->OnFrame(audio_frame_buffer, base_time);
holding_buffer.count = 0;
}
diff --git a/host/frontend/webrtc/libdevice/audio_sink.h b/host/frontend/webrtc/libdevice/audio_sink.h
index 1baa88115..614aada91 100644
--- a/host/frontend/webrtc/libdevice/audio_sink.h
+++ b/host/frontend/webrtc/libdevice/audio_sink.h
@@ -26,7 +26,7 @@ namespace webrtc_streaming {
class AudioSink {
public:
virtual ~AudioSink() = default;
- virtual void OnFrame(std::shared_ptr<AudioFrameBuffer> frame,
+ virtual void OnFrame(const AudioFrameBuffer& frame,
int64_t timestamp_us) = 0;
};
diff --git a/host/frontend/webrtc/libdevice/audio_track_source_impl.cpp b/host/frontend/webrtc/libdevice/audio_track_source_impl.cpp
index 72756e195..c10e2630b 100644
--- a/host/frontend/webrtc/libdevice/audio_track_source_impl.cpp
+++ b/host/frontend/webrtc/libdevice/audio_track_source_impl.cpp
@@ -51,12 +51,12 @@ const cricket::AudioOptions AudioTrackSourceImpl::options() const {
return cricket::AudioOptions();
}
-void AudioTrackSourceImpl::OnFrame(std::shared_ptr<AudioFrameBuffer> frame,
+void AudioTrackSourceImpl::OnFrame(const AudioFrameBuffer& frame,
int64_t timestamp_ms) {
std::lock_guard<std::mutex> lock(sinks_mutex_);
for (auto sink : sinks_) {
- sink->OnData(frame->data(), frame->bits_per_sample(),
- frame->sample_rate(), frame->channels(), frame->frames(),
+ sink->OnData(frame.data(), frame.bits_per_sample(),
+ frame.sample_rate(), frame.channels(), frame.frames(),
timestamp_ms);
}
}
diff --git a/host/frontend/webrtc/libdevice/audio_track_source_impl.h b/host/frontend/webrtc/libdevice/audio_track_source_impl.h
index 53dffeacf..61f01cff4 100644
--- a/host/frontend/webrtc/libdevice/audio_track_source_impl.h
+++ b/host/frontend/webrtc/libdevice/audio_track_source_impl.h
@@ -44,7 +44,7 @@ class AudioTrackSourceImpl : public webrtc::AudioSourceInterface {
// audio network adaptation on the source is the wrong layer of abstraction).
virtual const cricket::AudioOptions options() const;
- void OnFrame(std::shared_ptr<AudioFrameBuffer> frame, int64_t timestamp_ms);
+ void OnFrame(const AudioFrameBuffer& frame, int64_t timestamp_ms);
// MediaSourceInterface implementation
SourceState state() const override;
@@ -74,7 +74,7 @@ class AudioTrackSourceImplSinkWrapper : public AudioSink {
AudioTrackSourceImplSinkWrapper(rtc::scoped_refptr<AudioTrackSourceImpl> obj)
: track_source_impl_(obj) {}
- void OnFrame(std::shared_ptr<AudioFrameBuffer> frame,
+ void OnFrame(const AudioFrameBuffer& frame,
int64_t timestamp_ms) override {
track_source_impl_->OnFrame(frame, timestamp_ms);
}