Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AbemaTVを支えるアプリの優しさ / abematv_devcon_2017
Search
Masaki Ogata
October 21, 2017
Technology
3
6.4k
AbemaTVを支えるアプリの優しさ / abematv_devcon_2017
ネットワーク帯域などの限られたシステムリソースを節約するために、Androidアプリで取り組んでいる優しさをいくつか紹介します。
Masaki Ogata
October 21, 2017
Tweet
Share
More Decks by Masaki Ogata
See All by Masaki Ogata
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
170
Architecture Components - Lifecycle library
ogaclejapan
3
2.3k
How to keep data between orientation changes
ogaclejapan
7
2.5k
Your app name
ogaclejapan
1
2.8k
Flux de Relax :)
ogaclejapan
13
61k
Dagger2 has been released!
ogaclejapan
3
3.2k
Other Decks in Technology
See All in Technology
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
160
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
820
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
290
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
540
podman_update_2024-12
orimanabu
1
280
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
160
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
390
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Building Adaptive Systems
keathley
38
2.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
We Have a Design System, Now What?
morganepeng
51
7.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
4 Signs Your Business is Dying
shpigford
181
21k
Done Done
chrislema
181
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Transcript
"CFNB57Λࢧ͑Δ ΞϓϦͷ༏͠͞
.BTBLJ0HBUB "OESPJE&OHJOFFS"CFNB57 *OD IUUQTHJUIVCDPNPHBDMFKBQBO !PHBDMFKBQBO
༏͠͞ͱʁ
Զࢯɿʮ͍ͨͩ·ʔʯ Շࢯɿʮ͓ؼΓʔɺ͝൧࡞ͬͯ͋ΔΑɻʯ ԶࢯɿʢʹҰͷحʜʣ༏͠͞ʂʂ
lࢥ͍Γ͕͋ͬͯz ग़య.BDࣙॻΞϓϦεʔύʔେࣙྛ
ΞϓϦͷ༏͠͞ͱ
ωοτϫʔΫ௨৴Λ͍ͩ͡ʹ ΞϓϦͷͤ͘͞ΜGPS6TFS όοςϦʔΛ͔ͭ͏ͳ ΨϯΨϯ͍͜͏ͥ Ξχϝʔγϣϯͤ͞Ζ
6*ʗ69Λ͍ͩ͡ʹ ΞϓϦͷͤ͘͞ΜGPS4ZTUFN ωοτϫʔΫଳҬΛ͏ͳ Ωϟογϡ͠Α͏ͥ ίετͰӡ༻ͤ͞Ζ
lωοτϫʔΫ௨৴ྔΛ͑Δz "CFNB57ΞϓϦͷ༏͠͞
"CFNB57Λࢧ͑Δ ΞϓϦͷ༏͠͞ ʙ"OESPJEΞϓϦͷऔΓΈʙ
͕ɺɺ
݄ɻ ⚡࣌ؒੜ์ૹಛ൪ܾఆ⚡
ෛՙରࡦΛਐΊͨ݁Ռɺ
༏͠͞ʹෆඋ͕͋Γ·ͨ͠
"CFNB57Λࢧ͑Δ ΞϓϦͷ༏͠͞
"CFNB57Λࢧ͑Δ ΞϓϦͷ༏͠͞ XJUI
ϓϨΠϦετऔಘ͠ա͗
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT UT
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT UT UT
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT UT UT UT
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT UT UT UT
)-4ʢ)551-JWF4USFBNJOHʣ QMBZMJTU@MJWFNV &95.6 &9597&34*0/ &9595"3(&5%63"5*0/ &959.&%*"4&26&/$& &95*/' UT &95*/'
UT &95*/' UT UT UT UT UT
)-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
)-4"EB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@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV &959ʜ #"/%8*%5) QMBZMJTU@MJWFNV NV Q NV Q Y Q 'VMM)% Y , ഒͷ௨৴ྔʜ
)-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
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ ͍͔ͭ͘ͷ݅ΛΈ߹ΘͤͯϏοτϨʔτΛಈతʹมߋ͍ͯ͠Δɻ ը࣭ઃఆ ௨৴ճઢ ը໘෯ ࣗಈ ࠷ߴը࣭ ߴը࣭ ʜ 8*'*
.PCJMF ʜ 8JOEPX෯ 7JFX෯ ʜ 04WFS YPSIJHIFS Y ʜ
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ʣ ˞αϯϓϧίʔυͰ͢
"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(); } ˞αϯϓϧίʔυͰ͢
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q NV
UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NBY#JUSBUFQ NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NBY#JUSBUFQ NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NBY#JUSBUFQ NV UT
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NBY#JUSBUFQ NV UT Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 8*'* QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
"CFNB57ΞϓϦͷϏοτϨʔτ੍ޚʢ"OESPJEʣ VideoBitrateAdjuster PlayerBitrateChanger LimitedBandwidthMeter ExoPlayer "650 .0#*-& QY Q CQT
NBY#JUSBUFQ NV UT Q Q
ͯ͢௨৴ྔΛ͑ΔͨΊ
·ͱΊ
·ͱΊ wϓϨΠϦετऔಘ͠ա͗ ࠷৽ͷ&YP1MBZFSʢSʣΛར༻͢ΕղফͰ͖Δɻ wը໘ʹ࠷దͳϏοτϨʔτ੍ޚ ଳҬ্ݶΛઃఆ͢Δ͜ͱͰແବͳ௨৴ྔΛ͑Δ͜ͱ͕Ͱ͖Δɻ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
8F`SFIJSJOH IUUQTBCFNBHO[SBT