Media Engine (HME SDK)

emptyslowInternet και Εφαρμογές Web

12 Νοε 2013 (πριν από 4 χρόνια και 1 μέρα)

77 εμφανίσεις

Getting to Know TiVo: The Home
Media Engine (HME SDK)

Eric M. Upchurch

CS 525

Spring 2008

Introduction


TiVo is a popular set
-
top DVR that can be connected to a
home network


Through the network connection, the TiVo can access
applications through a special transport protocol (the
HME protocol)


The HME SDK facilitates development of applications
that utilize the HME protocol


Photo viewers


Music players


RSS feeds


Streaming radio


Games


etc


Motivation


Interested in developing TiVo apps prior to
CS525


Also seemed a perfect fit for the class


Relatively new to TiVo, and wanted to play
around with it


Have run several third
-
party applications


Curious what the capabilities of the SDK are


Could not find exactly what I was looking for


A photo slideshow with music


The HME Protocol


HME applications use a client/server architecture


Server is a PC or possibly a server on the Internet


Client is the TiVo receiver


Protocol uses a single bi
-
directional TCP/IP socket


Language independent


Applications just have to communicate with TiVo via
the protocol, and so could be developed in any
language


Uses chunked data encoding (1
-
65K byte chunks)


Allows arbitrary data size by spanning chunks


Enables reader of a stream to skip to next chunk if an
error occurs




HME Architecture

HME SDK


A complete API and developer kit for creating HME
applications in Java


Wraps the HME protocol into an event
-
driven
architecture


More or less MVC, similar to Java Swing


TiVo boxes find HME applications using
Multicast
DNS
(
mDNS
/
Zeroconf
) and
DNS Service Discovery
(DNS
-
SD)


“Bonjour
”, developed by Apple Computer


No network setup required


Don’t need to know IP addresses, host names, or ports



HME SDK Class Structure


Applications inherit from the
Application

class


GUI is composed of
Views

containing
Resources


View instances contain a single resource, and provide a
coordinate system and transparency


Resources are (mostly) visual elements: fonts, colors, images,
text, and animations. Also sounds, music (streamed)


Views are laid out to draw a screen on the TiVo receiver’s display


HME Application Structure


An application is composed of a view hierarchy


Root view covers entire display


Views can have child views, which cover some portion of
the screen relative to the parent


Views may be invisible or zero size to accommodate non
-
visual elements, such as sounds


Views can have streaming image or music (MP3)
resources


Events notify the application as the stream is read


Animation resources provide visual effects (e.g. fade
-
in/out)


Useful for hiding network latency


Views and resources handle events sent by TiVo

Bananas UI Toolkit


TiVo toolkit for building TiVo user interfaces


Extends the basic HME SDK


Provides an application framework


Applications are composed of a stack of screens


Provides focus management between widgets


Provides a standard widget set


Button


Text


List


Keyboard


Provides a standardized look and feel


Similar to the base TiVo UI

HME Hosting Environment


Uses factory pattern to serve up applications


Each available application has a factory class that provides
instances of the app to a TiVo receiver


New instances are created when a connection is established
from a TiVo receiver


Single hosting environment (one JVM) can serve
multiple application types


Applications are accessed via an HTTP URL request
from the receiver


Example: http://myPC:7788/MyTiVoApp


Hosting environment maps the URL to an application
factory by name (e.g.
MyTiVoAppFactory
)


Custom hosting environments can be created for
extensibility to server domain

HME Hosting Environment

HME Simulator


The HME SDK includes a TiVo simulator for testing


Greatly facilitates rapid application development


Works like the TiVo receiver


Allows you to see the view hierarchy and memory
usage of application


Provides debugging options


Overlays “safe” television area bounding boxes


This shows the area that is safe on all televisions,
including those that
overscan


Not a substitute for testing on a TiVo receiver


Response speed is vastly different


Network latency may be different

Conclusions


TiVo HME is a powerful SDK for developing
applications for display on TiVo


Bananas UI toolkit eases construction of
professional looking application


A couple of shortcomings:


An HD capable alpha version has been released,
but I could not get it to work. Stuck with SD
(640x480) for now.


Does not allow streaming of video content!

References & Resources


TiVo HME Software Developer Kit Developer's Guide Release
1.4.
http://tivohme.sourceforge.net/docs/hmesdk/hme
-
devguideTOC.html


TiVo Bananas UI Toolkit Developer’s Guide Release 1.3.
http://tivohme.sourceforge.net/docs/bananas/bananas
-
devguideTOC.html



TiVo Home Media Engine (HME) SDK Info.
http://bitrazor.com/content/tivo/hme/index.php



TiVo. Wikipedia.
http://en.wikipedia.org/wiki/TiVo


Flash demo: Getting Started with Eclipse and the TiVo HME
SDK.
http://bitrazor.com/content/tivo/hme/tivo_hme_eclipse_de
mo1.php


TiVo Developer How
-
Tos
.
http://bitrazor.com/content/tivo/hme/howtos/index.php



Backup Slides

In the event the demo doesn’t work

My HME Application


Intro Screen


Currently one
slideshow


Extend to multiple
XML defined
slideshows, listed
here


Uses common TiVo
look and feel


User selects enter or
right arrow button to
start slideshow


My HME Application


Slideshow Screen


Photos randomly
change every
N

seconds


Photos fade in/out


Music tracks
randomly selected


User selects left
arrow button to
return to
previous
screen