DvppStreamDecoder.h
1008 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
#ifndef __DVPP_STREAM_DECODER_H__
#define __DVPP_STREAM_DECODER_H__
#include "depend_headers.h"
#include "dvpp_headers.h"
#include "VpcUtils.h"
using namespace std;
class DvppStreamDecoder
{
public:
DvppStreamDecoder(/* args */);
~DvppStreamDecoder();
bool init_vdpp(FFDecConfig cfg);
DataFrame* Decode(int videoType, char* data, int len, int isKey, uint64_t pts);
public:
void doProcessReport();
void doVdppVdecCallBack(acldvppStreamDesc *input, acldvppPicDesc *output, void *pUserData);
private:
bool sendVdecEos(aclvdecChannelDesc *vdecChannelDesc);
int sendPkt(aclvdecChannelDesc *vdecChannelDesc, AVPacket* pkt, unsigned long long frame_nb);
private:
string m_dec_name {""};
int m_deviceId {-1};
int m_dvpp_channel {-1};
aclrtContext m_context{nullptr};
aclvdecChannelDesc *vdecChannelDesc {nullptr};
int m_vdec_out_size {-1};
VpcUtils m_vpcUtils;
unsigned long m_frame_nb {0};
};
#endif // __DVPP_STREAM_DECODER_H__