Plugin: Move deallocation into core.
[gemrb.git] / gemrb / plugins / MVEPlayer / MVEPlayer.h
blobbf1fb4157c4ca265d7295286c61be732d08f6a92
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef MVEPLAY_H
22 #define MVEPLAY_H
24 #include "win32def.h"
25 #include "globals.h"
26 #include "MoviePlayer.h"
27 #include "Interface.h"
29 class MVEPlay : public MoviePlayer {
30 friend class MVEPlayer;
32 private:
33 bool validVideo;
34 int doPlay();
35 unsigned int fileRead(void* buf, unsigned int count);
36 void showFrame(unsigned char* buf, unsigned int bufw,
37 unsigned int bufh, unsigned int sx, unsigned int sy,
38 unsigned int w, unsigned int h, unsigned int dstx,
39 unsigned int dsty);
40 void setPalette(unsigned char* p, unsigned start, unsigned count);
41 int pollEvents();
42 int setAudioStream();
43 void freeAudioStream(int stream);
44 void queueBuffer(int stream, unsigned short bits,
45 int channels, short* memory,
46 int size, int samplerate);
47 public:
48 MVEPlay(void);
49 ~MVEPlay(void);
50 bool Open(DataStream* stream);
51 void CallBackAtFrames(ieDword cnt, ieDword *arg, ieDword *arg2);
52 int Play();
55 #endif