TABLE OF CONTENTS

  1. sunraster.decoder/background
  2. sunraster.decoder/MMA_Video_BitsPerPixel
  3. sunraster.decoder/MMA_Video_Height
  4. sunraster.decoder/MMA_Video_UseAlpha
  5. sunraster.decoder/MMA_Video_Width
  6. sunraster.decoder/MMM_Pull

sunraster.decoder/background

DESCRIPTION
   The class decodes SunRaster data used in Solaris Operating System.
   Supported image depths are 24 and 32 bits per pixel for truecolor images.
   (32 contains 8-bit alpha channel) and 1, 8 bits for palette format with 
   or without RLE compression.
   An object of sunraster.decoder class has two ports: port 0 is an input
   accepting MMF_VIDEO_SUNRASTER format, port 1 is an output producing
   MMFC_VIDEO_ARGB32 format. The class is a direct subclass of
   multimedia.class.

NEW ATTRIBUTES
   Attributes applicability:
     I - may be set at creation time.
     S - may be set on an existing object.
     G - may be get from an object.
     P - may be set for an object's port.
     Q - may be queried from an object's port.

   MMA_Video_Height         (V50) [..G.Q], ULONG
   MMA_Video_Width          (V50) [..G.Q], ULONG
   MMA_Video_BitsPerPixel   (V50) [..G.Q], ULONG
   MMA_Video_UseAlpha       (V50) [..G.Q], BOOL

NEW METHODS
   MMM_Pull(port,buffer, length)  (V50)

HISTORY
   - Query tags are accessible via the class base.

   50.1  (22.12.2007)
   - Initial revision.


sunraster.decoder/MMA_Video_BitsPerPixel

NAME
   MMA_Video_BitsPerPixel (V50) [..G.Q], ULONG

FUNCTION
   Returns image colour depth. Possible values for sunraster.decoder are
   1, 8, 24, 32.


sunraster.decoder/MMA_Video_Height

NAME
   MMA_Video_Height (V50) [..G.Q], ULONG

FUNCTION
   Returns height of image frame in pixels.


sunraster.decoder/MMA_Video_UseAlpha

NAME
   MMA_Video_UseAlpha (V50) [..G.Q], BOOL

FUNCTION
   Returns TRUE if SunRaster image data contain alpha channel, FALSE
   otherwise.


sunraster.decoder/MMA_Video_Width

NAME
   MMA_Video_Width (V50) [..G.Q], ULONG

FUNCTION
   Returns width of image frame in pixels.


sunraster.decoder/MMM_Pull

NAME
   MMM_Pull -- Writes common format image data to specified buffer. (V50)

SYNOPSIS
   ULONG DoMethod(Object *obj, MMM_Pull, ULONG port, APTR buffer, ULONG
   length);

FUNCTION
   Pulls needed amount of SunRaster data from input, processes them to
   get image data in the common format and places them in the specified
   buffer.

INPUTS
   obj - object to perform method on.
   port - number of port, data must be pulled from output, so 1.
   buffer - destination buffer for common format image data. This buffer
     must be allocated with MediaAllocMem().
   length - amount of data to be pulled in bytes. It should be evenly
     divisible by number of bytes per pixel for the common format (4 for
     MMFC_VIDEO_ARGB32), if not, it is rounded down, and the rest of bytes
     are undefined.

RESULT
   Number of bytes pulled, secondary error information via MMA_ErrorCode.

SEE ALSO
   multimedia.class/MMA_ErrorCode