+ All Categories
Home > Documents > MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Date post: 18-Jan-2016
Category:
Upload: valentine-cunningham
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
MPVTools SDK Tutorial October 13 th , 2003 OSTA Optical Storage Symposium
Transcript
Page 1: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

MPVTools SDKTutorial

October 13th, 2003

OSTA Optical Storage Symposium

Page 2: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Tutorial Goals

• On completion of the tutorial, you will:– A better understanding of where the MPV

initiative is at.– A good understanding of what functionality is

available in the MPVTools distribution.– A good understanding of how to navigate

around the distribution materials such as the source code, online help and example programs.

Page 3: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Contents

• Overview of MPV• Overview of MPVTools• Overview of MPV C SDK• Reading MPV Files• Writing MPV Files• Processing in-memory representation• Worked Example (Concat)• Futures/Questions

Page 4: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Overview of MPV

• See alternate slidedecks

Page 5: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Overview of MPVTools

• MPVTools is an open source project hosted at Sourceforge (mpvtools.sourceforge.net)

• The project currently contains three sub-projects:– DHTML MPV browser– MPV C SDK– MPV C Incremental writer

Page 6: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Overview of MPV C SDK

• Ansi C library that provides reading, writing and processing of MPV files.

• Targeted at embedded applications.• Minimal ROM footprint.• Integrates with system services of platform

(file, memory, xml parsing).• Royalty free.• Implements MPV mechanisms and policies.

Page 7: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

OS

Memory File Directory

XML Parser

Expat UnicoiMPV Infrastructure

MPV Reader MPV Writer

Convenience Interfaces

C SDK Block Diagram

Page 8: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

C SDK Infrastructure

Page 9: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Pluggable System Services

• Pluggable system services:– Memory management– File processing– Directory processing

• Examples

Page 10: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

String Management

• MpvBuffer

• MpvChar (unicode)

• MpvString

Page 11: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

MD5 and JPEG

• MPV makes use of MD5 checksums as contentID• The toolkit includes a placeholder implementation

of MD5• The MPV Still asset can include JPEG2000

compliant metadata for the dimensions. This toolkit includes a placeholder implementation of the JPEG extraction code for dimensions.

• This code can be replaced by platform specific implementations where available.

Page 12: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Simple XML Objects

• MpvXml: representation of xml element

• MpvProperty: representation of xml attribute

• MpvXmlList: representation of xml childlist

Page 13: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

MPV Reader

• Implements MPV Algorithm for directory search for manifest.– 3 levels of directory and specific naming

patterns– MpvFindMpvFileSpec

Page 14: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

MPV Parsing

• MpvParse() is a wrapper around the actual XML parser. Supported parsers are:– Expat– Unicoi micro parser

• Returns an in-memory representation of the MPV file

Page 15: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Minimizing run-time memory usage

• Metadata can dramatically increase the size of the in-memory representation

• You can prune the metadata by specifying the RestrictMetadata flag to the parser.

• FUTURE: we will support an asset at a time interface that provides fine-grained control over run-time memory footprint

Page 16: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

In-Memory Representation

Page 17: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

FileManifest Structure

• Top-level data structure for in-memory representation.

Page 18: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Raw XML

• MPV supports “other” content at several levels in the data model:– Manifest element Level

• Arbitrary XML

• Arbitrary Metadata

• Structured Metadata

• Additional attributes

– Asset Level• Arbitrary Metadata

• Structured Metadata

• Additional attributes

• Attributes are maintained as moreAttributes

• Elements are maintained as moreXml

Page 19: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Processing In-Memory Representation

• Rulesets

• You can defined new rulesets

• SDK comes bundled with a large number of Rulesets

• Provide convenience interface to extracting subsets of in-memory representations.

Page 20: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Accessor Functions

• Accessors package up common filtering and transformation operations on the in-memory representation.

• There are a large number of accessors for filtering out a subset of the assets.

•MpvFindAssets()

•MpvFindAlbumAssets()

•MpvFindIndexedAlbumAssets()

•MpvFindMarkedAssets()

•MpvFindRootAssets()

•MpvFindSlideshowForeground()

•MpvFindSlideshowBackground()

•MpvFindAlbumSlideshowForeground()

•MpvFindAlbumSlideshowBackground()

•MpvFindIndexedAlbumSlideshowForeground()

MpvFindIndexedAlbumSlideshowBackground()

Page 21: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Rulesets

• Rulesets provide a convenient declarative approach to specifying rendition replacement policies.

• A number of “typical” Rulesets are available:– MpvRuleSetInitTyp()

– MpvRuleSetInitTypThumbnailStills()

– MpvRuleSetInitTypScreenStills()

– MpvRuleSetInitTypPrintStills()

Page 22: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Examples

Page 23: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

minApp Walkthrough

Page 24: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

showTest Walkthrough

Page 25: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

musicPlayback Walkthrough

Page 26: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Futures

• Incremental processing– Manifest Start tag– Everything before AssetList– Asset at a time from AssetList

• Deterministic Writing– Depth first

• In-Memory construction of Manifest

Page 27: MPVTools SDK Tutorial October 13 th, 2003 OSTA Optical Storage Symposium.

Todo

• Flesh out Accessor functions section


Recommended