annotate MediaPlayer.h @ 2356:08c4f1799ca1

Elements of VideoPlayer structure moved
author Ritor1
date Thu, 10 Apr 2014 17:34:50 +0600
parents d57505d3c70c
children 5b9fb75b6f54
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 {
58be29479e75 add files
Ritor1
parents:
diff changeset
7 public: virtual void Play(bool loop = false) = 0;
58be29479e75 add files
Ritor1
parents:
diff changeset
8 };
58be29479e75 add files
Ritor1
parents:
diff changeset
9
58be29479e75 add files
Ritor1
parents:
diff changeset
10 class IMovie
58be29479e75 add files
Ritor1
parents:
diff changeset
11 {
58be29479e75 add files
Ritor1
parents:
diff changeset
12 public: virtual void Play() = 0;
58be29479e75 add files
Ritor1
parents:
diff changeset
13 virtual void GetNextFrame(double dt, void *target_surface) = 0;
58be29479e75 add files
Ritor1
parents:
diff changeset
14 };
58be29479e75 add files
Ritor1
parents:
diff changeset
15
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
16 class MPlayer
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
17 {
58be29479e75 add files
Ritor1
parents:
diff changeset
18 public:
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
19 MPlayer();
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
20 virtual ~MPlayer();
2315
58be29479e75 add files
Ritor1
parents:
diff changeset
21
58be29479e75 add files
Ritor1
parents:
diff changeset
22 ITrack *LoadTrack(const wchar_t *name);
58be29479e75 add files
Ritor1
parents:
diff changeset
23 IMovie *LoadMovie(const wchar_t *name, int width, int height, int cache_ms);
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
24 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
25 };
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
26 };
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
27
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
28 extern Media::MPlayer *pMediaPlayer;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
29 extern Media::IMovie *pMovie;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
30 extern Media::ITrack *pTrack;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
31
2345
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
32 extern bool end_current_file;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
33 extern bool loop_current_file;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
34 extern DWORD time_video_begin;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
35 extern int current_movie_width;
182effc4b0ee for MultimediaPlayer
Ritor1
parents: 2315
diff changeset
36 extern int current_movie_height;
2347
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
37
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
38 int64_t seekFunction(void* opaque, int64_t offset, int whence);
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
39 extern void PlayMovie(const wchar_t * pFilename);
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
40 extern void PlayAudio(const wchar_t * pFilename);
2347
d57505d3c70c VideoPlayer cleaning
Ritor1
parents: 2345
diff changeset
41
2356
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
42 //////////////////////////////////////////////////////////////////////////
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
43 //Included from a VideoPlayer.h file/вставлено из файла VideoPlayer.h/
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
44 //////////////////////////////////////////////////////////////////////////
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
45
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
46 //used in void VideoPlayer::Initialize(OSWindow *target_window) for open .vid files
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
47 struct MovieHeader
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
48 {
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
49 char pVideoName[40];
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
50 unsigned int uFileOffset;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
51 };
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
52
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
53 extern MovieHeader *pMightVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
54 extern MovieHeader *pMagicVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
55 extern HANDLE hMightVid;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
56 extern HANDLE hMagicVid;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
57 extern unsigned __int64 uBinkVersion;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
58 extern unsigned int uNumMightVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
59 extern unsigned int uNumMagicVideoHeaders;
08c4f1799ca1 Elements of VideoPlayer structure moved
Ritor1
parents: 2347
diff changeset
60 //