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.3k
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.1k
How to keep data between orientation changes
ogaclejapan
7
2.4k
Your app name
ogaclejapan
1
2.8k
Flux de Relax :)
ogaclejapan
13
60k
Dagger2 has been released!
ogaclejapan
3
3.1k
Other Decks in Technology
See All in Technology
Evolving DevOps Teams and Flexible Organizational Culture
kakehashi
1
250
DroidKaigi 2024 たすけて!ViewModel
mhidaka
5
510
デジタル化・DX推進あるある
y150saya
0
240
FastConnect の冗長性
ocise
0
7.2k
Datadog を使ったプロダクトとクラウドの セキュリティモニタリング
mrtc0
0
620
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
0
760
AI活用したくてもできなかった不動産SaaSの今とこれから
nealle
0
220
エンジニア向け会社紹介資料
caddi_eng
15
250k
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
290
株式会社M2X エンジニアチーム紹介資料
m2xsoftware
0
580
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
15
40k
なぜクラウドサービスで Web コンソールを提供するのか
shuta13
4
2k
Featured
See All Featured
Clear Off the Table
cherdarchuk
91
320k
The Mythical Team-Month
searls
218
43k
Statistics for Hackers
jakevdp
793
220k
Ruby is Unlike a Banana
tanoku
96
11k
Visualization
eitanlees
142
15k
Design by the Numbers
sachag
277
19k
What's in a price? How to price your products and services
michaelherold
242
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
34
1.7k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
KATA
mclloyd
27
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
36
1.9k
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։ہप݄ ͞Βʹɺ"OESPJE৽ػೳͷϚϧνΟϯυͰࢹௌ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U@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