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
Ritor1
parents:
diff changeset
1 #pragma once
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
2 #include "OSWindow.h"
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1253
diff changeset
3 #include "Texture.h"
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
4 #include "MediaPlayer.h"
0
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 #pragma pack(pop)
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
11 struct MovieHeader
Ritor1
parents:
diff changeset
12 {
Ritor1
parents:
diff changeset
13 char pVideoName[40];
Ritor1
parents:
diff changeset
14 unsigned int uFileOffset;
Ritor1
parents:
diff changeset
15 };
Ritor1
parents:
diff changeset
16 #pragma pack(pop)
Ritor1
parents:
diff changeset
17
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents: 2221
diff changeset
18 void ShowMM7IntroVideo_and_LoadingScreen();
0
Ritor1
parents:
diff changeset
19
2134
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
20 extern "C"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
21 {
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
22 #include "lib/libavcodec/avcodec.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
23 #include "lib/libavformat/avformat.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
24 #include "lib/libavutil/avutil.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
25 #include "lib/libavutil/imgutils.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
26 #include "lib/libswscale/swscale.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
27 #include "lib/libswresample/swresample.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
28 #include "lib/libavutil/opt.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
29 }
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
30 #pragma comment(lib, "avcodec.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
31 #pragma comment(lib, "avformat.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
32 #pragma comment(lib, "avutil.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
33 #pragma comment(lib, "swscale.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
34 #pragma comment(lib, "swresample.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
35
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
36 #include "lib/OpenAL/al.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
37 #include "lib/OpenAL/alc.h"
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
38 #pragma comment(lib, "OpenAL32.lib")
992d2e6f907d preparation for libavcodec
zipi
parents: 1802
diff changeset
39
0
Ritor1
parents:
diff changeset
40 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
41 struct VideoPlayer
Ritor1
parents:
diff changeset
42 {
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1253
diff changeset
43 VideoPlayer();
0
Ritor1
parents:
diff changeset
44 //----- (004BECBD) --------------------------------------------------------
Ritor1
parents:
diff changeset
45 virtual ~VideoPlayer()
Ritor1
parents:
diff changeset
46 {
Ritor1
parents:
diff changeset
47 bStopBeforeSchedule = false;
165
Ritor1
parents: 0
diff changeset
48 pResetflag = 0;
0
Ritor1
parents:
diff changeset
49 pVideoFrame.Release();
Ritor1
parents:
diff changeset
50 }
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 void PlayDeathMovie();
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
53 void Initialize(OSWindow *window);
0
Ritor1
parents:
diff changeset
54 void Unload();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
55 void OpenHouseMovie(const char *pMovieName, unsigned int a3_1);//0x4BF28F
0
Ritor1
parents:
diff changeset
56 bool AnyMovieLoaded();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
57 void OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4);
0
Ritor1
parents:
diff changeset
58 void _4BF5B2();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
59 void SelectMovieType();//0x4BF73A
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
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
Ritor1
parents:
diff changeset
62
Ritor1
parents:
diff changeset
63 RGBTexture pVideoFrame;
Ritor1
parents:
diff changeset
64 int field_34;
Ritor1
parents:
diff changeset
65 MovieHeader *pMightVideoHeaders;
Ritor1
parents:
diff changeset
66 MovieHeader *pMagicVideoHeaders;
165
Ritor1
parents: 0
diff changeset
67 int pResetflag;
0
Ritor1
parents:
diff changeset
68 int field_44;
Ritor1
parents:
diff changeset
69 unsigned int uNumMightVideoHeaders;
Ritor1
parents:
diff changeset
70 unsigned int uNumMagicVideoHeaders;
Ritor1
parents:
diff changeset
71 int uBinkDirectDrawSurfaceType;
2137
d24ee391fd1f libavcodec playing movies and houses, loops not working yet
zipi
parents: 2134
diff changeset
72 int bBufferLoaded;
0
Ritor1
parents:
diff changeset
73 unsigned int bPlayingMovie;
Ritor1
parents:
diff changeset
74 unsigned int bFirstFrame;
Ritor1
parents:
diff changeset
75 unsigned int bUsingSmackerMMX;
Ritor1
parents:
diff changeset
76 unsigned int bLoopPlaying;
Ritor1
parents:
diff changeset
77 int field_68;
Ritor1
parents:
diff changeset
78 unsigned int bStopBeforeSchedule;
1802
633f81bb3ae7 HWND -> class OSWindow
Nomad
parents: 1458
diff changeset
79 OSWindow *window;
0
Ritor1
parents:
diff changeset
80 struct _SMACKBLIT *pSmackMovieBlit;
Ritor1
parents:
diff changeset
81 HANDLE hMightVid;
Ritor1
parents:
diff changeset
82 HANDLE hMagicVid;
Ritor1
parents:
diff changeset
83 char field_88[20];
Ritor1
parents:
diff changeset
84 unsigned int uMovieFormat;
2137
d24ee391fd1f libavcodec playing movies and houses, loops not working yet
zipi
parents: 2134
diff changeset
85 int uMovieFormatSwapped;
0
Ritor1
parents:
diff changeset
86 char pCurrentMovieName[64];
Ritor1
parents:
diff changeset
87 char pVideoFrameTextureFilename[32];
323
d720a13e2273 Very basic picking & entering houses
Nomad
parents: 165
diff changeset
88 int field_104;
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
89 Media::Player *pPlayer;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
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
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
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
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
99 void PlayAudio(const wchar_t * pFilename);
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2334
diff changeset
100 void PlayMovie(const wchar_t * pFilename);
0
Ritor1
parents:
diff changeset
101 };
Ritor1
parents:
diff changeset
102 #pragma pack(pop)
Ritor1
parents:
diff changeset
103
Ritor1
parents:
diff changeset
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);