video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-07-16 b7c7b479c278e74955a1a0a6c949a4d3cf32903a
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 _FFMPEG_VIDEO_ENCODE_PROP_H_
#define _FFMPEG_VIDEO_ENCODE_PROP_H_
 
#include <string>
extern "C"{
#include <libavutil/avutil.h>
}
 
struct AVDictionary;
 
namespace ffwrapper{
    class VideoProp
    {
    public:
        VideoProp();
        ~VideoProp();
    
    public:
        bool rtspStream();
        AVDictionary *optsFormat();
        std::string preset();
        std::string filter_desc();
        std::string url(){return url_;}
 
        bool gpuAccl(){return gpu_acc_;}
    public:
        std::string     url_;
        bool            transcode_;
        bool             rtsp_tcp_;
 
        int             fps_;
        int             bit_rate_;
        int             width_;
        int             height_;
 
        int             quality_;
 
        int             udp_port_x_;
        int             udp_port_y_;
 
        bool             gpu_acc_;
        int             gpu_index_;
        
        AVRational      sample_aspect_ratio_;
 
    };
}
#endif