pans
2016-12-29 3d0a6f5b246d0a22454d482c7efda08ff25b1574
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
#ifndef _MATERIAL_BUFFER_H_
#define _MATERIAL_BUFFER_H_
 
#if defined(WIN32) || defined(_MSC_VER)
    struct timeval {
        time_t      tv_sec;     /* seconds */
        suseconds_t tv_usec;    /* microseconds */
    };
#else
    #include <sys/time.h>
#endif
 
struct MB_Frame
{
    enum MBFType
    {
        MBFT__FIRST,
        MBFT_JPEG,
        MBFT_YUV420,
        MBFT_BGRA,
        MBFT_H264_NALU,
        MBFT_H264_NALU_WITH_AUX,
        MBFT_PTR_AVFRAME,
        MBFT__LAST
    };
 
    MBFType type;
    uint8_t* buffer;//#todo void*
    size_t buffSize;
    timeval pts;
    
    MB_Frame() : type(MBFT__FIRST), buffer(nullptr), buffSize(0), pts() { }
};
 
#endif