annotate MediaPlayer.h @ 2436:ed1e4cff79a2

fixed uninitialized memory access in SpriteFrameTable::FromFile
author Grumpy7
date Wed, 23 Jul 2014 22:24:53 +0200
parents cb66a1082fcf
children 90349b8048a5
rev   line source
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
1 #pragma once
58be29479e75 add files
Ritor1
parents:
diff changeset
2
58be29479e75 add files
Ritor1
parents:
diff changeset
3 namespace Media
58be29479e75 add files
Ritor1
parents:
diff changeset
4 {
58be29479e75 add files
Ritor1
parents:
diff changeset
5 class ITrack
58be29479e75 add files
Ritor1
parents:
diff changeset
6 {
2391
5d866ee28376 delete stru176.h for MVS 2010 MMT project
Ritor1
parents: 2360
diff changeset
7 public:
2430
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
8 virtual ~ITrack() {}
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
9
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
10 virtual void Play(bool loop = false) = 0;
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
11 virtual void Release() = 0;
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
12 };
58be29479e75 add files
Ritor1
parents:
diff changeset
13
58be29479e75 add files
Ritor1
parents:
diff changeset
14 class IMovie
58be29479e75 add files
Ritor1
parents:
diff changeset
15 {
2391
5d866ee28376 delete stru176.h for MVS 2010 MMT project
Ritor1
parents: 2360
diff changeset
16 public:
2430
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
17 virtual ~IMovie() {}
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
18
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
19 virtual void Play() = 0;
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
20 virtual void GetNextFrame(double dt, void *target_surface) = 0;
cb66a1082fcf * ITrack, IMovie now properly propogate destructors
a.parshin
parents: 2406
diff changeset
21 virtual void Release() = 0;
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
22 };
58be29479e75 add files
Ritor1
parents:
diff changeset
23
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
24 class MPlayer
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
25 {
58be29479e75 add files
Ritor1
parents:
diff changeset
26 public:
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
27 MPlayer();
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
28 virtual ~MPlayer();
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
29
58be29479e75 add files
Ritor1
parents:
diff changeset
30 ITrack *LoadTrack(const wchar_t *name);
58be29479e75 add files
Ritor1
parents:
diff changeset
31 IMovie *LoadMovie(const wchar_t *name, int width, int height, int cache_ms);
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
32 IMovie *LoadMovieFromLOD(HANDLE h, int readFunction(void*, uint8_t*, int), int64_t seekFunction(void*, int64_t, int), int width, int height);
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
33 };
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
34 };
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
35
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
36 extern Media::MPlayer *pMediaPlayer;
2394
2fe8feb3dcd1 pMovie renamed to pMovie_Track and other
Ritor1
parents: 2391
diff changeset
37 extern Media::IMovie *pMovie_Track;
2fe8feb3dcd1 pMovie renamed to pMovie_Track and other
Ritor1
parents: 2391
diff changeset
38 extern Media::ITrack *pAudio_Track;
2360
63ad4e3606f4 MovieRelease();
Ritor1
parents: 2359
diff changeset
39 extern class Movie *movie;
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
40
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
41 extern bool end_current_file;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
42 extern bool loop_current_file;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
43 extern DWORD time_video_begin;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
44 extern int current_movie_width;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
45 extern int current_movie_height;
2347
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
46
2359
5b9fb75b6f54 alSourceStop(mSourceID);
Ritor1
parents: 2356
diff changeset
47 extern int mSourceID;
5b9fb75b6f54 alSourceStop(mSourceID);
Ritor1
parents: 2356
diff changeset
48
2360
63ad4e3606f4 MovieRelease();
Ritor1
parents: 2359
diff changeset
49 //int64_t seekFunction(void* opaque, int64_t offset, int whence);
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
50 extern void PlayMovie(const wchar_t * pFilename);
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
51 extern void PlayAudio(const wchar_t * pFilename);
2360
63ad4e3606f4 MovieRelease();
Ritor1
parents: 2359
diff changeset
52 extern void MovieRelease();
2347
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
53
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
54 //////////////////////////////////////////////////////////////////////////
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
55 //Included from a VideoPlayer.h file/вставлено из файла VideoPlayer.h/
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
56 //////////////////////////////////////////////////////////////////////////
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
57
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
58 //used in void VideoPlayer::Initialize(OSWindow *target_window) for open .vid files
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
59 struct MovieHeader
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
60 {
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
61 char pVideoName[40];
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
62 unsigned int uFileOffset;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
63 };
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
64
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
65 extern MovieHeader *pMightVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
66 extern MovieHeader *pMagicVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
67 extern HANDLE hMightVid;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
68 extern HANDLE hMagicVid;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
69 extern unsigned __int64 uBinkVersion;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
70 extern unsigned int uNumMightVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
71 extern unsigned int uNumMagicVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
72 //