博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
视频播放的优化与切换测试记录
阅读量:6707 次
发布时间:2019-06-25

本文共 7276 字,大约阅读时间需要 24 分钟。

hot3.png

前因:

     我想写一个视频播放的APP,遇到了几个问题就:1快进,快退的时候如何更快,更节省流量的问题;2:还有一个如何做到视频只加载一次;3:Home键中断播放再次打开如何更快的继续播放等问题。

后果:

     为此我查看了优酷,56,以及321影音的播放情况,并答应了它们运行时的各项消耗日志,跟我用开源框架写出播放器进行了比较,我几乎做了同样的操作,快进,快退,随意移动播放时间等等,发现56视频超出了我的预料,表现异常的好,借此拿出来跟大家讨论,是否能给出一个56视屏播放时候所用到得思想以及实现策略

下面是几个测试日志以及截图

指定应用的CPU内存监控情况

应用包名:,com.android.china

应用名称:321影音

应用PID:,19523

机器内存大小(MB):,1,689.18MB

机器CPU型号:, ARMv7 Processor rev 0 (v7l)

机器android系统版本:,4.2.2

手机型号:,HUAWEI P6-T00

UID:,10118

时间,应用占用内存PSS(MB),应用占用内存比(%),机器生育内存(MB),应用占用CPU率(%),CPU总使用率(%),流量(KB):

2014-04-04 11:25:36,24.29,1.44,558.46,25.92,71.09,1453

2014-04-04 11:25:41,33.00,1.95,549.09,13.43,58.36,2646

2014-04-04 11:25:46,34.77,2.06,547.25,8.36,45.55,3769

2014-04-04 11:25:51,51.60,3.05,534.20,11.19,49.18,4233

2014-04-04 11:25:56,53.85,3.19,533.08,9.38,52.18,6506

2014-04-04 11:26:02,54.01,3.20,535.67,12.98,62.86,7416

2014-04-04 11:26:07,54.18,3.21,532.15,8.23,35.52,9945

2014-04-04 11:26:12,54.29,3.21,531.25,11.25,46.67,11450

2014-04-04 11:26:17,54.44,3.22,530.91,11.78,51.52,13333

2014-04-04 11:26:22,54.65,3.24,530.37,9.97,39.38,14793

2014-04-04 11:26:28,54.84,3.25,530.51,12.74,55.92,16163

2014-04-04 11:26:33,55.16,3.27,529.11,8.99,42.85,18292

2014-04-04 11:26:38,55.37,3.28,528.67,12.26,55.37,20975

2014-04-04 11:26:43,55.59,3.29,509.11,10.79,51.68,23026

2014-04-04 11:26:49,53.13,3.15,511.59,9.35,75.49,25211

2014-04-04 11:26:54,53.16,3.15,516.36,3.53,51.88,25211

120147_83Po_203635.png

应用包名:,com.rolmex.android.rolplayer

应用名称:RolPlayer

应用PID:,20470

机器内存大小(MB):,1,689.18MB

机器CPU型号:, ARMv7 Processor rev 0 (v7l)

机器android系统版本:,4.2.2

手机型号:,HUAWEI P6-T00

UID:,10110

时间,应用占用内存PSS(MB),应用占用内存比(%),机器生育内存(MB),应用占用CPU率(%),CPU总使用率(%),流量(KB):

2014-04-04 11:27:27,31.42,1.86,474.89,13.84,50.54,31

2014-04-04 11:27:32,30.15,1.78,471.72,10.96,56.91,31

2014-04-04 11:27:37,30.26,1.79,470.36,9.41,38.51,31

2014-04-04 11:27:42,30.32,1.80,471.12,10.07,48.99,31

2014-04-04 11:27:48,48.87,2.89,453.37,7.84,49.52,2392

2014-04-04 11:27:53,51.76,3.06,446.02,12.12,67.07,4139

2014-04-04 11:27:58,52.30,3.10,446.34,14.17,54.50,5773

2014-04-04 11:28:03,49.92,2.96,449.43,12.19,61.66,6957

2014-04-04 11:28:08,50.43,2.99,444.63,13.81,52.81,8250

2014-04-04 11:28:13,51.06,3.02,444.37,12.86,47.46,9129

2014-04-04 11:28:19,51.69,3.06,440.32,10.16,47.41,9883

2014-04-04 11:28:24,52.04,3.08,440.11,11.96,49.65,10522

2014-04-04 11:28:29,52.46,3.11,440.02,16.06,57.51,11370

2014-04-04 11:28:34,52.74,3.12,436.91,8.69,36.39,11751

2014-04-04 11:28:39,53.23,3.15,425.54,12.01,61.19,12363

2014-04-04 11:28:44,53.61,3.17,428.16,11.49,55.12,13084

2014-04-04 11:28:50,53.64,3.18,431.82,12.56,56.89,13212

2014-04-04 11:28:55,53.67,3.18,442.02,12.92,57.62,13340

2014-04-04 11:29:00,53.72,3.18,437.51,6.94,18.74,13468

2014-04-04 11:29:05,53.80,3.18,435.69,12.97,36.26,13628

2014-04-04 11:29:10,49.04,2.90,453.69,15.49,44.20,13719

120148_GTma_203635.png

指定应用的CPU内存监控情况

应用包名:,com.youku.phone

应用名称:优酷

应用PID:,18070

机器内存大小(MB):,1,689.18MB

机器CPU型号:, ARMv7 Processor rev 0 (v7l)

机器android系统版本:,4.2.2

手机型号:,HUAWEI P6-T00

UID:,10138

时间,应用占用内存PSS(MB),应用占用内存比(%),机器生育内存(MB),应用占用CPU率(%),CPU总使用率(%),流量(KB):

2014-04-04 11:22:44,38.32,2.27,571.12,14.44,49.33,27

2014-04-04 11:22:49,49.44,2.93,562.70,17.85,59.39,99

2014-04-04 11:22:54,46.34,2.74,564.27,5.22,52.61,99

2014-04-04 11:22:59,49.23,2.91,564.98,5.41,32.41,109

2014-04-04 11:23:04,58.38,3.46,554.96,22.86,59.31,973

2014-04-04 11:23:10,64.96,3.85,542.30,12.36,50.58,1395

2014-04-04 11:23:15,75.75,4.48,518.93,11.59,45.92,1491

2014-04-04 11:23:20,92.52,5.48,493.89,18.81,64.66,2685

2014-04-04 11:23:25,93.94,5.56,492.57,17.15,49.81,3861

2014-04-04 11:23:30,88.52,5.24,505.85,13.33,46.78,4350

2014-04-04 11:23:35,82.32,4.87,515.14,7.93,53.74,4433

2014-04-04 11:23:41,90.67,5.37,500.58,11.04,39.80,5083

2014-04-04 11:23:46,95.22,5.64,493.45,13.51,53.63,5725

2014-04-04 11:23:51,94.05,5.57,495.05,12.28,56.82,6123

2014-04-04 11:23:56,108.00,6.39,484.68,11.86,38.52,6321

2014-04-04 11:24:01,115.18,6.82,470.41,15.79,50.63,6833

2014-04-04 11:24:06,120.09,7.11,464.73,13.10,49.90,7071

2014-04-04 11:24:12,120.21,7.12,473.17,14.03,53.24,7072

2014-04-04 11:24:17,123.25,7.30,454.29,15.85,48.95,9664

2014-04-04 11:24:22,120.59,7.14,456.04,28.85,66.60,12457

2014-04-04 11:24:27,121.39,7.19,452.71,14.60,49.59,12735

2014-04-04 11:24:32,122.78,7.27,449.92,17.45,54.47,13599

2014-04-04 11:24:38,123.58,7.32,446.69,19.18,56.06,14392

2014-04-04 11:24:43,123.65,7.32,446.61,15.99,51.93,14692

2014-04-04 11:24:48,123.79,7.33,445.80,10.00,45.35,14986

2014-04-04 11:24:53,124.86,7.39,443.32,18.03,56.39,16183

2014-04-04 11:24:59,124.64,7.38,442.50,18.06,60.25,17402

2014-04-04 11:25:04,119.85,7.10,474.79,13.12,51.44,17720

2014-04-04 11:25:09,124.86,7.39,456.52,15.07,64.05,19580

2014-04-04 11:25:14,125.32,7.42,428.92,13.80,50.22,22310

2014-04-04 11:25:20,124.43,7.37,451.03,10.93,65.65,23011

120149_irNZ_203635.png

指定应用的CPU内存监控情况

应用包名:,com.Android56

应用名称:56视频

应用PID:,15063

机器内存大小(MB):,1,689.18MB

机器CPU型号:, ARMv7 Processor rev 0 (v7l)

机器android系统版本:,4.2.2

手机型号:,HUAWEI P6-T00

UID:,10108

时间,应用占用内存PSS(MB),应用占用内存比(%),机器生育内存(MB),应用占用CPU率(%),CPU总使用率(%),流量(KB):

2014-04-04 11:18:14,61.46,3.64,742.31,13.47,58.80,13

2014-04-04 11:18:19,64.18,3.80,733.48,6.30,46.67,13

2014-04-04 11:18:24,62.03,3.67,734.39,29.28,60.85,13

2014-04-04 11:18:29,65.37,3.87,729.37,29.53,70.13,13

2014-04-04 11:18:34,58.83,3.48,734.09,17.75,63.81,13

2014-04-04 11:18:40,62.62,3.71,731.62,19.94,61.48,13

2014-04-04 11:18:45,62.62,3.71,725.04,3.89,39.29,13

2014-04-04 11:18:50,68.69,4.07,717.23,12.01,52.71,394

2014-04-04 11:18:55,68.67,4.07,712.55,8.28,58.23,394

2014-04-04 11:19:00,62.29,3.69,721.31,6.22,62.56,406

2014-04-04 11:19:05,55.27,3.27,732.48,19.75,71.01,494

2014-04-04 11:19:11,58.46,3.46,726.55,10.43,35.48,494

2014-04-04 11:19:16,58.57,3.47,723.28,14.89,58.35,494

2014-04-04 11:19:21,58.57,3.47,722.06,15.89,54.90,494

2014-04-04 11:19:26,58.57,3.47,715.50,19.06,66.99,494

2014-04-04 11:19:31,58.67,3.47,711.56,1.61,58.61,494

2014-04-04 11:19:36,58.70,3.47,707.75,0.53,36.00,494

2014-04-04 11:19:42,58.72,3.48,706.59,1.30,51.30,494

2014-04-04 11:19:47,58.75,3.48,706.46,2.39,44.54,494

2014-04-04 11:19:52,58.97,3.49,704.41,8.17,52.95,494

2014-04-04 11:19:57,58.99,3.49,702.49,3.18,54.41,494

2014-04-04 11:20:02,59.15,3.50,702.52,5.02,24.71,494

2014-04-04 11:20:07,59.16,3.50,700.56,2.41,47.98,494

2014-04-04 11:20:13,59.35,3.51,699.67,13.13,70.25,494

2014-04-04 11:20:18,59.42,3.52,702.00,5.89,63.08,494

2014-04-04 11:20:23,59.45,3.52,702.32,4.45,60.69,494

2014-04-04 11:20:28,59.55,3.53,701.48,4.49,60.26,494

2014-04-04 11:20:33,59.61,3.53,698.12,3.44,66.71,494

2014-04-04 11:20:38,59.75,3.54,689.97,8.16,70.74,494

2014-04-04 11:20:43,59.88,3.54,685.29,1.39,25.86,494

2014-04-04 11:20:49,59.91,3.55,686.16,3.31,53.50,494

2014-04-04 11:20:54,59.98,3.55,681.24,6.12,70.31,494

2014-04-04 11:20:59,60.01,3.55,685.57,2.83,63.94,494

2014-04-04 11:21:04,60.10,3.56,690.70,4.46,51.45,494

2014-04-04 11:21:09,60.16,3.56,686.33,4.12,57.35,494

2014-04-04 11:21:14,60.28,3.57,685.66,7.90,59.39,494

2014-04-04 11:21:19,60.30,3.57,687.45,1.63,51.53,494

2014-04-04 11:21:25,60.32,3.57,654.63,1.10,62.17,494

2014-04-04 11:21:30,63.03,3.73,649.36,5.75,41.90,501

2014-04-04 11:21:35,62.59,3.71,646.63,1.80,69.18,501

2014-04-04 11:21:41,62.65,3.71,648.76,2.48,62.96,501

2014-04-04 11:21:46,70.08,4.15,639.98,11.96,54.97,513

120149_nOoK_203635.png

转载于:https://my.oschina.net/antkingwei/blog/217689

你可能感兴趣的文章
混合云使用不能盲目:学习最佳实践是王道
查看>>
通过实例模拟ASP.NET MVC的Model绑定的机制:集合+字典
查看>>
调度器之 Kubernetes
查看>>
PDMS RVM TO 3DXML - RvmTranslator6.0
查看>>
《数学与泛型编程:高效编程的奥秘》一3.2 筛选素数
查看>>
不想被攻击,5款便携式反病毒和反恶意软件帮到你
查看>>
【投资人不懂AI】为什么说AI创业不是4、5个人的团队就能搞定的事
查看>>
ARM公司收购Apical,欲致力推进“目联网”技术
查看>>
《Java核心技术 卷Ⅱ 高级特性(原书第10版)》一3.3.2 XML Schema
查看>>
《机器人自动化:建模、仿真与控制》——1.5 习题解答
查看>>
积水成渊——数据中心用水效率分析
查看>>
重新定义云数据库 阿里云POLARDB 9月21日发布
查看>>
物联网安全威胁剧增 如何拓展移动化能力
查看>>
工业物联网:创造价值 转换业务模式
查看>>
思科若要加入超融合大战:需启用你的现金
查看>>
程序员如何既不耽误工作又有时间干业余项目?
查看>>
王胤:我是怎么把体温计变成助孕计的
查看>>
Linux下如何定制SSH来简化远程访问
查看>>
空与非空 EMPTY_LOB和NULL的区别
查看>>
未来的主角是公有云还是私有云?哪些云安全企业能在行业洗牌中脱颖而出
查看>>