-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMp4Sample.h
More file actions
49 lines (40 loc) · 966 Bytes
/
Mp4Sample.h
File metadata and controls
49 lines (40 loc) · 966 Bytes
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
/**
*
* author Jose Mortensen
* brief Generic sample buffer
*
*/
#ifndef __DATASAMPLE_H__
#define __DATASAMPLE_H__
#include <iostream>
/**
Interface for data Samples used on the Mp4File module
*/
class NS_MP4FILE_API Mp4Sample {
public:
/// data buffer
uint8_t* m_buffer;
/// data buffer length
size_t m_bufferLength;
/// presentation time (seconds)
double m_time;
public:
/**
Constructor
@param buffer Data Buffer. Data buffer is cloned internally.
@param length Data Buffer Length
@param time Presentation time in seconds
*/
Mp4Sample ( const uint8_t* buffer, int length, double time);
/**
Destructor, releases alocated memory
*/
~Mp4Sample ();
/// std ostream utility
friend std::ostream& operator<<(std::ostream& os, const Mp4Sample& info) {
os << "time=" << info.m_time
<< "buffer=" << (int*)info.m_buffer;
return os;
}
};
#endif // __DATASAMPLE_H__