xuxiuxi
2017-05-11 109ffe9a777658936a38d0c146579a67c60a0d17
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
#ifndef _PL_SCALE_H_
#define _PL_SCALE_H_
 
#include "PipeLine.h"
 
struct PL_Scale_Config
{
    uint16_t toWidth;
    uint16_t toHeight;
    int filterMode; // libyuv/scale.h/FilterMode 
    
    // Used only pm.type==PMT_BYTES
    int defaultBytesType; // MBFT_YUV420 / MBFT_BGRA
    uint16_t defaultBytesWidth;
    uint16_t defaultBytesHeight;
    
    PL_Scale_Config() : 
        toWidth(0), toHeight(0), filterMode(0), 
        defaultBytesType(0), defaultBytesWidth(0), defaultBytesHeight(0)
    { }
};
 
class PL_Scale : public PipeLineElem
{
public:
    PL_Scale();
    virtual ~PL_Scale();
 
    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_Scale();
 
#endif