-
Notifications
You must be signed in to change notification settings - Fork 2
Enable remote audio recording #3
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
Enable remote audio recording #3
Conversation
|
Local audio recording쪽도 interface가 없었나요? |
WebRTC내에서는 인터페이스가 따로 없었습니당. iOS에서 제공하는 시스템오디오를 녹음하는 거는 있었는데, remote랑 통일성있게 WebRTC stream으로 녹화하는게 좋을것같아서, local쪽도 interface를 추가하였습니다. |
|
엇 그랬군요 Android에는 local쪽 interface만 있어서 remote쪽 비슷하게 추가했습니다. JavaAudioDevice 쪽에 추가하고 PeerConnectionFactory builder에 set한 모양이라서 거의 비슷한 모양새일 것 같습니다. LGTM! GOGO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG™️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Merge note: Production code is a plain merge, unit tests needed some back-porting due to refactoring of test harness in tot. TaskQueuePacedSender::MaybeUpdateStats() is intended to be called when packets are sent or by a sequence of "scheduled" calls. There should only be one scheduled call in flight at a time - and that one reschedules itself if needed when it runs. A bug however caused the "schedules task in flight" flag to incorrectly be set to false, leading to more and more schedules tasks being alive - eating CPU cycles. This CL fixes that and also makes sure the queue time properly goes down to zero before the next idle interval check, even if there are no more packets to send. (cherry picked from commit 998524a) Bug: webrtc:10809 Change-Id: I4e13fcf95619a43dcaf0ed38bce9684a5b0d8d5e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176330 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Original-Commit-Position: refs/heads/master@{#31390} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176409 Cr-Commit-Position: refs/branch-heads/4147@{#3} Cr-Branched-From: 2b7d969-refs/heads/master@{#31262}
This reverts commit 76d3e7a. Reason for revert: Causes multiple Chromium WPT tests to crash, preventing rolls. Sample failed run: https://ci.chromium.org/p/chromium/builders/try/win10_chromium_x64_rel_ng/685757? Sample stack trace: #0 0x7ff8623fbde9 base::debug::CollectStackTrace() STDERR: #1 0x7ff862311ca3 [2665012:17:1009/162250.249660:WARNING:timestamp_aligner.cc(131)] too short translated timestamp interval: system time (us) = 3042652370324, interval (us) = 834 STDERR: base::debug::StackTrace::StackTrace() STDERR: #2 0x7ff8623fb93b base::debug::(anonymous namespace)::StackDumpSignalHandler() STDERR: #3 0x7ff857a70140 [2665012:17:1009/162250.249947:WARNING:timestamp_aligner.cc(131)] too short translated timestamp interval: system time (us) = 3042652370634, interval (us) = 742 STDERR: (/lib/x86_64-linux-gnu/libpthread-2.31.so+0x1413f) STDERR: #4 0x7ff85778edb1 gsignal STDERR: #5 0x7ff857778537 abort STDERR: #6 0x7ff855d5eee2 [2665012:17:1009/162250.250342:WARNING:timestamp_aligner.cc(131)] too short translated timestamp interval: system time (us) = 3042652371030, interval (us) = 706 STDERR: [2665012:17:1009/162250.250514:WARNING:timestamp_aligner.cc(131)] too short translated timestamp interval: system time (us) = 3042652371204, interval (us) = 963 STDERR: rtc::webrtc_checks_impl::FatalLog() STDERR: #7 0x7ff855f14e62 webrtc::LibvpxVp8Encoder::PrepareRawImagesForEncoding() STDERR: #8 0x7ff855f14412 webrtc::LibvpxVp8Encoder::Encode() STDERR: #9 0x7ff855bae765 webrtc::SimulcastEncoderAdapter::Encode() STDERR: #10 0x7ff85607d598 webrtc::VideoStreamEncoder::EncodeVideoFrame() STDERR: #11 0x7ff85607c60d webrtc::VideoStreamEncoder::MaybeEncodeVideoFrame() STDERR: #12 0x7ff8560816f5 webrtc::webrtc_new_closure_impl::ClosureTask<>::Run() STDERR: #13 0x7ff855b352b5 (anonymous namespace)::WebrtcTaskQueue::RunTask() STDERR: #14 0x7ff855b3531e base::internal::Invoker<>::RunOnce() STDERR: #15 0x7ff86239785b base::TaskAnnotator::RunTask() STDERR: #16 0x7ff8623c8557 base::internal::TaskTracker::RunSkipOnShutdown() STDERR: #17 0x7ff8623c7d92 base::internal::TaskTracker::RunTask() STDERR: #18 0x7ff862415a06 base::internal::TaskTrackerPosix::RunTask() STDERR: #19 0x7ff8623c75e6 base::internal::TaskTracker::RunAndPopNextTask() STDERR: #20 0x7ff8623d3a8d base::internal::WorkerThread::RunWorker() STDERR: #21 0x7ff8623d368d base::internal::WorkerThread::RunPooledWorker() STDERR: #22 0x7ff862416509 base::(anonymous namespace)::ThreadFunc() STDERR: #23 0x7ff857a64ea7 start_thread Original change's description: > NV12 support for VP8 simulcast > > Tested using video_loopback with generated NV12 frames. > > Bug: webrtc:11635, webrtc:11975 > Change-Id: I14b2d663c55a83d80e48e226fcf706cb18903193 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186722 > Commit-Queue: Evan Shrubsole <eshr@google.com> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32325} TBR=ilnik@webrtc.org,eshr@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:11635 Bug: webrtc:11975 Change-Id: I61c8aed1270bc9c2f7f0577fa5ca717a325f548a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187484 Reviewed-by: Guido Urdaneta <guidou@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Guido Urdaneta <guidou@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32369}
This reverts commit c5f7108. Reason for revert: Causes Chromium WPT Tests to fail, preventing rolls. Sample failed run: https://ci.chromium.org/p/chromium/builders/try/linux-rel/511995? Sample logs: STDERR: # Fatal error in: ../../third_party/webrtc/pc/peer_connection.cc, line 575 STDERR: # last system error: 0 STDERR: # Check failed: (signaling_thread())->IsCurrent() STDERR: # Received signal 6 STDERR: #0 0x7f81d39e3de9 base::debug::CollectStackTrace() STDERR: #1 0x7f81d38f9ca3 base::debug::StackTrace::StackTrace() STDERR: #2 0x7f81d39e393b base::debug::(anonymous namespace)::StackDumpSignalHandler() STDERR: #3 0x7f81c9054140 (/lib/x86_64-linux-gnu/libpthread-2.31.so+0x1413f) STDERR: #4 0x7f81c8d72db1 gsignal STDERR: #5 0x7f81c8d5c537 abort STDERR: #6 0x7f81c7344032 rtc::webrtc_checks_impl::FatalLog() STDERR: #7 0x7f81c722e5c0 webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #8 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #9 0x7f81c72d6e8e webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #10 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #11 0x7f81c71c6df3 webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #12 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #13 0x7f81c73135bc rtc::OpenSSLStreamAdapter::ContinueSSL() STDERR: #14 0x7f81c7312fd4 rtc::OpenSSLStreamAdapter::OnEvent() STDERR: #15 0x7f81c71c30d9 cricket::StreamInterfaceChannel::OnPacketReceived() STDERR: #16 0x7f81c71c640a cricket::DtlsTransport::OnReadPacket() STDERR: #17 0x7f81c71cad61 cricket::P2PTransportChannel::OnReadPacket() STDERR: #18 0x7f81c71bc90f cricket::Connection::OnReadPacket() STDERR: #19 0x7f81c71e6255 cricket::UDPPort::HandleIncomingPacket() STDERR: #20 0x7f81cd1f1bff blink::(anonymous namespace)::IpcPacketSocket::OnDataReceived() STDERR: #21 0x7f81cd1f645d blink::P2PSocketClientImpl::DataReceived() STDERR: #22 0x7f81cd50a16b network::mojom::blink::P2PSocketClientStubDispatch::Accept() STDERR: #23 0x7f81d2b4f642 mojo::InterfaceEndpointClient::HandleValidatedMessage() STDERR: #24 0x7f81d2b5304b mojo::MessageDispatcher::Accept() STDERR: #25 0x7f81d2b50bb1 mojo::InterfaceEndpointClient::HandleIncomingMessage() STDERR: #26 0x7f81d2b58a3a mojo::internal::MultiplexRouter::ProcessIncomingMessage() STDERR: #27 0x7f81d2b57f7f mojo::internal::MultiplexRouter::Accept() STDERR: #28 0x7f81d2b5304b mojo::MessageDispatcher::Accept() STDERR: #29 0x7f81d2b48851 mojo::Connector::DispatchMessage() STDERR: #30 0x7f81d2b492e7 mojo::Connector::ReadAllAvailableMessages() STDERR: #31 0x7f81d2b490a3 mojo::Connector::OnHandleReadyInternal() STDERR: #32 0x7f81d2b498f0 mojo::SimpleWatcher::DiscardReadyState() STDERR: #33 0x7f81d2d0e67a mojo::SimpleWatcher::OnHandleReady() STDERR: #34 0x7f81d2d0eb2b base::internal::Invoker<>::RunOnce() STDERR: #35 0x7f81d397f85b base::TaskAnnotator::RunTask() STDERR: #36 0x7f81d399a04c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl() STDERR: #37 0x7f81d3999c78 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() STDERR: #38 0x7f81d391fe64 base::MessagePumpDefault::Run() STDERR: #39 0x7f81d399a8dc base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() STDERR: #40 0x7f81d395ae55 base::RunLoop::Run() STDERR: #41 0x7f81d39c87f2 base::Thread::Run() Original change's description: > Reland "Replace sigslot usages with robocaller library." > > This is a reland of 40261c3 > > Note: Instead of changing the type of JsepTransportController->SignalSSLHandshakeError > added a new member with a different name and used it in webrtc code. > After this change do two more follow up CLs to completely remove the old code > from google3. > > Original change's description: > > Replace sigslot usages with robocaller library. > > > > - Replace all the top level signals from jsep_transport_controller. > > - There are still sigslot usages in this file so keep the inheritance > > and that is the reason for not having a binary size gain in this CL. > > > > Bug: webrtc:11943 > > Change-Id: I249d3b9710783aef70ba273e082ceeafe3056898 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185540 > > Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#32321} > > Bug: webrtc:11943 > Change-Id: Ia07394ee395f94836f6b576c3a97d119a7678e1a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186946 > Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32359} TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,glahiru@webrtc.org Change-Id: I6bce1775d10758ac4a9d05b855f473dd70bd9815 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:11943 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187487 Reviewed-by: Guido Urdaneta <guidou@webrtc.org> Commit-Queue: Guido Urdaneta <guidou@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32372}
Using WebRTC-VP9-PerformanceFlags and settings a multi-layer config, and then configuring the codec in non-svc mode would cause us to not set the cpu speed in libvpx. For some reason, that could trigger a crash in the encoder. This CL fixes that, and adds new test coverage for the code affected byt the trial. (cherry picked from commit 03eed7c) Bug: chromium:1167353, webrtc:11551 Change-Id: Iddb92fe03fc12bac37717908a8b5df4f3d411bf2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202761 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Original-Commit-Position: refs/heads/master@{#33051} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203521 Cr-Commit-Position: refs/branch-heads/4389@{#3} Cr-Branched-From: 7acc2d9-refs/heads/master@{#32986}
There's no change in functionality, which was verified by adding an 'else' catch-all clause in the loop with an RTC_NOTREACHED() statement. See patchset #3. This is mostly a cosmetic change that modifies the loop such that it's guaranteed that Remove() is always called for transceivers whose state is "stopped" and there's just one place where Remove() is called. Bug: none Change-Id: Iffe237bb2f08e5e6ef316a6b76c4b183df671f3b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215232 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33765}
Schedule the frames to be decoded based on the pacing delay from the last decode scheduled time. In the current implementation, multiple threads and different functions in same thread can call MaxWaitingTime(), thereby increasing the wait time each time the function is called. Instead of returning the wait time for a future frame based on the number of times the function is called, return the wait time only for the next frame to be decoded. Threads can call the function repeatedly to check the waiting time for next frame and wake up and then go back to waiting if an encoded frame is not available. (cherry picked from commit 82c2248) Change-Id: I00886c1619599f94bde5d5eb87405572e435bd73 Bug: chromium:1237402 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226502 Reviewed-by: Johannes Kron <kron@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Original-Commit-Position: refs/heads/master@{#34660} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228532 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/branch-heads/4577@{#3} Cr-Branched-From: 5196931-refs/heads/master@{#34463}
The current code assumed that chunks that were scheduled for fast retransmission would never be abandoned, as chunks marked for fast retransmission would be immediately sent after the SACK has been processed, giving no time for them to be abandoned. But fuzzers keep on fuzzing, and can craft a sequence of chunks that result in a SACK that both marks the chunks for fast retransmission and later (while processing the same SACK) abandons them. (cherry picked from commit 7726b7d) Bug: chromium:1331087 Change-Id: Id218607e18a6f3a9d6d51044dccb920e1e77372a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264960 Commit-Queue: Florent Castelli <orphis@webrtc.org> Auto-Submit: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Original-Commit-Position: refs/heads/main@{#37108} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265163 Cr-Commit-Position: refs/branch-heads/5060@{#3} Cr-Branched-From: 1389c76-refs/heads/main@{#36868}
This CL migrates unit tests to the new TaskQueueBase interface. Bug: chromium:1416199 Change-Id: Ic15c694b28eb67450ac99fdd56754de1246a4d95 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295621 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39434}
This CL migrates the task queue paced sender unit test to the new TaskQueueBase interface. Bug: chromium:1416199 Change-Id: Id0568bb9a08bf43b92e33fdf45fe75a57e5a7a27 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295722 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39436}
This CL completes migration to the new TaskQueueBase interface permitting location tracing in Chrome. Bug: chromium:1416199 Change-Id: Iff7ff5796752a1520384a3db0135a1d4b9438988 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294540 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39439}
This CL forwards repeating task client locations to the passed task queue. Bug: chromium:1416199 Change-Id: I437d596f8d327d13498b47dfc0a03812af870331 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295623 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39443}
This CL forwards TaskQueue locations to the contained task queue. Bug: chromium:1416199 Change-Id: I989ae445a67991bf5a857407135dbe8bacbd3c55 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295622 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39446}
Speculative fix. Writing the test for it is more complex. (cherry picked from commit 83894d3) Bug: chromium:1483874 Change-Id: Icfaf1524b0499c609010753e0b6f3cadbd0e98f9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321480 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Original-Commit-Position: refs/heads/main@{#40820} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322124 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/branch-heads/5993@{#3} Cr-Branched-From: 5afcec0-refs/heads/main@{#40703}
(cherry picked from commit f844699) Bug: chromium:414606466 Change-Id: I627dd5b01e157125c9811ec36086efd7e16855b1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/389920 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Sam Zackrisson <saza@webrtc.org> Auto-Submit: Andrew Grieve <agrieve@google.com> Cr-Original-Commit-Position: refs/heads/main@{#44522} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391000 Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/branch-heads/7151@{#3} Cr-Branched-From: dc428bd-refs/heads/main@{#44472}
No behavior changes. (cherry picked from commit 5ff715d) Bug: webrtc:383141571, chromium:433885045, chromium:434133034 Change-Id: Ice5f3e5cbd245ddea407248a6f29c61c646e6a72 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401740 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Guido Urdaneta <guidou@webrtc.org> Cr-Original-Commit-Position: refs/heads/main@{#45206} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402200 Cr-Commit-Position: refs/branch-heads/7258@{#3} Cr-Branched-From: 74fa937-refs/heads/main@{#44974}
(cherry picked from commit 6908505ae0eba5d530ad0bb4b37d4654a4f36c95) Fixed: chromium:450184498 Bug: chromium:448881311 Change-Id: I0f043f58bf831e6822451cac99a8972a054ffdf7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/414800 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Palak Agarwal <agpalak@google.com> Cr-Original-Commit-Position: refs/heads/main@{#45856} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/415420 Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/branch-heads/7390@{#3} Cr-Branched-From: 2f553bf-refs/heads/main@{#45520}
This PR adds an
RTCAudioSinkinterface for recording remote/local audio stream for iOS Devices.It hijacks
RTCPeerConnectionFactory, and addsAudioSourceSinkc++ interface intoAudioDeviceModuleIOSandAudioDeviceIOS.When
AudioDeviceIOS::OnGetPlayoutDatais called, respective method inRTCAudioSinkfor remote audio stream is called, andAudioDeviceIOS::OnDeliverRecordedDatacalls the respective method inRTCAudioSinkfor local audio stream.By overriding
RTCAudioSink, you can add a sink to local/remote streams of ongoing call, and use them to record into audio files.