DLNA

本文详细介绍了DLNA技术在Android平台上的实施与优化过程,包括DLNA的基本概念、认证流程、软件规范、OESF的DLNA扩展以及如何在Android应用中集成DLNA功能。此外,还提供了实现DLNA所需的关键组件、API指导和操作流程概述。
摘要由CSDN通过智能技术生成

DLNA Extention

This document describe about OESF's sample implimentation of DNLA. To support DLNA, all vendors who support DLNA functionality have to join alliance to get certification. So this implementation only provide framework to implement DLNA functionality top on Android%trade;. We fully recommend you to implement your DLNA to keep our standedized framworks and APIs to keep compatibility among all DLNA supported Android™ devices.

If you are already have knowledge about DLNA, skip the first few sections and read from this section.

What is DLNA

The Digital Living Network Alliance (DLNA) is a non-profit collaborative trade organization comprising more than 250 member companies in the mobile, consumer electronics, PC, and service provider industries. Alliance members have stated the common goal of using standards-based technology to make it easier for consumers to use, share and enjoy their digital photos, music and videos. Now More than 8,000 different devices had obtained "DLNA Certified" status, indicated by a logo on their packaging and confirming their interoperability with other devices.

Usually DNLA means specification that DLNA created industry standard for digital home appliances. This document provide OESF's DLNA extention for Android™. Next picture illustrate how DLNA works.

What is DLNA Certified Device

The DLNA Certified Device Classes are separated as follows:

  • Digital Media Server (DMS): These devices store content and make it available to networked digital media players (DMP) and digital media renderers (DMR). Some digital media servers can also help protect your content once stored. Examples include PCs and network attached storage (NAS) devices.
  • Digital Media Player (DMP): These devices find content on digital media servers (DMS) and provide playback and rendering capabilities. Examples include TVs, stereos and home theaters, wireless monitors and game consoles.
  • Digital Media Renderer (DMR): These devices play content received from a digital media controller (DMC), which will find content from a digital media server (DMS). Examples include TVs, audio/video receivers, video displays and remote speakers for music.
  • Digital Media Controller (DMC): These devices find content on digital media servers (DMS) and play it on digital media renderers (DMR). Examples include Internet tablets, Wi-Fi® enabled digital cameras and personal digital assistants (PDAs).
  • Digital Media Printer (DMPr): These devices provide printing services to the DLNA home network. Generally, digital media players (DMP) and digital media controllers (DMC) with print capability can print to DMPr. Examples include networked photo printers and networked all-in-one printers.

DLNA specification and softwre

DLNA specification is created, mainteined and published from Digital Living Network Alliance, Its only provide to alliance members. DLNA does not certify software at this time, only complete devices. The vendors of software are allowed to claim that their software is a DLNA Technology Component if the software has gone through certification testing on a device and the device has been granted DLNA Certification. DLNA Technology Components are not marketed to the consumer but only to industry.

Therefor OESF DLNA Extention is not certified product of DLNA, device vender have to get DLNA Certification by their on aim. The main purpose of our implementation of DLNA to Androd™ is to provide API guidelines and standards for Android™ application developers.

OESF DLNA Extention

OESF DLNA Extention currentry suport minimum set of functionality of DNLA standard. It consist from the follow open-spurce based software packages and libraries. We provide Java based APIs for developers to easy create your applications. Also we provide DLNA framework to Android™ framework layer and sample Digital Media Player application to perform typical media search and play. OESF DLNA Extention also include open-source based media decoders.

MiniDLNA is server software with the aim of being fully compliant with DLNA/UPnP clients.

libupnp is a portable SDK for UPnP Devices that provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification. UPnP is an architecture that enables discovery, event notification, and control of devices on a network, independent of operating system, programming language, or physical network connection. UPnP is based on common Internet standards and specifications such as TCP/IP, HTTP, and XML

libdlna aims at being the reference open-source implementation of DLNA (Digital Living Network Alliance) standards. Its primary goal is to provide DLNA support to uShare, an embedded DLNA & UPnP A/V Media Server, but it will be used to build both DLNA servers and players in the long term.

libexif is a library to read and write EXIF meta information from and to image files.

libid3tag is an ID3 tag manipulation library for MP3 audio file. MP3 is an audio-specific format that was designed by the Moving Picture Experts Group as part of its MPEG-1 standard and later extended in MPEG-2 standard.

Libogg is contains necessary functionality to create, decode, and work with Ogg bitstreams. Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. As with all Xiph.org technology is it an open format free for anyone to use. Ogg is a stream oriented container, meaning it can be written and read in one pass, making it a natural fit for internet streaming and use in processing pipelines. This stream orientation is the major design difference over other file-based container formats.

Flac(Free Lossless Audio Codec) is an audio compression codec, a fully open, and general purpose compressed audio format with lossless feature.

libvorbis reference implementation provides both a standard encoder and decoder. Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable bitrates from 16 to 128 kbps/channel.

Implement DLNA to Android™

There are many approach to realize DLNA implementation to Andrid™.

The most easy way to realize DLNA functions is to provide DLNA libraries for application shown figure 1. In this case, application size will be too big and it cause difficulty to update DLNA modules sepalately due to all libraries is tightly linked with applications. To update libraries, rebuild application each times.


To be a good citizen of Android™, our implemantation conforms Android™ layered architecture to provide developer more usability and flexability to develope their applications. The figure 2 illstrates OESF implementation of DLNA.


Features

OESF DLNA Extention provide fruitfull DLNA framework that Android™ developers developement style. Depelopers can easy develope complex applications. It's easy to modify current applications to extend the function to support DLNA.

  • Can use Intent for asyncronus request to DLNA service and can get return by broadcast reciever.
  • Independent from codecs and/or transfer method of contents.

Introducing cach for information retrieval to increase response time.

All source is open source license based.

Note: Some of source code is GPL or LGPL based license, Please chech each source code license condition at source code header or copyright text.

Operation flow (How its works)

Search server

The following figure shows how to perform to search sever from DMP application. Send intent to DNLA server, and get return through Broadcast Receiver. This process is done asynchronously. After receive return, retrieve query(maagedQuery) to DLNA content provider that hold server list. DLNA content provider is cashing server list for future use. This mechanize provide more higher performance.

Search contsnts

The following figure shows how to perform to search contents from DMP application. The flow is almost same as to search server. Send intent to DNLA server, and get return through Broadcast Receiver. This process is done asynchronously. After receive return, retrieve query(maagedQuery) to DLNA content provider that hold contents list. DLNA content provider is cashing contents list for future use.

Get content URI and Play

DLNA content provider is holding content information, to get content URI, retrieve query(maagedQuery) to DLNA content provider. Content provider returns content URI to play. After get content URI, DMP application execute viewer to play content.

Intent Overview

An intent is an abstract description of an operation to be performed. An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed.

The followings are exsample cording for new defined intent for DLNA service.

// Search DMS
Intent IntentService = new Intent("biz.oesf.dlna.action.DlnaService");
IntentService.addCategory("biz.oesf.dlna.category.SearchServer");
sendBroadcast(IntentService);

// Search Container List
Intent intentService = new Intent("biz.oesf.dlna.action.DlnaService");
intentService.addCategory("biz.oesf.dlna.category.SearchContainer");
intentService.putExtra("SERVER", PFMain.sSelectServer);
intentService.putExtra("ID", "0");
sendBroadcast(intentService);

Implement DLNA to your system

To support DLNA, all vendors who support DLNA functionality have to join alliance to get certification. The certification only provid to DLNA supported hardware devices. OESF's implementation is only provide guidelines, OESF only provides implementation framework and API standard on Android™ environment. If hardware vendors or DLNA software provider would like to release DNLA for Android™ devices, We stromgly recomment you to follow this framework and APIs. OESF promote this implementation standard to be acceptable to DMP application developers strongly.

This approach has big merits for Android™ software developers, they can start to develop their application using this OESF environment without wait target devices. Those developed application can keep compatibility through OESF DLNA compliant platforms.

Also this approach provide big merits for DLNA software stack providers. If you provide OESF standard API based your stack, You do not need promote and educate engineers to learn your proprietary APIs and original implementation framework on Android™.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值