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

AbemaTVを支えるアプリの優しさ / abematv_devcon_2017

Masaki Ogata
October 21, 2017

AbemaTVを支えるアプリの優しさ / abematv_devcon_2017

ネットワーク帯域などの限られたシステムリソースを節約するために、Androidアプリで取り組んでいる優しさをいくつか紹介します。

Masaki Ogata

October 21, 2017
Tweet

More Decks by Masaki Ogata

Other Decks in Technology

Transcript

  1. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV
  2. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q
  3. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q
  4. ߴϏοτϨʔτ΁੾ΓସΘΓޙ΋Q͕औಘ͞Εଓ͚͍ͯͨ NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q
  5. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q
  6. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q Q 'VMM)% Y
  7. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q Y Q 'VMM)% Y
  8. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q Y Q 'VMM)% Y , ໿ഒͷ௨৴ྔʜ
  9. )-4"EBQUJWF4USFBNJOH NBTUFS@QMBZMJTUNV &95.6 &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ

    #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q Y Q 'VMM)% Y Q )% Y
  10. public class VideoBitrateAdjuster { private final VideoBitrateTable auto = new

    AutoBitrateTable(); private final VideoBitrateTable legacy = new LegacyBitrateTable(); private final VideoBitrateTable manual = new ManualBitrateTable(); public VideoBitrate adjust(@Px int w, VideoQuality quality, NetworkState network) { if (quality == AUTO) { if (isLegacyPlatform()) { return legacy.lookup(w, quality, network); } else { return auto.lookup(w, quality, network); } } else { return manual.lookup(w, quality, network); } } "CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ ˞αϯϓϧίʔυͰ͢
  11. "CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ public class LimitedBandwidthMeter implements BandwidthMeter { ... public setMaxBitrate(long

    bitrate) { ... } public long getBitrateEstimate() { return Math.min(bitrateEstimate, maxBitrate); } ... } package com.google.android.exoplayer2.upstream; public interface BandwidthMeter { long getBitrateEstimate(); } ˞αϯϓϧίʔυͰ͢