分类:
2007-05-08 19:01:05
[27Mar2006 Revision]
Helix DNA Client has been deployed on Windows, UNIX®, and Mac® OSX systems, and provides the core media engine functionality for RealPlayer and Rhapsody. In the mobile space, it is the multimedia framework of media players on millions of handsets from a number of handset manufacturers.
Helix DNA Client is a part of the Helix DNA platform, the first open multi-format platform for digital media creation, delivery, and playback. The purpose of the Helix DNA Client is to play back audio and video streams. A stream is a flow of a single type of data, such as the sound track in a video. Helix DNA Client reads a stream from the network or a file, and plays the stream as it is being read. To make smooth playback possible, the Helix DNA Client buffers the network packets as they arrive.
Helix DNA Client is based on the Component Object Model (COM) binary standard, similar to the COM utilized extensively in Microsoft® Windows®-based applications. However, Helix DNA Client diverges from the COM standard to simplify cross-platform development. Client components implement interfaces to communicate with the client core, and the client core implements interfaces to provide services for the components.
In general, a Helix DNA Client consists of two basic parts: the client core and plug-ins. In addition, a top-level client can also be added to supply a user interface that communicates with the client core and plug-ins. The following figure shows the basic Helix DNA Client architecture.
The client core is the part of the Helix DNA Client that handles data transport between the client and Helix Universal Server. The client core consists of specific client core components and client core services.
The client core components include the client engine, the player object, and the source object. The client engine provides an entrance to the media engine and initializes cross-platform services (such as audio, video, and network services). The player object starts a presentation, controls the playback of the presentation, sends out presentation statistics, and manages the source object.
The source object is the base from which the file source and network source derive. A file source is created whenever the source of a presentation is a local file (file://) or originates from an HTTP URL (http://). The file source manages loading, initializing, and use of file format and file system plug-ins. In addition, it initializes a rendering plug-in for the media stream. A network source is created whenever the source of a presentation originates from an RTSP URL (rtsp://) or PNM URL (pnm://). The network source initializes the network protocols, controls network transport switching, and handles redirection and reconnnection functionality. In addition, it also initializes a rendering plug-in for the media stream.
Client core services allow client components and plug-ins to use system hardware without concern for the specifics of the hardware. In this way, client components and plug-ins can access device- independent, cross-platform client core services rather than accessing the system hardware directly. In addition, client core services include miscellaneous services that manage client plug-ins, threads, and the client registry.
The client core provides the following services:
Provides device-independent, cross-platform features used by audio rendering plug-ins. The plug-in can use audio services without concern for the specifics of the audio hardware. Audio services provides play back synchronization, mixing and resampling functions, crossfading between audio streams, volume control, and so on.
Provides device-independent, cross-platform features used by video rendering plug-ins. As with audio services, the plug-in need not concern itself with the specifics of the video hardware. Video services include window management (geometry, position, and z-order), alpha-blending, transition, and overlay, and access to keyboard and mouse events.
Provides cross-platform support for managing network communications. Any Helix component can use network services to create the appropriate transport connections (either TCP or UDP) for reading and writing data. In addition, network services includes DNS lookup functionality.
Client core services also include some miscellaneous services for managing client components. The plug-in handler loads and unloads plug-ins, categorizes plug-ins, and returns handles (or instances) of plug-ins. The core also provides cross-platform thread abstraction, thread management (resume, suspend, and exit) and mutex/lock. In addition, the core handles the abstraction of storing or sharing non-persistent information, using the client registry to store information and statistics to share the information.
A Helix DNA Client, like the other components of the Helix DNA platform, uses plug-ins to compartmentalize specific actions in the client. A plug-in is a dynamic link library (DLL) on Windows- based machines and a shared library on UNIX or Mac OSX. Each plug-in provides a specific service in the Helix DNA client. During the client's initialization, all plug-ins associated with the client are loaded and initialized. Once the plug-in is loaded and initialized, it is able to receive requests from the client core to perform specific operations. The type of operations performed depends entirely on the COM interfaces implemented by the plug-in.
The following types of plug-ins are available to a Helix DNA client:
Provides access to different types of data storage media, such as a computer's local disks or a database. A file system plug-in creates a file object that components such as file format plug-ins use to access the requested file's data. These system-standard file objects thereby create a virtual file system for accessing file data without regard to data location or storage format.
Converts a data type from its native format to a packet format that can be streamed. File format plug-ins can also include adaptive stream management (ASM) rules to change stream data, such as bandwidth, rating, and language.
Receives streamed packets and renders them for playback of a given data type on the Helix DNA Client computer. Every file format plug-in has a corresponding rendering plug-in. The rendering plug-in utilizes the audio and video services provided by client core.
Any plug-in that is not a file system, file format, or rendering plug-in is referred to as a generic plug-in. Examples of a generic plug-in are a view source plug-in, which displays SMIL markup and clip information for the content it's playing, and a visualization plug-in, which displays audio information in various visual formats.
A Helix DNA Client generally contains at least one rendering plug-in to play back a media stream, at least one file format plug-in to convert data into a stream of packets, and a file system plug-in to read data from a local file.
A single data type (such as RealAudio or RealVideo) is handled by a matching file format plug-in and rendering plug-in. This pair of plug-ins is referred to generically as a data type plug-in.
A top-level client provides an optional user interface that communicates with the client core and the client's plug-ins. The top-level client can manipulate or get the status of a presentation , retrieve a username and password from the client's user, add and manage a window (which is called a site in the Helix DNA architecture), and so on.
A Helix DNA Client's basic function is to play back streams. A stream can either originate from a server on an external network, a server on an internal network, or from a local file.
The following figure shows the client data flow if the stream originates from a server on an external or internal network.
To play back a stream over an external or internal network: |
The following figure shows the client data flow if the stream originates from a local file.
To play back a stream from a local file: |
To learn more about Helix DNA Client components, see the following sections of the Helix Community client code:
CreateEngine
and CloseEngine
HXPlayer
: HXClientEngine::CreatePlayer
and HXClientEngine::ClosePlayer
See client/core/pub/hxcleng.h
for class and method definitions, and client/core/hxcleng.cpp
for the client engine implementation.
HXPlayer
)
HXPlayer::OpenRequest
or HXPlayer::OpenURL
HXPlayer::Begin
, HXPlayer::Pause
, HXPlayer::Seek
, and HXPlayer::Stop
IHXClientAdviseSink::OnBegin
, IHXClientAdviseSink::OnPause
, IHXClientAdviseSink::OnStop
, and so on
HXSource
See client/core/pub/hxplay.h
for class and method definitions, and client/core/hxplay.cpp
for the player object implementation.
HXSource
)
HXFileSource
: local file or HTTP playback (file:// or http://)
Instantiates file system and file format plug-ins
Initializes rendering plug-ins
HXNetSource
: network playback (rtsp://)
Initializes protocols (RTSPProtocol)
Initializes rendering plug-ins
See client/core/hxbsrc.h
for the source object class and method definitions, and client/core/hxflsrc.cpp
for the file source (HXFileSource
) implementation for local playback, and client/core/hxntsrc.cpp
for the network source (HXNetSource
) for streaming media.
See the files in client/audiosvc
for definitions and audio services implementation.
See the files in client/videosvc
for definitions and video services implementation.
See the files in client/netwksvc
for definitions and network services implementations.