UPnP AV Architecture - Generic Interface Design And Java Implementation Andreas BobekUniversity of...

Post on 17-Jan-2016

217 views 0 download

Tags:

transcript

UPnP AV Architecture - Generic Interface Design And Java Implementation

Andreas BobekUniversity of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek, Hendrik Bohn, Frank GolatowskiUniversity of Rostock

Faculty of Computer Science and Electrical Engineering

Parallel and Distributed Computing and Networks – PDCN 2005 –as part of the

23rd IASTED International Multi-Conference onApplied Informatics

15th – 17th February, 2005, Innsbruck, Austria

UPnP AV ArchitectureGeneric Interface Design And Java Implementation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 1 of 19

Outline

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 1 of 19

Outline

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 2 of 19

1.1. UPnP Device Architecture

- UPnP = Universal Plug and Play

- supports ad-hoc networking of devices and services

- only protocols are defined (UDP, TCP, SOAP, SSDP, GENA, HTTP)

- independent of programming language, operating system and transmission medium

- six phases: addressing, discovery, description, control, eventing, and presentation

- defines three communicating components: device, service, control point

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 3 of 19

- role: server

- offers services

- may contain other devices

- “root device”

- characterized by properties such as model number, model name, vendor...

- uniquely identifiable by UUID

UPnP Device

UPnP Service

- interface to the device

- offers actions and URLs for controlling, eventing, and presentation

- manages its state in state variables

1.1. UPnP Device Architecture

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 4 of 19

- role: client

- searches for devices and/or services

- invokes actions (at services)

- requests state variables

UPnP Control Point

1.1. UPnP Device Architecture

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 5 of 19

UPnP Device (Server)

UPnP Service

UPnP Control Point (Client)

UPnP network

1.1. UPnP Device Architecture

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 6 of 19

IP

1.2. UPnP Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 6 of 19

IP

UDP TCP

HTTPHTTPU HTTPMU

SOAPSSDP GENA

1.2. UPnP Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 6 of 19

IP

UDP TCP

HTTPHTTPU HTTPMU

SOAPSSDP GENA

UPnP Device Architecture(Addressing, Discovery, Description, Control, Eventing,

Presentation)

1.2. UPnP Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 6 of 19

IP

UDP TCP

HTTPHTTPU HTTPMU

SOAPSSDP GENA

UPnP Device Architecture(Addressing, Discovery, Description, Control, Eventing,

Presentation)

Standardized DCPs(by UPnP Forum)

1.2. UPnP Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 6 of 19

IP

UDP TCP

HTTPHTTPU HTTPMU

SOAPSSDP GENA

UPnP Device Architecture(Addressing, Discovery, Description, Control, Eventing,

Presentation)

Standardized DCPs(by UPnP Forum)

Audio Video Architecture

Lighting Controls

Printer Device

Internet Gateway Device

1.2. UPnP Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 7 of 19

1.3. UPnP AV Architecture

MediaRenderer Device

• play back of multimedia content

• e.g. Windows Media Player, TV, beamer

MediaServer Device

• manages meta data of multimedia files and streams

• meta data consist of information about format (mpg, jpg, avi...), owner, permissions, date, size, access protocols ...

• PC, tuner, digital camera

Control Point

• searches for MediaServer and MediaRenderer

• initiates connections

• controls play back (play, stop, brighter, louder...)

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 8 of 19

MediaRenderer Device

RenderingControl Service

ConnectionManager Service (opt.)

AVTransport Service (opt.)

MediaServer Device

ContentDirectory Service

ConnectionManager Service (opt.)

AVTransport Service (opt.)

Control Point

1.3. UPnP AV Architecture

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 9 of 19

1.4. UPnP AV Data Flow

IP

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

1. Search RequestControl Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

2. Search ResponseControl Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

3. Browse()Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

4. Result

• DIDL Lite (XML)

• preconditioned protocols

• file formats...

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

5. GetProtocolInfo()Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

6. supported protocols, accepted formats

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

7. matching between preconditioned and supported protocols

IP

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

8. PrepareForConnection()Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

9. SetURI()

Play, Pause, Stop...

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

1.4. UPnP AV Data Flow

IP

10. Data transport

(„out of band“)

Control Point

Media Renderer

Media Server

Andreas Bobek

Slide 9 of 19

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 10 of 19

2.1. AV Interface Examples

<< interface >>MediaServer

<< interface >>ProxyMediaServer

<< interface >>HostedMediaServer

<< interface >>MediaDevice

<< interface >>MediaRenderer

<< interface >>ProxyMediaRenderer

<< interface >>HostedMediaRenderer

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 11 of 19

2.1. AV Interface Examples

<< interface >>AVTransportInstance

+ setAVTransportURI( current_uri: String, current_uri_meta_data: String): void

+ stop(): void

+ play(speed: String): void

+ next(): void

+ getMediaInfo(): GetMediaInfoResult

...

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 12 of 19

Vendor UPnP Stack

uses

Vendor AV Stack

Vendor Factory Class

inst.

AV Interfaces

Supportuses(opt.)

impl.impl.

uses

usesuses(opt.)

AV Application

2.2. AV Interface Stack

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 13 of 19

2.3. Application Code Examples

UPnPAVFactory factory = new UPnPAVFactoryImpl();

MediaControlPoint cp = factory.getMediaControlPoint(

new MediaControlPointListenerImpl()

);

cp.start();

cp.searchForMediaRenderers();

cp.searchForMediaServers();

Control Point

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 14 of 19

2.3. Application Code Examples

Control Point

public class Listener implements MediaControlPointListener{ public void takeMediaServer( ProxyMediaServer p_server, MediaDevice p_parent_device ){ // access proxy services ProxyAVTransport avt = p_server.getProxyAVTransport(); ProxyConnectionManager cm = p_server.getProxyConnectionManager(); ProxyContentDirectory cd = p_server.getProxyContentDirectory(); // browse content directory BrowseResult browse_result = cd.browse( "0", ContentDirectory.BROWSE_FLAG_BROWSE_METADATA, "*", 0, 0, "" ); DidlLiteModel model = new DidlLiteModel(); String result = browse_result.getResult(); Element el_didl = XMLUtil.stringToElement(result); }

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 15 of 19

2.3. Application Code Examples

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 16 of 19

2.4. Advantages

Why to use an interface layer:

- separate development of stack and application

- replacement of UPnP stack without modifying application code

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 17 of 19

3.1. AV within SIRENA project

- SIRENA = Service Infrastructure for Real time Embedded Networked Applications

- part of the ITEA program

- modify current AV Architecture:

- extension by integrating QoS aspects

- adapt architecture to fit small embedded devices

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

1. UPnP Audio Video

1.1. UPnP Device Architecture

1.2. UPnP Stack

1.3. UPnP AV Architecture

1.4. UPnP AV Data Flow

2. AV Interfaces

2.1. AV Interface Examples

2.2. AV Interface Stack

2.3. Application Code Examples

3. Further Work

2.4. Advantages

3.1. AV within SIRENA project

3.2. Generalisation

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 18 of 19

3.2. Generalisation

- analyzing service-oriented architecture (SOA) concepts (UPnP, Web Services, JINI, HAVi...)

- designing device protocols independently of specific SOAs

UPnP AV Architecture - Generic Interface Design And Java Implementation

University of Rostock

Faculty of Computer Science and Electrical Engineering

Andreas Bobek

Slide 19 of 19

SOA Interfaces

UPnP Interfaces DPWS Interfaces

AV Interfaces

SiemensUPnP Stack

CyberlinkUPnP Stack

URODPWS Stack

UPnP-SiemensAdapter

UPnP-CyberlinkAdapter

uses uses

impl. impl.

DPWS-UROAdapter

impl.

uses

SOA-UPnP Adapter SOA-DPWS Adapter

uses uses

impl.impl.

uses

AV-SOA Adapter

impl.

Air Condition Interfaces

uses

AV Application

Air Condition-SOA Adapter

uses

Air Condition Application

uses

impl.

3.2. Generalisation