/*

*
*    ___                       __  ___       ___
*   / _ \___ _    _____ ____  /  |/  /__ ___/ (_)__ _
*  / ___/ _ \ |/|/ / -_) __/ / /|_/ / -_) _  / / _ `/
* /_/   \___/__,__/\__/_/   /_/  /_/\__/\_,_/_/\_,_/
*
*   Original Code by John Garrison
*   Written October 25-27, 1999
*   To be released under the LGPL
*
*   MPEG routines based on Loki's SMPEG
*
*   See LICENSE.TXT for more LGPL info
*/

#ifndef _PM_mpeg_H
#define _PM_mpeg_H

#ifdef __cplusplus
extern "C" {
#endif

#include <smpeg.h>

#include "powerdraw.h"
#include "powermedia.h"

#define PM_OFF 0
#define PM_ON 1

typedef struct _PSMPEG{
   int AudioState;
   int VideoState;
   int LoopState;
   int Volume;
   int DoubleState;
   SMPEG *Mpeg;
   SMPEG_Info Info;
}PM_Mpeg;


PM_Mpeg *PM_CreateMpeg(char *File);
int PM_DestroyMpeg(PM_Mpeg *Mpeg);

int PM_ToggleMpegAudio(PM_Mpeg *Mpeg, int State);
int PM_ToggleMpegVideo(PM_Mpeg *Mpeg, int State);
int PM_ToggleMpegLoop(PM_Mpeg *Mpeg, int State);
int PM_SetMpegVolume(PM_Mpeg *Mpeg, int Volume);
int PM_ToggleMpegDouble(PM_Mpeg *Mpeg, int State);

int PM_StartMpeg(PD_Surface *Surface, PM_Mpeg *Mpeg, int X, int Y);
int PM_StopMpeg(PM_Mpeg *Mpeg);
int PM_RewindMpeg(PM_Mpeg *Mpeg);
int PM_MoveMpeg(PM_Mpeg *Mpeg, int X, int Y);
int PM_PauseMpeg(PM_Mpeg *Mpeg);

int PM_GetMpegAudioState(PM_Mpeg *Mpeg);
int PM_GetMpegVideoState(PM_Mpeg *Mpeg);
int PM_GetMpegLoopState(PM_Mpeg *Mpeg);
int PM_GetMpegVolume(PM_Mpeg *Mpeg);
int PM_GetMpegDoubleState(PM_Mpeg *Mpeg);

int PM_RenderMpegFrame (PD_Surface *Surface, PM_Mpeg *Mpeg, int Frame, int X, int Y);
int PM_RenderMpegFinalFrame (PD_Surface *Surface, PM_Mpeg *Mpeg, int X, int Y);
int PM_IsMpegPlaying(PM_Mpeg *Mpeg);
int PM_IsMpegStopped(PM_Mpeg *Mpeg);

#ifdef __cplusplus
};
#endif

#endif