-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mp4IStreamSource.h
55 lines (41 loc) · 990 Bytes
/
Mp4IStreamSource.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
46
47
48
49
50
51
52
53
54
55
/**
*
* author Jose Mortensen
* brief Source
*
*/
#ifndef __MP4ISTREAMSOURCE__
#define __MP4ISTREAMSOURCE__
#include "Mp4Source.h"
#define _STL_LARGE_FILE_WORKAROUND_
#ifdef _STL_LARGE_FILE_WORKAROUND_
#include "LargeFileSources.h"
typedef LargeIfstream large_istream;
typedef LargeOfstream large_ostream;
#else
typedef std::istream large_istream;
typedef std::ostream large_ostream;
#endif
/**
Class to read data from an istream
*/
class Mp4IStreamSource : public Mp4Source {
large_istream& is;
public:
/** generic constructor
@param stream externally created stream
*/
Mp4IStreamSource(large_istream& stream);
/**
destructor
destroys given stream
*/
~Mp4IStreamSource();
/**
gets a reference to stream
*/
large_istream& getIStream() {return is;}
/// Reads a (size) of data from a file offset to a buffer
uint64_t read(uint8_t* buffer, uint64_t offset, uint64_t size);
};
#endif