ocap ri training

99
OCAP RI Training Nov 30 – Dec 2, 2010 Presenters: Dave Hooley & Greg Rutz Location: Cox Communications

Upload: mingan

Post on 27-Jan-2016

55 views

Category:

Documents


0 download

DESCRIPTION

OCAP RI Training. Nov 30 – Dec 2, 2010 Presenters: Dave Hooley & Greg Rutz Location: Cox Communications. Schedule. Day 1 – Tue Nov 30 – 9:00am to 5:00pm Introductions Project overview, history and website High-level stack and platform architecture RI Stack directory structure - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: OCAP RI Training

OCAP RI Training

Nov 30 – Dec 2, 2010

Presenters: Dave Hooley & Greg Rutz

Location: Cox Communications

Page 2: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Schedule

• Day 1 – Tue Nov 30 – 9:00am to 5:00pm» Introductions» Project overview, history and website» High-level stack and platform architecture» RI Stack directory structure» Build system, stack and PC platform configuration» Running the RI

• Day 2 – Wed Dec 1 – 9:00am to 5:00pm» Application Signaling» Channel maps, tuners and headend video service emulation» EYES tool demonstration

• Day 3 – Thu Dec 2 – 9:00am to 3:00pm» Troubleshooting the Trio guide app on the RI» CANH emulation» Wrap-up

Page 3: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Project Overview and History

Page 4: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Project started June 2008

• Core OCAP I16+ compliant» Several ECNs short of 1.0.0 compliance

• DVR I03 extension» Several ECNs short of I03 compliance

• Front Panel I02 extension• Approx 200 bugs carried over legacy code base• Vision Workbench/Clientsim SDK (Windows

only)

Page 5: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI Release History

• 1.1.1 RI on Jun 12, 2009 as part of 1.1.1 Bundle• 1.1.2 RI on Sep 30, 2009 as part of 1.1.2 Bundle• 1.1.3 RI on Dec 17, 2009 as part of 1.1.3 Bundle• 1.1.4 RI on Jun 3, 2010 as part of 1.1.4 Bundle

Page 6: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack History

• 1.1.4 Bundle Release (RI 1.1.4 Rel-A): June 3, 2010» Core OCAP 1.1.3» DVR I06 Extension» Front Panel I04 Extension» Device Settings I03 Extension» Home Networking I05 Extension» Home Networking Protocol I03

» RI maintenance updates to 1.1.4» Rel-B: Jul 22, 2010» Rel-C: Sep 9, 2010» Rel-D: Nov 4, 2010» Rel-E: Dec 16, 2010 (planned)

Page 7: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

History – Other

• JVM• Based on Sun open source PhoneME advanced MR2

» Contributed to the PhoneME project Feb 2009• PC Platform

» Initially Windows XP» Integrated with RI stack Dec 2008 » Video decode complete; no audio decode currently » Linux PC support added Dec 2009

• Tru2way SDK» 2008: Clientsim-based (Windows only)» May 21, 2010: Rel-4 of the SDK uses TVT framework; Windows

and Linux» Dec 23, 2010: Rel-5 of the SDK (planned)

Page 8: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Why an RI?

OCAP SpecificationsStubs & DTDs

OCAP Tests (CTP)

OCAP Reference

Implementation

Cla

rify Test

Test

ReleaseBundle

Page 9: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP Release Bundle

• Components of a bundle are» Specs» Stubs» DTDs» RI» CTP

• Cert Wave uses a single bundle• Bundle is released 30 days prior to CW start• ECNs are published no closer than 90 days prior

to the CW

Page 10: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP RI Requirements

• RI runs on a PC – Windows and Linux

• RI and PC IDE must be available on open-source terms• RI and PC IDE must only include components with licenses

compatible with the ODL dual-license plans» Components available only under GPL are not OK» Licenses for all third-party RI components must be reviewed by

both CableLabs and the ODL legal teams• RI works with existing CableLabs ATE/CTP tests• RI adheres to current and future OCAP core specs• RI adheres to current and future OCAP extensions specs• To ensure backwards compatibility, MSO guides must run on the RI

Page 11: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Licensing Models

• GPL License on java.net» CableLabs OpenCable Project

– OCAP Stack, PC Platform, Head-end Emulator

» Sun PhoneME Project - JVM

• Commercial License» CableLabs Commercial License

– Also free– Stack, platform and emulator– RAND IPR commitment– Bug fixes in stack contributed back

» Sun or other JVM vendor– Commercial CDC/PBP 1.1 JVMPhoneME JVM

Page 12: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Where Can I Get The RI?

• The Reference Implementation Site:» https://ocap-ri.dev.java.net

• Part of the greater OpenCable project on java.net» https://opencable.dev.java.net/

• Specifications and Retail Branding» www.opencable.com » www.tru2way.com

Page 13: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

What Does This Mean for Me?

• Stack Vendor» Opportunity to make your product better» Spec/stack changes (ECRs) will be better

– Implemented/tested prior to publishing» Opportunity to offer more porting/integration/optimization

services» Value added support services

• Device Manufacturer» More assurance that you device is compliant» Potential shorter time to market

– More compliant stacks from Stack Vendors– Shorter debug/release cycles

» Better products, with a better user experience– Fewer app compatibility issues– Better interoperability (Home Networking)

Page 14: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

What Does This Mean for Me?

• Application Developer» Ability to test applications against representative stack

» IDE/SDK coming

• MSO» Path to fewer application compatibility issues (guides etc)

» Path to broader selection of interoperable, application compatible tru2way devices

» Better consumer experience for interactive Cable TV

Page 15: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

How Can I Contribute?

• Join the RI project on Java.net• Become a contributor

» Sign the CableLabs Contributor Agreement• Contribute:

» To the OCAP stack» To the PC Platform

– Linux support– Other

» To the SDK development» To the wiki

• Ask and answer questions» Forum contributors

Page 16: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Project site walk through

• Issue Tracker• Forums• Wikis• List of supported features• Contribution Process• Bug fix cutoffs• Release notes• Coding standards

Page 17: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Bug Tracking

• Two Bug Tracking Databases» External IssueZilla db on java.net» Internal JIRA-based RI db at CableLabs

– Focused on issues related to CTP and spec– Linked to CableLabs Jira-based CTP, Spec dbs

» May be merging the 2 RI dbs in the future

Page 18: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI Wiki Overview

• Useful URLs

• https://opencable.dev.java.net» Tru2way information, news, events, announcements.

• https://ocap-ri.dev.java.net» OpenCable Reverence Implementation development.» Source code, binary release(s), Issue Tracker, Forums, etc.

• https://devzone.cablelabs.com/widget/web/ocapri/1/-/wiki» Current CableLabs hosted “Public Facing” Wiki.

Page 19: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

opencable.dev.java.net

Access to varying information on OpenCable, tru2Way, etc.

Developer's Conferences, Interop Events, etc. are announced here...

Page 20: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

ocap-ri.dev.java.net

Link to CableLabs Wiki

Page 21: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Wiki Front Page

Full Text Searching

Links to 'Really Quick Start' and 'Quick Start'

URLs for Subversion Repository

Page 22: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Quick Start (Building the RI)

Page 23: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Really Quick Start (Binary)

Page 24: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP RI Branching Strategy

• Three principal branches» Trunk/Development Branch

– Code implemented by internal RI Dev Team– Code from open source contributors that are vetted by RI Tech Leads– Other working branches get merged back to Mainline periodically

» Branded Branch (eg, “1.1.4”)– Fixes and enhancements that are tied to the spec and which have been

verified by the CTP– Branded branch is maintained separately from mainline– Changes from branded branch eventually migrate back to mainline

development– One branded branch per spec release

» Experimental Branch– Open source contributors have write access to this directory– No other restrictions– Merging to Trunk on a case-by-case basis

Page 25: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

PC Environment Requirements

Page 26: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Architectural Overview

Page 27: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Host Operating System

Windows XP API

Page 28: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform Support Libraries

Windows XP API

RI Platform Support Libraries

Int’l Log4cXML2 ZLib

GLib

PThreads

GStreamer Gst-Plugins-Base Gst-Plugins-Good

wxWidgets

UPnP

FFMPEG

Page 29: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform Implementation

Windows XP API

RI Platform Support Libraries

Int’l Log4cXML2 ZLib

GLib

PThreads

GStreamer Gst-Plugins-Base Gst-Plugins-Good

wxWidgets

UPnP

FFMPEG

RI Platform Implementation

GStreamer Plugins User InterfaceUPnP Tuner Control

Page 30: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform API

Windows XP API

RI Platform Support Libraries

Int’l Log4cXML2 ZLib

GLib

PThreads

GStreamer Gst-Plugins-Base Gst-Plugins-Good

wxWidgets

UPnP

FFMPEG

RI Platform Implementation

RI Platform API

GStreamer Plugins User InterfaceUPnP Tuner Control

Page 31: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform Summary

• Full software emulation of STB media decoding and presentation hardware.

• Majority of the code is 3rd party support libraries.• Leverages existing frameworks:– GLib – utility library.– uPnP – tuner control.– GStreamer – media decoding and presentation.– wxWidgets – user interface.

• No OS abstraction APIs.

Page 32: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP Porting API

RI Platform API

MPEOS Implementation

MPEOS API

Direct FB

FT2

Presentation APIsDisplay, FP, Graphics, UI Events

OS APIsDLL, Debug, Event, File, Memory, Socket,

Storage, Sync, Thread, Time, UtilDecoding APIsClosed Captioning, DVR, Filter,

Media, POD, Sound, VBI

Page 33: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP Native Library

RI Platform API

MPEOS Implementation

MPEOS API

MPE Library

DSM-CC

Direct FB

FT2

SI Database & Parsing

File System Management

Presentation APIsDisplay, FP, Graphics, UI Events

OS APIsDLL, Debug, Event, File, Memory, Socket,

Storage, Sync, Thread, Time, UtilDecoding APIsClosed Captioning, DVR, Filter,

Media, POD, Sound, VBI

Page 34: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP JVM

RI Platform API

MPEOS Implementation

MPEOS API

MPE Library

DSM-CC

phoneME JVM

Direct FB

FT2

SI Database & Parsing

File System Management

Presentation APIsDisplay, FP, Graphics, UI Events

OS APIsDLL, Debug, Event, File, Memory, Socket,

Storage, Sync, Thread, Time, UtilDecoding APIsClosed Captioning, DVR, Filter,

Media, POD, Sound, VBI

VM

PBP 1.1

Page 35: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP Java Implementation

RI Platform API

MPEOS Implementation

MPEOS API

MPE Library

DSM-CC

phoneME JVM

OCAP Java Managers

Direct FB

FT2

SI Database & Parsing

File System Management

Presentation APIsDisplay, FP, Graphics, UI Events

OS APIsDLL, Debug, Event, File, Memory, Socket,

Storage, Sync, Thread, Time, UtilDecoding APIsClosed Captioning, DVR, Filter,

Media, POD, Sound, VBI

Core Implementation NanoXMLVM

PBP 1.1

Log4J JUnitA

pp

Ser

vice

Aut

h

EA

S

... Hos

t

TS

B

Rec

ord

SN

MP

Page 36: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

OCAP API

RI Platform API

MPEOS Implementation

MPEOS API

MPE Library

DSM-CC

phoneME JVM

OCAP API

OCAP Java Managers

Direct FB

FT2

SI Database & Parsing

File System Management

Presentation APIsDisplay, FP, Graphics, UI Events

OS APIsDLL, Debug, Event, File, Memory, Socket,

Storage, Sync, Thread, Time, UtilDecoding APIsClosed Captioning, DVR, Filter,

Media, POD, Sound, VBI

Core Implementation NanoXMLVM

PBP 1.1

Log4J JUnitA

pp

Ser

vice

Aut

h

EA

S

... Hos

t

TS

B

Rec

ord

SN

MP

Page 37: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Directory Structure & Java Package Descriptions

Page 38: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI Stack Directory Structure

• ri/RI_Stack is the root of the stack ($OCAPROOT)» Formerly OCAP-1.0

• apps» Xlets, Xlets, Xlets» QA Integration Xlets, Watch TV, TuneTest» Some more up-to-date than others

• assets» Test root certificates used to when running authenticated CTP

tests» Standard fonts

• bin» Binary and other runtime products for all ports» Some configuration files

Page 39: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Directory Structure -- continued

• docs» Various system documentation

• hostconfig» Host (not target) build configuration files

• java» “filelist” files and Java build configuration files» src

– Java source files, organized by extension

» test– JUnit source files, organized by extension– Out of date

Page 40: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Directory Structure -- continued

• jni» JNI C source files, organized by extension

• jvm» ocap_vmlib

– RI Stack/VM integration library Java and JNI source code

» phoneME– All source and build files related to the phoneME

Advanced VM» Your VM Here

Page 41: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Directory Structure -- continued

• mpe» mgr

– Function table management– Platform-independent C source

» include– MPE API headers

» os– Include

MPEOS API headers– Your MPEOS port here

» Test– MPE unit tests– Base on CUnit framework– Out of date

Page 42: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Directory Structure -- continued

• target» Target-specific build files

• thirdparty» Open source (non-GPL) libs used by the stack with

extensive modifications– DirectFB, FreeType, Zlib

• tools» Unmodified open source (non-GPL) libs used by the stack

– JUnit, NanoXML, cybergarage uPnP, Log4J, etc..– cybergarage is heavily modified and probably should move

to “thirdparty”

Page 43: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Java Packages

• org.dvb, org.havi, org.davic, org.ocap» Specification defined packages

• javax.tv» JavaTV

• org.cablelabs.debug» Logging and profiling

• org.cablelabs.impl» Java implementation packages

Page 44: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Build System

Page 45: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Build Tools

• Make» Compiles JNI, MPE, MPEOS, and thirdparty

native libraries• Ant

» Coordinates the entire build system» Wiki contains a list of top-level build targets

• JDK (1.4 or higher)» Used to compile stack and test application

sources

Page 46: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Build System – Environment Variables

• Easy to work in several different RI code bases at the same time.

• OCAPROOT» The absolute path to the ri/RI_Stack directory.» Required for compilation/execution

• OCAPHOST» Defines the host build environment» Build system reads host environment configuration files

from ($OCAPROOT/hostconfig/$OCAPHOST)» Required for compilation only

Page 47: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Build System – Environment Variables

• OCAPTC» The Target Configuration for the build. Basically the port

you are working on.» Defines a subdirectory hierarchy where:

– build configuration files are found ($OCAPROOT/target/$OCAPTC)

– binary intermediate products are built $(OCAPROOT/gen/$OCAPTC)

– final binary products are installed and runtime configuration files are kept ($OCAPROOT/bin/$OCAPTC)

» Suggested format is:– <org>/<platform>/<os>/[debug|release]– CableLabs/simulator/Linux/debug

» Required for compilation/execution

Page 48: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack and Platform Configuration

Page 49: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack Configuration – Native

• mpeenv.ini• Configuration parameters for SI,

ObjectCarousel, JVM, and more…• For the RI Platform, mpeenv.ini is located in

$OCAPROOT/bin/$OCAPTC/env• For a specific port, it can be located anywhere

»Stack boot module must pass the location of this file to one of the MPE managers

Page 50: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack Configuration – Java

• Java properties files, per extension• Located in $OCAPROOT/java/src/<module>/<module>.properties

» Do not modify these files• Modules are organized into a precedence hierarchy defined in

$OCAPROOT/java/src/base/org/cablelabs/impl/manager/props.properties» Do not modify this file» Stack can choose to use a single property value based on highest module

preference or aggregate the property values for all included modules» Helps with separable extension builds

• “final.properties” is the final user-level override file for Java configuration properties. » Must be found in the root of a classpath entry.» Place your user-specific overrides in this file to modify stack behavior.» For PC Platform, located in $OCAPROOT/bin/$OCAPTC/env

Page 51: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack Configuration – Java <cont>

• Most common final.properties overrides– OCAP.mgrmgr.manager.Auth=org.cablelabs.impl.manager.auth.AuthManagerImpl

• Enable application authentication. Default is disabled

– OCAP.mgrmgr.manager.OcapSecurity=org.cablelabs.impl.manager.security.NoAccessControl

• Disable Java permission checks. Default is enabled

– OCAP.xait.ignore=true

• Disable XAIT acquisition entirely. Only hostapps are loaded.

– OCAP.cablecard.manufacturer=<id>

• Override CableCARD manufacturer ID returned by the platform

Page 52: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

PC Platform Configuration – Launcher

• platform_<os>.cfg• Platform-specific bootstrapper for the PC

platform• Launches

• PC Platform set-top emulator• 1 or more applications (in shared libs)

• OCAP• Native app (Blu-Ray Player)

• Located in $PLATFORMROOT

Page 53: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

PC Platform Configuration – STB/Headend Emulator

• platform.cfg• Configuration parameters for UI, OOB,

frontpanel, backpanel, display, Headend emulation

• Configuration values can contain environment variables• $(<env_var>)

• Located in $PLATFORMROOT

Page 54: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Setting up Graphics Resolution

TV Screen size fromDISP.DEFAULT.CONFIG (mpeenv.ini)

Platform Window size fromRI.Emulator.TvScreen.widthRI.Emulator.TvScreen.height (platform.cfg)

Video scaled accordingto incoming video sizeand applicable DFC rule

Page 55: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Coherent Configurations

DISP.DEFAULT.CONFIG Configuration

0 640x480 1:1 graphics, 720x480 8:9 video, 640x480 1:1 background

1 640x480 1:1 graphics, 720x480 8:9 video, 720x480 8:9 background

2 960x540 3:4 graphics, 720x480 8:9 video, 640x480 1:1 background

3 960x540 3:4 graphics, 720x480 8:9 video, 720x480 8:9 background

4 640x480 4:3 graphics, 1920x1080 1:1 video, 1920x1080 1:1 background (with I-frame support)

5 960x540 1:1 graphics, 1920x1080 1:1 video, 1920x1080 1:1 background (with I-frame support)

Page 56: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

CableCARD Emulation

• Very limited CableCARD emulation• Generic Features Only• PC Platform uses DRI to communicate with

CableCARD• $RICOMMONROOT/resources/GpnvsDatabaseFile.xml

• Values are either strings or base64 encoded binary from CCIF specification

Page 57: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Running the RI

Page 58: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

runRI.sh

• Main execution script for the RI PC Platform– runRI.sh –help– Lots of options• ATE• Setup for test Xlets• Native debugging

– Located in $PLATFORMROOT

Page 59: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Logging and Debugging

Page 60: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Stack logging

• Stack logging verbosity managed in mpeenv.ini– Example: LOG.MPE.JAVA = ALL DEBUG

• Logging may affect performance/timing (reset to DEFAULT if problems encountered)

• Java stack code uses log4j – configurable via $OCAPROOT/bin/$OCATPTC/env/log4j.properties

• Useful links on Wiki – search for ‘logging’

Page 61: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform logging

• Platform code uses log4c to manage logging• Configuration found in

$PLATFORMROOT/log4crc• Useful links on Wiki – search for ‘logging’

Page 62: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Logging and IssueTracker

When attaching a log to IssueTracker• Ensure the log contains timestamps• Helpful if Java debug logging is enabled

Page 63: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Chainsaw screenshot

Page 64: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Java Stack debugging

• Possible to step through breakpoints in Java stack code, generate stack traces and thread dumps

• Stack trace, thread dumps available via jdb (included with the Sun JDK)

• To enable Java debugging, un-comment VMOPT19 & 20 in mpeenv.ini and start debugger or jdb

• Re-comment VMOPT 19 & 20 when done..

Page 65: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Platform debugging

• gdb can be used to generate a trace if the Platform terminates unexpectedly

• ./runRI.sh -gdb

Page 66: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Eclipse

• Eclipse .project and .classpath files for RI Stack code available from me– Java debugging– Native code debugging (not me)

• Debugging demonstration

Page 67: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Performance and Profiling

Page 68: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Eclipse

• PlatEval– Xlet contributed by Comcast/TVWorks.– Measures time for basic JVM operations• Array fills• Graphics operations• Fonts

• Profiling– Netbeans profiling support– See Wiki page

• OCAP specification hooks coming in 1.2

Page 69: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Application Signaling

Page 70: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

XAIT – MPEG Sections

• Captured XAIT from real signaling source– Headend– Software tool

• $RICOMMONROOT/resources/fdc-files.txt– Forward Data Channel (DRI2.0 terminology for OOB data

pathway)– Filelist indicating MPEG2 section files to be “played out”– Actual MPEG2 section files must be located in

$RICOMMONROOT/resources/fdcdata• Playout interval specified in $PLATFORMROOT/platform.cfg

– RI.Platform.OOBTableRequestPeriod– File is read every interval

• Trigger signaling changes

Page 71: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

XAIT – File-Based Signaling

• Provide all the components of XAIT/AIT signaling in file format– File should be located in the classpath• xait.properties• ait.properties• hostapp.properties

• See the wiki for a complete description of fields

Page 72: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Channel Maps, Tuners,Headend Video Service Emulation

Page 73: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

PC Platform Emulation

• Channel Map– SCTE 65 SI

• Video Source– MPEG transport stream files

• SPTS• MPTS

– Live QAM modulated transport streams• HDHomerun

• Tuners– PC Platform can be configured to use either of these video

sources and respond to “tune” requests.– MPEG transport stream delivered to platform media

pipelines

Page 74: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Service Information (SCTE 65)

• The RI stack builds its channel map from the following tables– NIT

• CDS Subtable (Transport carriers)• MMS Subtable (Modulation Modes)

– SVCT– NTT

• SNS Subtable (Channel names)

• No file-based emulation for SI.– MPEG2 sections only

• $RICOMMONROOT/resources/fdc-files.txt– Same as XAIT

• Playout interval same as XAIT

Page 75: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Acquiring SI

• Capture from actual headend– CableLabs EYES tool– Other mechanism

• Tru2way Workbench• Others?

Page 76: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Video Sources

• PC Platform limitations– PC Platform only has MPEG-2 decoder– No audio decoding support– Non-encrypted streams only

• Configure number of “tuners” (simulataneous video sources)– $PLATFORMROOT/platform.cfg

• RI.Platform.numTuners• MPEG-2 Files

– VLC sends transport stream via localhost UDP connection– platform.cfg determines QAM carrier mapping– Can capture files from live QAM source using HDHomerun

• Live Source– HDHomerun decodes QAM modulated transport stream and

streams via localhost TCP

Page 77: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

VLC Tuners

• Separate VLC process launched to stream TS file– $RICOMMONROOT/resources/<Win32/Linux>/VLC

• Configuration ($PLATFORMROOT/platform.cfg)– RI.Platform.ipAddr

• Set to 127.0.0.1– RI.Headend.TunerType = VLC– RI.Headend.tuner.x.TunerStreamerPort

• Port that VLC will listen for commands– RI.Headend.tuner.x.StreamerIp

• VLC process can run on a separate machine– RI.Headend.tuner.x.TunerRxPort

• Port the PC Platform will open to listen for transport stream packets– RI.Headend.tuner.x.tunerNum

• Not used

Page 78: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

VLC Tuners <cont>

• When a platform “tune” request is received– VLC Process launched– VLC directed to stream a file based on the

“carrier map” in platform.cfg• RI.Headend.vlc.frequency.<Hz>_<QAM> = <file>

• Program numbers in transport stream file must match up with channel map (SCTE 65 data)

Page 79: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

HDHomerun Tuners

• Command line utility used to set HDHomerun tuners and streaming parameters– $RICOMMONROOT/resources/<Win32/Linux>/HdHr/hdhomerun_config.exe

• Configuration ($PLATFORMROOT/platform.cfg)– RI.Platform.IpAddr

• Set to your PC’s IP– RI.Headend.TunerType = HDHR– RI.Headend.tuner.x.tunerNum

• Tuner ID on back of HDHomerun (0 or 1)– RI.Headend.tuner.x.tunerRxPort

• Port the PC Platform will open to listen for transport stream packets– RI.Headend.tuner.x.streamerPort

• HDHomerun DeviceID (bottom of HDHomerun). Specify as hex with 0x prefix.

– RI.Headend.tuner.x.streamerIp• Not used

Page 80: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

EYESExamine Your Edge System

Page 81: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

<tru2way> Workbench SDK

Page 82: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI SDK Status - 1

Final Release

• Binary distribution package of RI Emulator Bundle– Package released 6/4/10

– Standalone Configuration using Headend UPnP Simulator

– Windows: http://ri.opencable.com/ri/builds/releases/1.1.4-RelA/ocap-ri-tags-RI-I1_1_4_REL_A-8598-Setup.exe

– Linux: http://ri.opencable.com/ri/builds/releases/1.1.4-RelA/ocap-ri-tags-RI-I1_1_4_REL_A-8598-Linux.exe

• Two supported RI Emulator UI targets– wxWidgets on Windows XP

– wxWidgets on Linux - Fedora Core 10/11

• Two unsupported emulator targets– For debugging purposes only; no formal QA testing

– Native Windows (TvScreen only)

– Native Linux (TvScreen only)

• SDK integration with Eclipse IDE– Rel-4 released 5/21/10

– Version 3.4.2; use SDK/3rdParty/Eclipse packages

– JRE 1.6.0_8 or later

– Update Site: http://ri.opencable.com/sdk/updates/eclipse.3.4.2/stable/latest/

• Two supported SDK targets– Windows XP

– Linux – Fedora Core 10/11

• No subsequent releases planned for 2010

Page 83: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI SDK Status - 2

Support• TWBQuickStart Guide• ocap-ri.dev.java.net Development Forums• Rely on open source contributions– We need your help!!!

Page 84: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Software Components

RI Bundle Package• RI Emulator and default configuration files (platform.cfg, mpeenv.ini, etc.)• OCAP API Stubs and Javadocs• RI Bundle Manifest

– C:\CableLabs\tru2way\tags-RI_I1_1_4_REL_A-8598\ocap-ri\twb_support\RIBundleManifest.xml

Image Map Editor• Create new remotes and front panel UI• Proprietary file format containing image data and hotspot location coordinates• remote.im – Virtual remote image map• frontpanel.im – Virtual front panel image map

Image Map Viewer• View .im files

Eclipse Plugins• TVT Framework Plugins

– TVWorks contribution– Xlet Service Configuration, Channel Map Editor, Launch Configuration Support– 15 plugins; org.tvt namespace

• <tru2way> Workbench Plugins– enableTv contribution and CableLabs implementation– Integration between RI Bundle and TVT Framework– 5 plugins; org.tru2way.twb namespace

Page 85: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

RI Emulator UI

Page 86: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

<tru2way> Workbench SDK UI

Page 87: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Features - 1

RI Emulator

• Standalone configuration supported

• All OCAP application types supported (Bound/Unbound)

• Executes in Run and Debug modes

• Provide virtual TV Screen, Front Panel, Remote and Console for user presentation and IO

– Support for following coherent device configurations: 640x480 – 4:3, 960x540 – 4:3, 640x480 – 16:9, and 960x540 – 16:9

• Messages from ODL stack and application captured in external log as well as displayed in Console UI

– Output can be filtered based on category and level

• Configurable emulation

– Via configuration parameters on start-up (mpeenv.ini and final.properties)

Page 88: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Features - 2

Headend – UPnP Emulator

• Delivers MPEG-2 Transport Streams for video play back (no audio)– One or more elementary stream

– Pre-recorded files and live transport streams

• Delivers PAT/PMT InBand via Transport Stream

• Delivers SI OOB– Pre-defined sections

• Tuning support by [frequency, QAM, program] tuple as well as source ID

• XAIT signaling via file configuration (i.e. xait.properties consumed directly by stack)

• AIT signaling via file configuration (i.e. ait-1234.properties consumed directly by stack)

• Initiate/terminate pre-recorded EAS message

• Configurable emulation– Via configuration parameters on start-up

Page 89: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Features - 3

<tru2way> Workbench Eclipse Integration• RI Emulator Bundle Registration

– Bundle independent of Eclipse plugin framework– Support for multiple bundles

• Headend Simulation– Generates OOB section data

• OCAP Project– RI Bundle selection– Application templates

• Xlet Service Configuration– XAIT configuration– Permission Request File (.prf) configuration

• Channel Map Editor• Run/Debug Launch Configuration Modes• OCAP API Javadoc hover

Page 90: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Architecture - 1

Page 91: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Architecture - 2

Page 92: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Architecture - 3

Page 93: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Source

• SDK Root– https://community.cablelabs.com/svn/OCAPRI/trunk/SDK/

• Image Map Editor– SDK/ImageMapEditor/

• Image Map Viewer– SDK/ImageMapViewer/

• TVT Framework– SDK/tvt/

• <tru2way> Workbench– SDK/tru2wayWorkbench/

• Third-party dependencies– SDK/3rdParty– Eclipse snapshots– xerces– libpng– libcurl

Page 94: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Enhancement Request - 1

Open Source Community Contributions

• Support for application developers

• Support for testing OCAP Stack features

• User level documentation

• Sample applications

– Simple WatchTv

– Simple DVR

– Simple Home Networking

Page 95: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Enhancement Request - 2

RI Emulator• Device Settings User Interface (Back Panel UI)• Online HTML Help Browser

– User document submissions• Command Plugin Framework (Dynamic UI Modules)

– Add UI elements to the wxWidgets UI at runtime– Enhance static Menu and Toolbar integration capabilities

• Full-screen TvScreen Window (if possible in wxWidgets)• Show/hide video and graphics planes• DirectFB 1.0 and support for OpenGL hardware acceleration• Additional target platforms: Windows 7, Ubuntu, Mac OS X• Better integration with Eclipse launch configuration manager as part of

OCAP Project workflow– Setting debug output levels– Multiple tuner configuration

Page 96: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Enhancement Request - 2

Headend – UPnP Emulator

• XAIT table generation and delivery

• AIT table generation and delivery

• Better integration with Eclipse launch configuration manager as part of OCAP Project workflow– CableCard/POD configuration

– Dynamic delivery of OOB SI data

– HDHR configuration

Page 97: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Enhancement Request - 3

<tru2way> Workbench Eclipse Integration• Add support for Unbound applications• Complete Launch Configuration Simulator Tab UI• Additional application templates: Tuning, IXC, HAVi,

DVR, HN, etc.• OCAP Project export• Channel Map export• Xlet configuration export (.properties generation)• Online documentation through Eclipse Help• Tips and tricks documentation• OCAP API cheat sheets

Page 98: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

Application Development Workflow

Page 99: OCAP RI Training

Cable Television Laboratories, Inc. 2010. All Rights Reserved. Proprietary/Confidential.

SDK Demo

• RI Bundle Installation• <tru2way> SDK Installation• RI Bundle Registration• Creating a new OCAP Project• Creating a Xlet Service Configuration• Creating a Launch Configuration• Executing the Xlet• Debugging the Xlet• Stopping RI Emulator execution