-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
MPEGlist.h
45 lines (31 loc) · 831 Bytes
/
MPEGlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* bufferlist.h */
/* A class for buffering the I/O and allow multiple streams to read the data
asynchronously */
#ifndef _MPEGLIST_H_
#define _MPEGLIST_H_
#include "SDL.h"
class MPEGlist {
public:
MPEGlist();
~MPEGlist();
/* Get to the next free buffer or allocate a new one if none is free */
MPEGlist * Alloc(Uint32 Buffer_Size);
/* Lock current buffer */
void Lock();
/* Unlock current buffer */
void Unlock();
/* Get the buffer */
inline void * Buffer() { return(data); };
inline Uint32 Size() { return(size); };
inline MPEGlist * Next() { return(next); };
inline MPEGlist * Prev() { return(prev); };
inline Uint32 IsLocked() { return(lock); };
double TimeStamp;
private:
class MPEGlist * next;
class MPEGlist * prev;
Uint32 lock;
Uint8 * data;
Uint32 size;
};
#endif