About This Guide

The Digital Media Programming Guide describes the Silicon Graphics® digital media development environment (DMdev) software. The DMdev is a family of libraries that provides application program interfaces (APIs) for digital media I/O, file operations, playback, and conversions. This guide describes the libraries and gives technical information on their design and proper use. A companion guide, Digital Media Programmer's Examples, contains code samples based on the DMdev to assist your development efforts. It can be viewed online using the IRIS InSight viewer.

Silicon Graphics also supplies end user desktop media tools, which use the DMdev. Tools for capturing, editing, recording, playing, compressing, and converting audio data and images, and control panels, such as the Video Panel and the Audio Control Panel, are described in the Digital Media Tools User's Guide, which you can view both documents from the InSight viewer.

What This Guide Contains

In the Digital Media Programming Guide:

Chapter 1, “Introduction to the Digital Media Libraries” gives an overview of the digital media development environment.

Chapter 2, “Digital Media Essentials” provides a foundation for understanding digital media data characteristics. It reviews how data is represented digitally and then explains how to express data attributes in the Digital Media Libraries.

Chapter 3, “Digital Media Parameters” explains how to use the digital media data structures that facilitate data specification and setting, getting, and passing parameters.

Chapter 4, “Digital Media I/O” describes using the digital media library routines that facilitate real-time input and output between live media devices.

Chapter 5, “Digital Media Buffers” explains the Digital Media buffers (DMbuffers) real-time visual data transport facility. The facility establishes a unified approach to providing data flow between live video devices.

Chapter 6, “Digital Media Data Conversion” tells how to use the digital media conversion libraries to implement data format conversion in your application.

Chapter 7, “Digital Media Audio File Operations” explains how to use the Audio File (AF) Library for reading and writing audio disk files, and for controlling the format of audio data buffers.

Appendix A, “Digital Media Conversion Libraries” contains the APIs of the individual image and audio conversion libraries. These libraries are not discussed in detail, but reference pages to the member functions are cited.

How to Use This Guide

This guide is written for C language programmers that have some knowledge of digital media concepts. Readers unfamiliar with the basic concepts can refer to Chapter 2, “Digital Media Essentials,” or to the “Suggestions for Further Reading” listed below.

Where to Start

If you're not sure which library to use for a certain application, read Chapter 1, “Introduction to the Digital Media Libraries,” to get a brief overview of the uses and features of each library.

If you want to find some code that does what you want your application to do, browse through the Digital Media Programmer's Examples online book to locate a sample program that performs a particular task.

Style Conventions

These style conventions are used in this guide:


functions, routines


arguments, variables, commands, program and file names, book titles, and emphasis


function prototypes, sample code

Courier Bold 

user input entered from the keyboard

How to Use the Sample Programs

Code fragments and complete sample programs are used throughout this guide to demonstrate programming concepts. Source code for the sample programs is provided in the /usr/share/src/dmedia directory, which is further organized in directories according to topic.

README files in each directory provide descriptions of the sample programs and instructions for compiling and running them. You must have the IRIS Development Option, dev, and the C language software, c, loaded before you can compile the sample programs. Use the versions command to find out which software is loaded on your system. See the release notes for each library for additional system software requirements for those libraries.

You should copy any program that you intend to modify to your home directory before making any changes.

Suggestions for Further Reading

This section lists references containing information on programming topics beyond the scope of this guide, which you may find helpful for developing your digital media application. Additional reference materials are listed in the introductory chapters for each library.

References for Using Digital Media with Other Libraries

If you are planning to integrate your digital media application with calls from the OpenGL, IRIS Graphics Library (GL) or X Window System application, you may want to consult the following manuals:

  • OpenGL Programming Guide, by Jackie Neider, Tom Davis, and Mason Woo, Addison-Wesley, 1994

  • OpenGL Reference Manual, by Jackie Neider, Tom Davis, and Mason Woo, Addison-Wesley, 1994

  • Graphics Library Programming Guide, by Patricia McLendon Creek, Silicon Graphics, 1992

  • Graphics Library Programming Tools and Techniques, by Patricia McLendon Creek and Ken Jones, Silicon Graphics, 1993

  • IRIS IM Programming Notes, by Patricia McLendon Creek and Ken Jones, Silicon Graphics, 1993

  • The X Window System, Volume 1: Xlib Programming Manual, O'Reilly and Associates, 1990

  • The X Window System, Volume 4: X Toolkit Intrinsics, Motif Edition, O'Reilly and Associates, 1990

  • X Window System: The Complete Reference to Xlib, X Protocol, ICCCM, XLFD, Third Edition, by Robert W. Scheifler and James Gettys, Digital Press, 1992

  • X Window System Toolkit: The Complete Programmer's Guide and Specification, Paul J. Asente and Ralph R. Swick, Digital Press, 1992

References for Adding a User Interface to Your Program

The Digital MediaLibraries don't impose any particular user interface (UI), so you can use any graphical UI toolkit, such as IRIS IM to build your interface. IRIS IM is Silicon Graphics' port of the industry-standard OSF/Motif software. Consult these OSF/Motif manuals for more information:

  • OSF/Motif Programmer's Guide, Revision 1.2, Prentice-Hall, 1993

  • OSF/Motif Programmer's Reference, Revision 1.2, Prentice-Hall, 1992

  • OSF/Motif Style Guide, Revision 1.2, Prentice-Hall, 1992

Technical References and Standards

The references listed below are some of the more important standards mentioned throughout this book. For more complete listings, you can check the Web sites of organizations such as the Society of Motion Picture & Television Engineers at http://www.smpte.org/, and the International Telecommunication Union at http://www.itu.ch/index.html.

SMPTE Standard for TelevisionComposite Analog Video SignalNTSC for Studio Applications, SMPTE 170M-1994, The Society of Motion Picture and Television Engineers

SMPTE Standard for Television10-Bit 4:2:2 Component and 4fsc NTSC Composite Digital SignalsSerial Digital Interface, SMPTE 259M-1993, The Society of Motion Picture and Television Engineers

SMPTE Standard for TelevisionComponent Video Signal 4:2:2 - Bit-Parallel Digital Interface, SMPTE 125M-1995, The Society of Motion Picture and Television Engineers

4:2:2 Digital Video: Background and Implementation Revised Edition, The Society of Motion Picture and Television Engineers, l995

Recommendation ITU-R BT.601-5—Studio Encoding Parameters of Digital Television for Standard 4:3 and Wide-Screen 16:9 Aspect Ratios, The International Telecommunication Union, 1995

JPEG Still Image Data Compression Standard, by William B. Pennebaker and Joan L. Mitchell, Van Nostrand Reinhold, 1993