Mercurial > mm7
annotate VideoPlayer.h @ 2353:bb9f180d50f6
Removing a few unsorted_subs includes
author | Grumpy7 |
---|---|
date | Wed, 09 Apr 2014 21:58:09 +0200 |
parents | d57505d3c70c |
children | 08c4f1799ca1 |
rev | line source |
---|---|
0 | 1 #pragma once |
1802 | 2 #include "OSWindow.h" |
1262 | 3 #include "Texture.h" |
2345 | 4 #include "MediaPlayer.h" |
0 | 5 |
6 #pragma pack(push, 1) | |
7 | |
8 #pragma pack(pop) | |
9 | |
10 #pragma pack(push, 1) | |
11 struct MovieHeader | |
12 { | |
13 char pVideoName[40]; | |
14 unsigned int uFileOffset; | |
15 }; | |
16 #pragma pack(pop) | |
17 | |
2290 | 18 void ShowMM7IntroVideo_and_LoadingScreen(); |
0 | 19 |
2134 | 20 extern "C" |
21 { | |
22 #include "lib/libavcodec/avcodec.h" | |
23 #include "lib/libavformat/avformat.h" | |
24 #include "lib/libavutil/avutil.h" | |
25 #include "lib/libavutil/imgutils.h" | |
26 #include "lib/libswscale/swscale.h" | |
27 #include "lib/libswresample/swresample.h" | |
28 #include "lib/libavutil/opt.h" | |
29 } | |
30 #pragma comment(lib, "avcodec.lib") | |
31 #pragma comment(lib, "avformat.lib") | |
32 #pragma comment(lib, "avutil.lib") | |
33 #pragma comment(lib, "swscale.lib") | |
34 #pragma comment(lib, "swresample.lib") | |
35 | |
36 #include "lib/OpenAL/al.h" | |
37 #include "lib/OpenAL/alc.h" | |
38 #pragma comment(lib, "OpenAL32.lib") | |
39 | |
0 | 40 #pragma pack(push, 1) |
41 struct VideoPlayer | |
42 { | |
1262 | 43 VideoPlayer(); |
0 | 44 //----- (004BECBD) -------------------------------------------------------- |
45 virtual ~VideoPlayer() | |
46 { | |
47 bStopBeforeSchedule = false; | |
165 | 48 pResetflag = 0; |
0 | 49 pVideoFrame.Release(); |
50 } | |
51 | |
52 void PlayDeathMovie(); | |
1802 | 53 void Initialize(OSWindow *window); |
0 | 54 void Unload(); |
898 | 55 void OpenHouseMovie(const char *pMovieName, unsigned int a3_1);//0x4BF28F |
0 | 56 bool AnyMovieLoaded(); |
898 | 57 void OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4); |
0 | 58 void _4BF5B2(); |
898 | 59 void SelectMovieType();//0x4BF73A |
1802 | 60 void _inlined_in_463149(); |
2142
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
61 void MovieLoop(const char *pMovieName, int a2, int a3, int a4); |
0 | 62 |
63 RGBTexture pVideoFrame; | |
64 int field_34; | |
65 MovieHeader *pMightVideoHeaders; | |
66 MovieHeader *pMagicVideoHeaders; | |
165 | 67 int pResetflag; |
0 | 68 int field_44; |
69 unsigned int uNumMightVideoHeaders; | |
70 unsigned int uNumMagicVideoHeaders; | |
71 int uBinkDirectDrawSurfaceType; | |
2137
d24ee391fd1f
libavcodec playing movies and houses, loops not working yet
zipi
parents:
2134
diff
changeset
|
72 int bBufferLoaded; |
0 | 73 unsigned int bPlayingMovie; |
74 unsigned int bFirstFrame; | |
75 unsigned int bUsingSmackerMMX; | |
76 unsigned int bLoopPlaying; | |
77 int field_68; | |
78 unsigned int bStopBeforeSchedule; | |
1802 | 79 OSWindow *window; |
0 | 80 struct _SMACKBLIT *pSmackMovieBlit; |
81 HANDLE hMightVid; | |
82 HANDLE hMagicVid; | |
83 char field_88[20]; | |
84 unsigned int uMovieFormat; | |
2137
d24ee391fd1f
libavcodec playing movies and houses, loops not working yet
zipi
parents:
2134
diff
changeset
|
85 int uMovieFormatSwapped; |
0 | 86 char pCurrentMovieName[64]; |
87 char pVideoFrameTextureFilename[32]; | |
323 | 88 int field_104; |
2345 | 89 Media::Player *pPlayer; |
90 Media::IMovie *pMovie; | |
2142
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
91 HANDLE hVidFile; |
2137
d24ee391fd1f
libavcodec playing movies and houses, loops not working yet
zipi
parents:
2134
diff
changeset
|
92 int uSize; |
d24ee391fd1f
libavcodec playing movies and houses, loops not working yet
zipi
parents:
2134
diff
changeset
|
93 int uOffset; |
2347 | 94 |
2142
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
95 void UpdatePalette(); |
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
96 static int readFunction(void *, uint8_t *, int); |
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
97 static int64_t seekFunction(void *, int64_t, int); |
ca548138d6aa
some code cleaning in video playing, loops play but there is a memory leak
zipi
parents:
2137
diff
changeset
|
98 void LoadMovie(const char *); |
2345 | 99 void PlayAudio(const wchar_t * pFilename); |
100 void PlayMovie(const wchar_t * pFilename); | |
0 | 101 }; |
102 #pragma pack(pop) | |
103 | |
104 extern VideoPlayer *pVideoPlayer; | |
2137
d24ee391fd1f
libavcodec playing movies and houses, loops not working yet
zipi
parents:
2134
diff
changeset
|
105 extern LRESULT __stdcall wWinProc(HWND hwnd, unsigned int msg, WPARAM wparam, LPARAM lparam); |