The application programming model for an OS/2 multimedia application is an extension of the OS/2 Presentation Manager programming model, providing both messaging and procedural programming interfaces. OS/2 multimedia API procedures allow applications to manage data and control devices while messages from the OS/2 multimedia system notify applications of asynchronous events.

The media control interface provides a view of the OS/2 multimedia system to both application developers and users that is similar to that of a video and audio home entertainment system. Operations are performed by controlling the processors of media information, known as media devices. Media devices can be internal or external hardware devices, or they can be software libraries that perform a defined set of operations by manipulating lower-level hardware components and system software functions.

Multiple media devices can be used in an operation. For example, the playback of an audio compact disc can be implemented by coordinating the control of a compact disc player and an amplifier-mixer device.

The Media Device Manager (MDM) shown in the following figure provides resource management for media devices and enables the command message and command string interface. The Media Device Manager provides device independence to an application developer.

 ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄ¿
 ³   Data    ³ ³           ³ ³   Media   ³ ³           ³ ³  Volume   ³ ³    CD     ³ ³  Digital  ³
 ³Converter  ³ ³  Install  ³ ³  Players  ³ ³   Setup   ³ ³  Control  ³ ³  Player   ³ ³   Audio   ³
 ÀÂÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÙ ÀÄÂÄÄÄÄÄÄÄÄÄÙ
  ³                  ³             ³             ³             ³             ³         ³           Applications
 -³- - - - - - - - - ³ - - - - - - ³ - - - - - - ³ - - - - - - ³ - - - - - - ³ - - - - ³ - - - - - - - - - - -
  ³    ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  ³    ³                      Media Device Manager Interface Layer                                           ³
  ³    ÀÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÙ
  ³           ³              ³              ³              ³              ³              ³              ³
  ³     ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄÄÄÄ¿
  ³     ³ CD-ROM/XA  ³ ³  CD Audio  ³ ³Wave Audio  ³ ³  Sequencer ³ ³Digitalvideo³ ³ Amp/Mixer  ³ ³ Videodisc  ³
  ³     ³  Driver    ³ ³   Driver   ³ ³  Driver    ³ ³    Driver  ³ ³  Driver    ³ ³  Driver    ³ ³   Driver   ³
  ³     ÀÄÄÄÄÄÄÄÄÄÂÂÄÙ ÀÄÂÄÄÄÄÄÄÂÄÄÄÙ ÀÄÄÄÄÄÄÄÄÂÄÄÄÙ ÀÄÄÄÄÂÄÄÄÄÄÄÄÙ ÀÄÄÄÂÄÄÄÄÄÄÄÄÙ ÀÂÄÂÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÂÄÄÄÄÄÄÙ
  ³ Application   ³³     ³      ³              ÀÄÄÄÄÄÄÄÄ¿ ³             ³           ³ ³                 ³
  ³     or        ³³     ³      ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÙ           ³ ³                 ³
  ³ Media Driver  ³ÀÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄ¿         ³
  ³               ³    ÚÄÙ                          ³ ³ ³ ³ ³ ³                               ³         ³
 ÚÁÄÄÄÄÄÄÄÄ¿      ³    ³  Stream Handlers           ³ ³ ³ ³ ³ ³                           ÚÄÄÄÁÄÄÄÄ¿    ³
 ³  MMIO   ÃÄÄÄ¿  ³    ³  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿          ³ ³ ³ ³ ³ ³      ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿     ³ Audio  ³    ³
 ³ Manager ³   ³  ³    ³ÚÄ´ File System  ³          ³ ³ ³ ³ ³ ³    ÚÄ´    Audio     ÃÄÄÄÄÄ´  VSD   ³    ³
 ÀÄÄÄÄÂÄÄÄÄÙ   ÀÄÄÅÄÄÄÄÅ´ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ          ³ ³ ³ ³ ³ ³    ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ     ³        ³    ³
 ÚÄÄÄÄÁÄÄÄÄÄÄÄÄÄ¿ ³    ³³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿          ³ ³ ³ ³ ³ ³    ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿     ÀÄÄÄÂÄÄÄÄÙ    ³
 ³I/O Procedures³ ³    ³³ ³ Multi-track  ÃÄ¿   ÚÄÄÄÄÁÄÁÄÁÄÁÄÁÄÁ¿   ÃÄ´   Memory     ³         ³         ³
 ÀÄÄÄÄÂÄÄÄÄÄÄÄÄÄÙ ³    ³³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³   ³ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³   ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ         ³         ³
      ³           ³    ³³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÃÄÄÄÅ´ Sync/Stream ³³   ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿         ³         ³
      ³           ³    ³ÀÄ´   Video      ÃÄ´   ³³ Manager DLL ÃÅÄÄÄÅÄ´  CD-ROM/XA   ³         ³         ³
      ³           ÀÄÄÄ¿³  ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³   ³ÀÄÄÄÄÄÄÂÄÄÄÄÄÄÙ³   ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ         ³         ³
      ³               ³³  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³   ³       ³       ³   ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿         ³         ³
   ÚÄÄÁÄÄÄÄÄÄÄÄ¿      ³³  ³  MIDI Mapper ÃÄÙ   ³       ³       ³   ÀÄ´    CD/DA     ³         ³         ³  RING 3
   ³File System³      ³³  ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ     ³       ³       ³     ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ         ³         ³  DLL
- -³- - - - - -³- - - ³³- - - - - - - - - - - -³- - - -³- - - -³- - - - - - - - - - - - - - - ³ - - - - ³- - - - -
   ³FAT/HPFS/XA³      ³³                       ³ÚÄÄÄÄÄÄÁÄÄÄÄÄÄ¿³                              ³         ³  RING 0
   ÀÄÂÄÄÄÄÂÄÄÂÂÙ      ³³                       ³³ Sync/Stream ³³                              ³         ³  PDD
     ³    ³  ³ÀÄÄÄÄÄÄ¿³³                       ³³ Manager PDD ³³                              ³         ³
 ÚÄÄÄÁÄÄÄ¿³ÚÄÁÄÄÄÄÄ¿ ³³³                       ³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³                              ³ IOCtl   ³
 ³ Hard  ³³³  R/W  ³ ³³³                       ÀÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÙ                              ³         ³
 ³ Disk  ³³³Optical³ ³³³                               ³                                      ³         ³
 ³ PDD   ³³³  PDD  ³ ³³³                               ³                                      ³         ³ IOCtl
 ÀÄÂÄÄÄÄÄÙ³ÀÄÂÄÄÄÄÄÙ ³³³                               ³                                      ³         ³
   ³      ³  ³       ³³³                           ÚÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿                ³         ³
   ³      ³  À¿      ³³³                       ÚÄÄÄ´Ring 0 Stub Device DriverÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´         ³
   ³      ³   ³      ³³³                       ³   ÀÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÙ                ³         ³
   ³ÚÄÄÄÄÄÁÄÄ¿³  ÚÄÄÄÁÁÁÄÄÄ¿                   ³   ÚÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄ¿                 ³         ³
   ³³Diskette³³  ³CD-ROM/XA³               IDC ³   ³ÚÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄ¿³                 ³         ³
   ³³   PDD  ³³  ³   PDD   ³                   ³   ³³Common Audio InterfaceÃÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ         ³
   ³ÀÄÂÄÄÄÄÄÄÙ³  ÀÄÄÄÂÄÄÄÄÄÙ                   ³   ³ÀÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÙ³                           ³
   ³  ³       ³    ÚÄÁÄÄÄÄÄÄÄÄÄÄ¿              ³   ³     ÚÄÄÄÄÄÁÄÄÄÄÄ¿      ³                       ÚÄÄÄÁÄÄÄ¿
   ³  ³       ³    ³Generic SCSC³              ³   ³     ³ OEM Audio ³      ³                       ³ OS/2  ³
   ³  ³       ÀÄÄÄÄ´     DD     ³              ÀÄÄÄÅÄÄÄÄÄ´   Device  ³      ³                       ³  COM  ³
   ³  ³            ÀÄÄÄÄÄÂÄÄÄÄÄÄÙ                  ³     ³   Driver  ³      ³                       ³  PDD  ³
   ³  ³                  ³                         ³     ÀÄÄÄÄÄÂÄÄÄÄÄÙ      ³                       ÀÄÄÄÂÄÄÄÙ
   ³  ³                  ³                         ÀÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÙ                           ³
- -³- ³ - - - - - - - - -³- - - - - - - - - - - - - - - - - - -³- - - - - - - - - - - - - - - - - - - - ³- - - -
   ³  ÀÄÄÄÄÄÄÄÄ¿         ÃÄÄÄÄÄÄÄÄÄ¿                           ³                                        ³
   Á           Á         Á         Á                       ÚÄÄÄÁÄÄÄÄÄ¿                                RS-232
  Hard      Diskette  Optical   CD-ROM                     ³OEM Audio³
  Drive      Drive     Drive     Drive                     ÀÄÄÄÄÄÄ¿  ³                                    Physical
                                                                  ÀÄÄÙ                                    Devices

Refer to the OS/2 Multimedia Subsystem Programming Guide for information on multimedia subsystem programming including media drivers and stream handlers.

To assist you in creating a standardized user interface for your OS/2 multimedia application, OS/2 provides multimedia window controls, which have been implemented in OS/2 multimedia applications such as Volume Control. See the following figure.

Graphic buttons are two-state buttons that can be toggled up and down. They can display text, or graphics, or both. They can also be animated. Their versatility makes graphic buttons ideal to use for device control panels.

Circular sliders lend realism to your panel by providing familiar-looking dials. The dials are easy to operate and do not hog screen real estate.

Secondary windows provide a sizeable dialog window to contain your multimedia device controls.


[Back] [Next]