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
Architecture Components - Lifecycle library
ogaclejapan
2
2.2k
How to keep data between orientation changes
ogaclejapan
7
2.4k
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
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
TypeScript、上達の瞬間
sadnessojisan
46
13k
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Lexical Analysis
shigashiyama
1
150
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
190
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Scaling GitHub
holman
458
140k
Git: the NoSQL Database
bkeepers
PRO
427
64k
It's Worth the Effort
3n
183
27k
Faster Mobile Websites
deanohume
305
30k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Facilitating Awesome Meetings
lara
50
6.1k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Code Review Best Practice
trishagee
64
17k
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"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
)-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
֤σόΠεͷϓϨΠϦετऔಘִؒ ϥΠϒ৴Ͱ54ϑΝΠϧͷηάϝϯτִ͕ؒඵͷ߹ɻ 1$ 8&# J04 "OESPJE
֤σόΠεͷϓϨΠϦετऔಘִؒ ϥΠϒ৴Ͱ54ϑΝΠϧͷηάϝϯτִ͕ؒඵͷ߹ɻ 1$ 8&# J04 "OESPJE ඵִؒ ඵִؒ
֤σόΠεͷϓϨΠϦετऔಘִؒ ϥΠϒ৴Ͱ54ϑΝΠϧͷηάϝϯτִ͕ؒඵͷ߹ɻ 1$ 8&# J04 "OESPJE ඵִؒ ඵִؒ ඵִؒ
ŧŖƃ
݁ɺ&YP1MBZFSͷෆ۩߹Ͱͨ͠ɻɻ IUUQTHJUIVCDPNHPPHMF &YP1MBZFSQVMM
ߴϏοτϨʔτΓସΘΓޙ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
͜ΕͰղফ
ը໘ʹ࠷దͳϏοτϨʔτ੍ޚ
"CFNB57։ہॳ݄ ΞϓϦԣը໘ݻఆͰࢹௌ໘ͷը໘αΠζύλʔϯͷΈɻ
"CFNB57։ہप݄ ΞϓϦैདྷͷԣը໘ʹՃ͑ɺॎը໘ͰͷࢹௌʹରԠɻ
"CFNB57։ہप݄ ͞Β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MBZMJTU@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