---
name: "CL_MPEGProvider"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_MPEGProvider"
---

# CL\_MPEGProvider(3)

A surface provider that can show MPEG animations.

## NAME

CL\_MPEGProvider - A surface provider that can show MPEG animations.

## CLASS MEMBERS

- static CL\_Surface \***create**(

  ```
  char *filename)
  ```

- static CL\_Surface \***create**(

  ```
  char *filename,
  int dithermode)
  ```

- **CL\_MPEGProvider**(

  ```
  const char *filename,
  int dithermode)
  ```

- virtual **~CL\_MPEGProvider**()

  - virtual void **rewind**()

  - virtual unsigned int **get\_framerate**()

  - virtual unsigned int **get\_width**()

  - virtual unsigned int **get\_height**()

  - virtual unsigned int **get\_pitch**()

  - virtual unsigned int **get\_num\_frames**()

  - virtual EPixelFormat **get\_pixel\_format**()

  - virtual unsigned int **get\_red\_mask**()

  - virtual unsigned int **get\_green\_mask**()

  - virtual unsigned int **get\_blue\_mask**()

  - virtual unsigned int **get\_alpha\_mask**()

  - virtual CL\_Palette \***get\_palette**()

  - virtual bool **is\_indexed**()

  - virtual bool **uses\_src\_colorkey**()

  - virtual unsigned int **get\_src\_colorkey**()

  - virtual void \***get\_data**()

  - virtual void **perform\_lock**()

  - virtual void **perform\_unlock**()

  ## MEMBERS WITH DESCRIPTIONS

- static CL\_Surface \***create**(

  ```
  char *filename)
  ```

  ```
  Parameters:
  filename - The mpeg file to use.
  ```

  ```
  Description:
  ```

  Creates a surface using the mpeg file *filename* as source.

- static CL\_Surface \***create**(

  ```
  char *filename,
  int dithermode)
  ```

  ```
  Description:
  ```

  Creates a surface using the mpeg *filename* as source and dithermode passed to libmpeg.

- **CL\_MPEGProvider**(

  ```
  const char *filename,
  int dithermode)
  ```

  ```
  Parameters:
  filename - mpeg file to use.
  dithermode - passed to libmpeg.
  ```

  ```
  Description:
  ```

  Constructs a surfaceprovider using the mpeg file *filename* as source, passing flags to libmpeg.

- virtual **~CL\_MPEGProvider**()

  ```
  Description:
  ```

- virtual void **rewind**()

  ```
  Description:
  ```

  Rewinds the mpeg stream

- virtual unsigned int **get\_framerate**()

  ```
  Description:
  ```

  Returns the framerate

- virtual unsigned int **get\_width**()

  ```
  Description:
  ```

  Returns the width of the image.

- virtual unsigned int **get\_height**()

  ```
  Description:
  ```

  Returns the height of the image.

- virtual unsigned int **get\_pitch**()

  ```
  Description:
  ```

  Returns the pitch of the Image.

- virtual unsigned int **get\_num\_frames**()

  ```
  Description:
  ```

  Returns the number of subsprites in the image.

- virtual EPixelFormat **get\_pixel\_format**()

  ```
  Description:
  ```

  Returns the pixel format used by the image.

- virtual unsigned int **get\_red\_mask**()

  ```
  Description:
  ```

- virtual unsigned int **get\_green\_mask**()

  ```
  Description:
  ```

- virtual unsigned int **get\_blue\_mask**()

  ```
  Description:
  ```

- virtual unsigned int **get\_alpha\_mask**()

  ```
  Description:
  ```

- virtual CL\_Palette \***get\_palette**()

  ```
  Description:
  ```

  Returns the palette used by the image. NULL if system palette.

- virtual bool **is\_indexed**()

  ```
  Description:
  ```

- virtual bool **uses\_src\_colorkey**()

  ```
  Description:
  ```

- virtual unsigned int **get\_src\_colorkey**()

  ```
  Description:
  ```

  Returns the transparency color used the image. -1 if none.

- virtual void \***get\_data**()

  ```
  Description:
  ```

  Returns a pointer to the image data. Must be locked before data is valid.

- virtual void **perform\_lock**()

  ```
  Description:
  ```

  Locks the surface provider.

- virtual void **perform\_unlock**()

  ```
  Description:
  ```

  Unlocks the surface provider.

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
