previous next

Chapter 1: RealSystem G2 SDK

RealSystem G2 extends RealNetworks' expertise with RealAudio and RealVideo to provide a complete platform for streaming datatypes and building streaming media applications. RealSystem can stream virtually any datatype from its native file format, including audio, video, images, MIDI, animation, and VRML.

RealSystem provides transparent streaming from any data source, whether a local file system, a database, or a live broadcast. With RealSystem, multimedia content creators can easily combine any number of data formats into a multimedia presentation streamed robustly over any network. Users can receive the presentations in RealPlayer, Web browsers, or custom applications.

The RealSystem G2 Software Development Kit (SDK) provides developers with the public interfaces used to extend and customize RealSystem G2. If you have not done so already, visit the RealNetworks DevZone to download the RealSystem G2 SDK for your platform. RealNetworks designed this SDK for developers who need to do any of the following:

RealSystem G2 Components

RealSystem G2 includes RealServer G2 and the RealNetworks clients: RealPlayer G2 and RealPlayer Plus G2. The open RealSystem architecture lets you develop plug-ins that extend the capabilities of RealServer or a RealSystem client. RealServer and RealSystem clients also support open streaming protocols, allowing them to interoperate with other standards-based data streaming systems.

Additional Information
Check http://www.real.com for information about the commercial versions of RealServer G2, RealPlayer G2, and RealPlayer Plus G2.

RealServer

RealServer G2, the latest generation of server technology from RealNetworks, runs on Windows NT and many UNIX platforms. It supports broadcasting by multicast or unicast, using TCP/IP, UDP/IP, UDP resend, or HTTP. The open architecture of RealServer G2 provides useful features such as these:

RealSystem Client

RealPlayer G2 and RealPlayer Plus G2 are the RealNetworks client applications designed to render RealSystem streaming datatypes on Macintosh, Windows, and UNIX platforms. These products ship with a Netscape Plug-in and ActiveX Control that let you play presentations back in the Web browser without launching RealPlayer as a separate application.

Note
For information on Web page playback, see RealSystem G2 Production Guide, available as HTML or PDF at http://service.real.com/help/library/index.html.

As with RealServer, the RealSystem client is based on an open architecture that lets you customize client features or add client functionality to an application. As explained in "Chapter 20: Top-Level Client", sample code and documentation explain how to add RealSystem client functionality to an application:

Protocol Support

When communicating with RealPlayer G2, RealServer G2 by default uses Real Time Streaming Protocol (RTSP) as its control protocol and RealNetworks RDP as its proprietary packet protocol. RealSystem also supports the open-standard RTP packet protocol, enabling RealServer and RealSystem clients to interoperate with RTP-based servers or clients. Both RealServer G2 and the RealPlayer G2 client also support RealNetworks PNA proprietary protocol for backwards compatibility with earlier versions of RealSystem.

Streaming Protocols
Server Client Control Protocol Packet Protocol
RealServer G2 RealPlayer G2 RTSP RDP
RealServer G2 RTP-based client RTSP RTP
RTP-based server RealPlayer G2 RTSP RTP
RealServer G2 RealPlayer 3.0 to 5.0 PNA PNA
RealServer 3.0 to 5.0 RealPlayer G2 PNA PNA

SMIL Control Language

Multimedia presentations controlled through RTSP are defined with Synchronized Multimedia Integration Language (SMIL), an open language based on SGML. A SMIL file lists the locations of the media files (video, audio, animation, text, and so on) that make up the presentation, specifying how and when each media file plays. You can use a SMIL file to stream multiple tracks simultaneously, stream tracks in a given sequence, and stream different versions of tracks based on feedback by the client.

The World Wide Web Consortium (W3C) has released the SMIL 1.0 specification as a W3C Recommendation. For information on SMIL mark-up, please see RealSystem G2 Production Guide available at http://service.real.com/help/library/index.html.

Plug-ins

The heart of RealSystem is the plug-in architecture of RealServer and RealSystem clients. This architecture lets RealServer stream any datatype, and also lets you customize RealServer features. With this SDK, you can build these types of plug-ins:

On Windows, RealSystem plug-ins are 16-bit or 32-bit DLLs. On UNIX and Macintosh they are shared libraries. Because RealSystem provides several cross-platform services, the plug-ins you develop will require little or no code specific to the operating system.

Streaming Files from RealServer

The most common example of RealSystem in action is streaming files from RealServer to RealPlayer when the user clicks a link in a Web page. The following figure explains the steps that take place to make this happen.

File Streaming from RealServer to RealPlayer

  1. In a Web page, a user clicks a link to a RealSystem SMIL file. The Web page creator sets up the link to point to RealServer, use RealServer's Ramgen utility, and communicate through HTTP. The RealSystem G2 Production Guide available at http://www.real.com explains how to set up these Web page links.

  2. Through its Ramgen utility, RealServer generates a Ram file with the extension .ram (for presentations played in RealPlayer) or .rpm (for presentations played in the Web page). This Ram file lists the location of the SMIL file. RealServer downloads the Ram file to the browser.

  3. The RealPlayer installation automatically configured RealPlayer as a helper application that launches when the browser receives a Ram file. Using the Ram file, RealPlayer requests the SMIL file from RealServer.

  4. RealServer streams the SMIL file, which lists the URLs for presentation files.

  5. RealPlayer uses information in the SMIL file to request the streaming presentation files from RealServer. Note that all communication to RealServer comes from RealPlayer. Neither the Web browser nor the Web server communicates with RealServer directly.

  6. Based on the URLs of the requested media files, RealServer determines which file system plug-ins to use. In most cases the files are on a local disk and RealServer uses its standard file system plug-in. If a file is in a data source such as a database, however, RealServer loads a different file system plug-in. Because of its open, extensible file system plug-in architecture, RealServer can easily serve files stored in any type of data source in any location.

  7. The file system plug-in locates the files requested in the URL.

  8. The file system plug-in creates file objects that can read the files' data. These are standard system objects that use RealSystem open interfaces.

  9. Based on the files' MIME types, RealServer determines the file format plug-ins to use. Each file format plug-in is designed to create streaming packets for a specific datatype.

  10. The file format plug-ins interact with the file objects to get file data, passing RealServer stream headers and stream packets.

  11. RealServer streams the packets to RealPlayer using RTSP/RDP.

  12. Based on the streams' MIME types, RealPlayer loads the appropriate rendering plug-ins (the counterparts to the file format plug-ins) and passes them the data to be rendered. Using RealSystem interfaces, rendering plug-ins display visual data in RealPlayer windows or play back audio data using Audio Services.

The flexibility of RealSystem allows many variations on this basic scenario:

Delivering Multiple Streams

Multimedia presentations streamed by RealServer typically consist of more than one datatype. Each datatype can have more than one stream. AVI, for example, uses separate streams for video and audio data. The sources for streamed data may be separate files specified within an SMIL file. Or they may be combined in a single file of a container datatype, such as ASF or RealMedia File Format (RMFF).

Multiple Streams

This figure shows three files that make up a multimedia presentation. Files A and C each contain a visual datatype rendered in a client window. File B contains audio data played on the client computer's sound system. The RealSystem client launches a separate rendering plug-in for each datatype, ensuring that the three parts stay synchronized to their single timeline during playback.

Streaming with HTTP

RealSystem clients can receive files from a Web server. As shown in the following figure, clients have an HTTP file system plug-in that allows them to communicate with Web servers. Clients also use the file format plug-in for the streamed datatype. Because RealServer and RealSystem clients share the same architecture, file format plug-ins work on either the server or client side.

Web Server "Streaming"

HTTP streaming provides a reasonable method of delivering short clips from a Web server using the HTTP protocol. It is not as robust as RealServer streaming, however, and it lacks features such as searching. When the user seeks forward in the presentation timeline, for example, the client stops rendering the datatype but continues to process the data as it comes in at its normal rate. Rendering resumes once the streamed data reaches the timeline position designated by the seek.

Playing Local Files

A RealSystem client can also play back files on the local machine. It uses its standard file system plug-in to access the local disk, and uses file format and rendering plug-ins for the file datatype to play the file. As noted previously, file format plug-ins work on either the server or client side.

Client Local File Playback

RealPlayer Plus G2 lets the user record a presentation streamed by RealServer. The user can then play the recorded file back locally. Other RealSystem clients can support this feature as well. A RealSystem content creator can override this feature, however, and prevent the recording of, for instance, a pay-per-view video.


Copyright © 2000 RealNetworks
For technical support, please contact supportsdk@real.com.
This file last updated on 05/17/00 at 12:50:15.
previous next