xingzilong
2017-08-18 9e5babf9db52e64bdae60137be7696e56241fca6
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 _PL_PL_AVFrameBGRA_H_
#define _PL_PL_AVFrameBGRA_H_
 
#include "PipeLine.h"
 
struct PL_AVFrameBGRA_Config
{
    enum
    {
        I420_TO_BGRA8888,
        I420_TO_ARGB8888,
        I420_TO_RGBA8888,
        I420_TO_ARGB4444,
        I420_TO_RGB565
    } convertTo;
    
    PL_AVFrameBGRA_Config() : convertTo(I420_TO_BGRA8888)
    {
    }
};
 
class PL_AVFrameBGRA : public PipeLineElem
{
public:
    PL_AVFrameBGRA();
    virtual ~PL_AVFrameBGRA();
 
    virtual bool init(void* args);
    virtual void finit();
 
    virtual bool pay(const PipeMaterial& pm);
    virtual bool gain(PipeMaterial& pm);
    
private:
    void* internal;
};
 
PipeLineElem* create_PL_AVFrameBGRA();
 
#endif