基于安卓平台的DLNA应用程序开发

 2022-01-23 08:01

论文总字数:31323字

摘 要

随着“数字家庭”概念的日益普及,如何方便快捷的共享多媒体文件成为众多电子产品消费者最为关注的问题。为解决这一迫切问题,一些主要的软硬件厂商形成联盟制定出AirPlay,DLNA,Miracast等诸多无线文件传输的行业标准。而DLNA协议得到的关注度最高,加盟成员公司数量最多,由此越来越多的数码产品开始全方位支持DLNA无线文件传输标准。

本文根据数字家庭DLNA播放系统的应用场景和协议的要求,针对支持DLNA协议的音箱,提出了一种数字家庭媒体播放系统总体方案,在UPnP协议的架构基础上,开发运行在Android智能手机平台的DMC软件系统,以实现手机客户端对多媒体音频内容提供的共享服务。DMC软件系统主要包括socket套接字通信模块、设备管理模块、播放控制模块、UI界面等模块。经测试,本文开发的播放系统性能稳定,交互界面友好,平台可扩展性强。

关键词:DLNA协议,Android,DMC软件系统

Android-based application development platform DLNA

Abstract

With the growing popularity of the concept of “digital home”, How to solve this problem of sharing multi-media files conveniently and efficiently has become the most popular problem. Some main manufacture of software and hardware the league and the AirPlay, DLNA, Miracast, which become the standard of wireless file transmission. The protocol of DLNA gets the highest attention and has most corporation, so that more and more digital products start to support the standard of DLNA wireless file transmission.

Based on the requirement of the application scenarios of digital family DLNA playing system, this thesis raised an overall scheme of digital family media playing system. In the basement of UPnP protocol, we developed a DMC software system running in the platform of Android smartphone as to realize the target that the client side can support the sharing service of the multi-media audio content. The system of DMC contains the module of communication socket, the module of device management, the module of playing controller, the user interface. The playing system has tested stable for the performance, has a friendly interface and has a strong expandability.

KEY WORDS: DLNA protocol, Android, DMC software system

目 录

摘要 I

Abstract II

第一章 绪 论 1

1.1论文研究背景 1

1.2论文的主要内容和章节安排 2

第二章 DLNA协议标准及UPnP介绍 4

2.1 DLNA协议标准 4

2.2 DLNA设备类型 5

2.3 UPnP协议介绍 6

2.4 本章小结 8

第三章 DLNA多媒体播放系统总体方案 9

3.1 DLNA多媒体播放系统的应用场景 9

3.2多媒体播放系统DMC软件的设计要求 9

3.3 DMC软件系统的设计方案 10

3.3.1 socket套接字通信模块 10

3.3.2 设备管理模块 11

3.3.3 播放控制模块 11

3.3.4 UI界面 11

3.4 本章小结 11

第四章 DMC软件系统的实现 13

4.1 软件系统的平台选择及介绍 13

4.2 DMC软件的开发流程 14

4.2.1 建立工程 14

4.2.2 导入Cling库 15

4.3 应用程序的模块具体实现 17

4.3.1 MainActivity的实现 17

4.3.2 PlayerActivity的实现: 17

4.3.3 SpeakerActivity的实现 19

4.3.4 ServerActivity的实现 19

4.3.5 ContentActivity的实现 20

4.3.6 DLNAMediaController模块实现: 21

4.3.7 DLNAMediaRenderer模块实现 22

4.3.8 DLNAMediaServer模块: 23

4.3.9 Socket类CommunicationSocket 23

4.3.10 DeviceItem类 24

4.3.11 ContentItem类 24

4.3.12 ContentDirectoryService类 25

4.4 应用程序使用的关键技术 25

4.4.1图片的异步加载与缓存 25

4.4.2多个Activity退出 27

4.5 本章小结 27

第五章 测试 29

5.1 测试环境的搭建 29

5.2 测试过程 30

5.3 本章小结 31

第六章 总结与展望 32

致 谢 33

参考文献(References) 34

  1. 绪 论

1.1论文研究背景

随着PC个人电脑、HD高清播放机、数字智能终端、智能手机等智能化数码产品以及网络通讯技术的发展,消费者对电子产品的网络化需求呼声越来越高[1]。如何将诸多设备整合实现多媒体资源共享,是目前各大IT厂商致力于解决的课题。近几年来,国内外IT厂商纷纷形成联盟,以期制定出整个行业普遍遵循的无线传输标准。截止目前,在全球范围内占主导地位的无线标准主要有三类:Airplay协议,DLNA协议以及Miracast。

Airplay协议最初由苹果公司在2010年11月发布的iTunes 10.1中引入,可将iTunes中的所有音乐都无线同步到音箱,扬声器底座和立体声系统[2]。该协议以组播mDNS(Multicast Domain Name Server)协议和DNS- SD服务发现(DNS Service Discovery)协议为基础,是旨在苹果产品之间传输媒体流信息的一组协议[3]。该协议可实现将苹果公司iphone,ipod,ipad等ios终端设备上的图片、音频、视频等多媒体文件推送到Apple TV播放从而实现资源共享。就目前而言,该解决方案只适用于认证过的苹果设备以及苹果公司授权的合作伙伴的设备,对硬件设备和软件操作系统具有排他性。Miracast协议是由Wi-Fi联盟于2012年所制定的以Wi-Fi直连为基础的无线显示标准,支持此标准的设备可通过无线方式共享多媒体资源[4]

剩余内容已隐藏,请支付后下载全文,论文总字数:31323字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;