Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ミラティブとWebRTC - WebRTC framework の中身を覗いてみよう / WebRTC framework AudioUnit Processing

ミラティブとWebRTC - WebRTC framework の中身を覗いてみよう / WebRTC framework AudioUnit Processing

WebRTC framework の中身がわからなくて近付くのが怖かったけど、少しだけわかりあえた話

naru-jpn

July 29, 2021
Tweet

More Decks by naru-jpn

Other Decks in Programming

Transcript

  1. ϛϥςΟϒͱWebRTC
    WebRTC framework ͷத਎Λ೷͍ͯΈΑ͏
    Naruki Chigira
    @_naru_jpn / Lib arXiv / ໌೔ϫΫνϯ2ճ໨

    View full-size slide

  2. WebRTC framework

    View full-size slide

  3. https://webrtc.org

    View full-size slide

  4. WebRTC ͸ϛϥςΟϒͷͲ͜Ͱ࢖ΘΕ͍ͯΔͷ͔

    View full-size slide

  5. ίϥϘ௨࿩
    ഑৴ऀ ࢹௌऀ
    ࢹௌऀͱձ࿩Λ͠ͳ͕Β഑৴͕Ͱ͖ΔΑ

    View full-size slide

  6. ίϥϘ഑৴
    ഑৴ऀ A ഑৴ऀ B
    ഑৴ऀಉ࢜Ͱձ࿩Λ͠ͳ͕Β഑৴͕Ͱ͖ΔΑ

    View full-size slide

  7. NEW! ίϥϘϚονϯά
    ഑৴ऀ A ഑৴ऀ B
    ಉ͡ήʔϜͰ഑৴͍ͯ͠Δਓಉ࢜ͰϚονϯά͢ΔʢҰ෦ެ։

    View full-size slide

  8. ։ൃ͢ΔதͰͪΐͬͱࠔͬͨ͜ͱ͕͋ͬͨ

    View full-size slide

  9. ഑৴ऀ ࢹௌऀ
    WebRTC ͷ઀ଓ࣌ʹΞϓϦ͕όοΫάϥ΢ϯυঢ়ଶʹ͋ΔͱɺԻ੠ͷೖग़ྗ͕Ͱ͖ͳ͘ͳͬͯ͠·͏
    ϛϥςΟϒΞϓϦ͸
    όοΫάϥ΢ϯυͰ
    ىಈத

    View full-size slide

  10. όοΫάϥ΢ϯυͰ઀ଓ଴ػঢ়ଶΛ
    Ωϟϯηϧ͢ΔͳͲͯ͠ɺ੍ޚ͸Ͱ͖ͨ

    View full-size slide

  11. ػೳ্͸੍ޚͰ͖͍ͯΔ͚Ͳɺ
    Ͳ͏ͯͦ͠͏ͳ͍ͬͯΔͷ͔ཧղͰ͖͍ͯͳ͍ͷͰ৮Δͷ͕ා͍!

    View full-size slide

  12. WebRTC framework ͷத਎Λ೷͍ͯΈΑ͏!

    View full-size slide

  13. https://webrtc.googlesource.com/src/

    View full-size slide

  14. https://webrtc.googlesource.com/src/

    View full-size slide

  15. https://webrtc.googlesource.com/src/+/refs/heads/main

    View full-size slide

  16. Ի੠ͷ੍ޚΛ͍ͯ͠Δͱ͜ΖΛ೷͍ͯΈΑ͏!

    View full-size slide

  17. https://webrtc.googlesource.com/src/+/refs/heads/main/sdk/objc/
    This directory contains the Obj-C SDK for WebRTC. This includes wrappers for the C++
    PeerConnection API and some platform speci
    fi
    c components for iOS and macOS.

    View full-size slide

  18. https://webrtc.googlesource.com/src/+/refs/heads/main/sdk/objc/native/src/audio/
    .mm ͍ͬͯ͏ͷ͸ Objective-C++ Λද֦͢ுࢠͩΑ

    View full-size slide

  19. https://webrtc.googlesource.com/src/+/refs/heads/main/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
    AudioOutputUnitStart ΛݺͿͱԻ੠ͷೖग़ྗॲཧ͕͸͡·ΔΑ
    voice_processing_audio_unit.mm

    View full-size slide

  20. https://developer.apple.com/documentation/audiotoolbox/1439763-audiooutputunitstart
    AudioOutputUnitStart ΛݺͿͱԻ੠ͷೖग़ྗॲཧ͕͸͡·ΔΑ

    View full-size slide

  21. AudioOutputUnitStart ͷৼΔ෣͍Λௐ΂ͯΈΑ͏

    View full-size slide

  22. https://stackover
    fl
    ow.com/questions/61312360/auaudiounit-cant-play-audio-in-the-background-error-code-561145187

    View full-size slide

  23. https://developer.apple.com/documentation/avfaudio/avaudiosession/errorcode/cannotstartrecording

    View full-size slide

  24. AudioOutputUnitStart ͕όοΫάϥ΢ϯυͰࣦഊ͢
    Δͷ͸ɺOSͷ࢓༷తʹ΋ͦ͏ͳ͍ͬͯΔΒ͍͠!

    View full-size slide

  25. AudioOutputUnitStart ͕͍ͭݺ͹Ε͍ͯΔͷ͔΋֬ೝ͓ͯ͜͠͏

    View full-size slide

  26. https://webrtc.googlesource.com/src/+/refs/heads/main/audio/audio_state.cc
    WebRTC ͷ઀ଓཱ͕֬ͨ͠ޙʹ AddReceivingStream ͕ݺ͹Εɺ

    StartPlayout ͷதͰ AudioOutputUnitStart ͕ݺ͹ΕΔ

    View full-size slide

  27. ΞϓϦ͕όοΫάϥ΢ϯυঢ়ଶͩͱɺԻ੠ͷೖग़ྗॲ
    ཧͷ։࢝ʹࣦഊͯ͠͠·͏͜ͱ͕ཧղͰ͖ͨ!

    View full-size slide

  28. ·ͱΊ
    όοΫάϥ΢ϯυͰԻ੠ͷ΍ΓͱΓ͕Ͱ͖ͳ͘ͳΔݱ৅͕ɺί
    ʔυϨϕϧͰཧղͰ͖ΔΑ͏ʹͳͬͨ
    ɾݪҼ͕Θ͔ͬͯɺͳͥͳͷ͔Λઆ໌Ͱ͖ΔΑ͏ʹͳͬͨ
    ɾWebRTC framework ͱগ͚ͩ͠஥ྑ͘ͳΕͨ

    View full-size slide

  29. ͋Γ͕ͱ͏͍͟͝·ͨ͠!
    WE ARE HIRING! ੵۃ࠾༻தͩΑ!

    View full-size slide