Asset Manager Service

Introduction

The asset manager service is an essential part of the DVR framework of the KreaTV IP-STB platform. The service keeps a database of available media assets and it also provides applications with functions for creating, deleting and managing assets. Assets are stored in a permanent mass storage unit, such as a hard drive.

Overview

All recorded media streams are stored in media assets, which are managed by the asset manager service. To implement DVR, an application uses the asset manager service to create an asset, a media recorder to record the media stream, and a media player for playback of the recorded asset.

On KreaTV IP-STB units with no permanent mass storage, the media repository service will be unavailable to applications.

Using the Service

Media assets are database entities which are created by the media repository service on request from applications. An asset is usually used for storing media stream data. Applications may also store metadata for the asset. All asset data will remain after a reboot of the KreaTV IP-STB.

Creating Assets

When creating an asset, the asset manager service selects the ID to be used in all subsequent references to the new asset. Several applications may be creating, using and deleting assets. Metadata is a good way for an application to add an identifier to the assets it creates.

Deleting Assets

An asset may be deleted when no locks exist on the asset. Note that any application may delete any asset. Assets are removed immediately. However, the storage occupied by the asset is not released immediately. If the storage is full, it may take a few seconds before new media streams can be recorded.

Using Properties

The asset manager service provides applications with the possibility to read and write asset metadata properties. Applications may define their own properties, but it is recommended to use a standard property defined by KreaTV if such a property exists. Properties starting with "system." are defined by KreaTV and can be read but not set by the application. Properties starting with "info." are defined by KreaTV and can be both read and set by the application. For the standard properties, it is recommended to use the constants declared in the IToiAssetManagerService interface.

Run a Query

An application retrieve assets by running a query that matches a number of query conditions against each asset. An empty list of query conditions puts no restrictions at all on the asset and will provide the entire set of assets. Since the query may take a while to execute it is handled as an asynchronous method using the generic IToiOperationManager interface. Once a result is available the matching assets can be retrieved using IToiAssetManagerService::GetAssetInfoResult().

See also: TOI Asset Manager Service Interface