This chapter provides reference information about the data structures used by the Multimedia library.
These structures are defined in the Addon Library, and used by the Multimedia library:
These structures are defined by the Multimedia library:
This structure contains mime information. An addon uses AOMimeInfo_t to let an application know what mimetypes it can process.
The structure contains at least the following members:
- char *mimetype
 
- The mimetype (type and subtype) supported (e.g. image/jpeg).
 
- char *extensions
 
- A comma-separated list of file extensions for the mimetype (e.g. jpg,jpeg).
 
- char *description
 
- A description of the mimetype.
 
This is the resource structure your addon has to use to give access to internal resources.
The structure contains at least the following members:
- char *name
  
 
- The name of the resource.
  
 
- char *description
  
 
- A short description of the resource.
  
 
- void *value
  
 
- A pointer to the actual value of the resource.
  
 
- void *info
  
 
- A pointer to typing information (such as a range, list of items, etc.).
  
 
- int32_t type
  
 
- The resource type, which is one of:
    
- AOR_TYPE_LONG  --  value points to a int32_t, and info points to a three-int32_t array containing minimum, maximum, and increment values.
      
 
- AOR_TYPE_LONGLONG  --  value points to a int64_t, and info points to a three-int64_t array containing minimum, maximum, and increment values.
      
 
- AOR_TYPE_FLOAT  --  value points to a float, and info points to a three-float array containing minimum, maximum, and increment values.
      
 
- AOR_TYPE_STRING  --  value points to an allocated string buffer, and info points to
      an int32_t that contains the maximum length of the string.
      
 
- AOR_TYPE_RADIO  --  a radio button; value points to an int32_t indicating the index of the selected button, and info points to a structure containing an int32_t for the count value, followed by count char * pointers to button labels.
      
 
- AOR_TYPE_TOGGLE  --  a toggle button; value points to an int32_t, with 0 indicating the button isn't selected, and 1 indicating it is. There is no info pointer requirement.
      
 
- AOR_TYPE_POINTER  --  a pointer; value is the actual pointer.
   
 
   You can OR the type member with one or more of the following permission values. These values are used when automatically generating a GUI for a DDL's resources, for example:
   
- AOR_TYPE_READABLE  --  readable using resource functions.
     
 
- AOR_TYPE_WRITABLE  --  writable using resource functions.
     
 
- AOR_TYPE_ENABLED  --  enabled.
     
 
- AOR_TYPE_VISIBLE  --  visible.
   
 
 
This structure defines a description of a media format. Use the mtype field to determine the output type (audio or video), as well as its compressed state. This structure provides a quick way to determine if you need to hook up a given channel to a decoder, or to a final output if you're playing back media.
Unless you're writing your own filters, you'll never have to touch fourcc or u.
This structure has the following members:
- uint32_t mtype
  
 
- A flag indicating media type, which can be one of:
  
- MEDIA_TYPE_IMAGE
    
 
- MEDIA_TYPE_VIDEO
    
 
- MEDIA_TYPE_AUDIO
  
 
  These flags can be ORed with MEDIA_TYPE_COMPRESSED if the data is compressed.
   
- uint32_t fourcc
  
 
- A standard "four character code" that describes the media type. This is the standard FOURCC value used in AVI and quicktime files. A
   number of additional values are defined:
   
- RGB6  --  16-bit RGB.
     
 
- RGB5  --  15-bit RGB.
     
 
- RGB4  --  24-bit RGB.
     
 
- RGB2  --  32-bit RGB.
   
 
   
- u
  
 
- A straight union for the above media formats. The union contains members image, audio, and video, of type AOImageFormat_t, AOAudioFormat_t, and AOVideoFormat_t respectively.
 
This structure defines an image format, and is used by AODataFormat_t.
This structure has at least the following members:
- uint32_t width
  
 
- The width of the image, in pixels.
  
 
- uint32_t height
  
 
- The height of the image, in pixels.
  
 
- uint16_t depth
  
 
- The color depth of the image, in bits.
  
 
- int16_t transparent
  
 
- If this image is transparent, this value is the transparency index + 1. If the image isn't transparent, this value is 0.
  
 
- uint8_t pal[256][3]
  
 
- The image palette.
 
This structure defines an audio format, and is used by AODataFormat_t.
This structure has at least the following members:
- uint32_t channels
  
 
- The number of audio channels per frame.  For example, a stereo signal has 2 channels.
  
 
- uint32_t depth
  
 
- The audio depth (sample rate) in bytes.
  
 
- int32_t frame_rate
  
 
- The scaled frame rate.  This value is divided by scale for
     the actual frame rate.
  
 
- int32_t scale
  
 
- A scaling value for the frame rate.  This value is required if the frame rate isn't an integer.  For example, if the frame rate is 29.97, set frame_rate to 2997, and scale to 100.
  
 
- int32_t duration
  
 
- The duration of the audio, in frames.
 
This structure defines a video format, and is used by AODataFormat_t.
This structure has at least the following members:
- uint32_t width
  
 
- The width of the video image, in pixels.
  
 
- uint32_t height
  
 
- The height of the video image, in pixels.
  
 
- uint32_t depth
  
 
- The color depth (number of bits per pixel).
  
 
- int32_t frame_rate
  
 
- The scaled frame rate.  This value is divided by scale for
     the actual frame rate.
  
 
- int32_t scale
  
 
- A scaling value for the frame rate.  This value is required if the frame rate isn't an integer.  For example, if the frame rate is 29.97, set frame_rate to 2997, and scale to 100.
  
 
- int32_t duration
  
 
- The duration of the video, in frames. Set to 0 if unknown.