Skip to content

Fix Android tools for m137 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions build/patches/fix_mocks.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
diff --git a/modules/audio_device/include/mock_audio_device.h b/modules/audio_device/include/mock_audio_device.h
index 8483aa3da8..f66cdca0ba 100644
index 191caf604f..f16b4d9c79 100644
--- a/modules/audio_device/include/mock_audio_device.h
+++ b/modules/audio_device/include/mock_audio_device.h
@@ -149,6 +149,7 @@ class MockAudioDeviceModule : public AudioDeviceModule {
(AudioParameters * params),
(const, override));
#endif // WEBRTC_IOS
@@ -138,6 +138,8 @@ class MockAudioDeviceModule : public AudioDeviceModule {
MOCK_METHOD(int32_t, EnableBuiltInAGC, (bool enable), (override));
MOCK_METHOD(int32_t, EnableBuiltInNS, (bool enable), (override));
MOCK_METHOD(int32_t, GetPlayoutUnderrunCount, (), (const, override));
+ MOCK_METHOD(std::optional<Stats>, GetStats, (), (const, override));
+ MOCK_METHOD(int32_t, SetAudioDeviceSink, (AudioDeviceSink* sink), (const, override));
};
} // namespace test
} // namespace webrtc
#if defined(WEBRTC_IOS)
MOCK_METHOD(int,
GetPlayoutAudioParameters,
diff --git a/pc/test/fake_audio_capture_module.h b/pc/test/fake_audio_capture_module.h
index c04373cdfd..ab6ff3492a 100644
index b5b1574818..084d02caed 100644
--- a/pc/test/fake_audio_capture_module.h
+++ b/pc/test/fake_audio_capture_module.h
@@ -137,6 +137,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule {
@@ -135,6 +135,8 @@ class FakeAudioCaptureModule : public webrtc::AudioDeviceModule {

int32_t GetPlayoutUnderrunCount() const override { return -1; }

+ int32_t SetAudioDeviceSink(webrtc::AudioDeviceSink* sink) const override { return 0; }
+
absl::optional<webrtc::AudioDeviceModule::Stats> GetStats() const override {
std::optional<webrtc::AudioDeviceModule::Stats> GetStats() const override {
return webrtc::AudioDeviceModule::Stats();
}
6 changes: 3 additions & 3 deletions build/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def build_webrtc_ios(
]
gn_gen(webrtc_src_dir, work_dir, gn_args, extra_gn_args)
if not nobuild:
cmd(['ninja', '-C', work_dir, *get_build_targets('ios')])
cmd(['autoninja', '-C', work_dir, *get_build_targets('ios')])
ar = '/usr/bin/ar'
archive_objects(ar, os.path.join(work_dir, 'obj'), os.path.join(work_dir, 'libwebrtc.a'))
if test:
Expand Down Expand Up @@ -627,7 +627,7 @@ def build_webrtc_android(
]
gn_gen(webrtc_src_dir, work_dir, gn_args, extra_gn_args)
if not nobuild:
cmd(['ninja', '-C', work_dir, *get_build_targets('android')])
cmd(['autoninja', '-C', work_dir, *get_build_targets('android')])
ar = os.path.join(webrtc_src_dir, 'third_party/llvm-build/Release+Asserts/bin/llvm-ar')
archive_objects(ar, os.path.join(work_dir, 'obj'), os.path.join(work_dir, 'libwebrtc.a'))
if test:
Expand Down Expand Up @@ -719,7 +719,7 @@ def build_webrtc(
if nobuild:
return

cmd(['ninja', '-C', webrtc_build_dir, *get_build_targets(target)])
cmd(['autoninja', '-C', webrtc_build_dir, *get_build_targets(target)])

if test:
cmd(['autoninja', '-C', webrtc_build_dir, 'rtc_unittests'])
Expand Down
Loading