-
Notifications
You must be signed in to change notification settings - Fork 0
/
crawdataplayer.h
40 lines (34 loc) · 939 Bytes
/
crawdataplayer.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
#ifndef CRAWDATAPLAYER_H
#define CRAWDATAPLAYER_H
extern "C"{
#include "SDL2/SDL.h"
}
#include <string>
#include "csdlplayer.h"
class CRawDataPlayer : public CSDLPlayer
{
public:
CRawDataPlayer();
private:
enum EFrameDataType
{
eFrameDataType_From = 0,
eFrameDataType_BGRA = eFrameDataType_From,
eFrameDataType_RGB24,
eFrameDataType_BGR24,
eFrameDataType_YUV420P,
eFrameDataType_To,
};
protected:
virtual void InitFrameData();
virtual void GetRenderData(unsigned char*& pBuffer, int& iFrameDataPitch);
private:
unsigned char* m_pBuffer; //read data
unsigned char* m_pBufferConvert; //convert data, rgb24 & bgr24 need convert to 32bit
std::string m_VideoFileName;
FILE* m_fp;
int m_FrameDataSize;
int m_FrameDataPitch;
EFrameDataType m_eFrameDataType;
};
#endif // CRAWDATAPLAYER_H