video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-09-18 b73029149580370e62dd6c14a270aea902f85cf2
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
#ifndef _cffmpeg_stream_hpp_
#define _cffmpeg_stream_hpp_
 
#include <list>
#include <mutex>
#include <memory>
 
namespace ffwrapper{
    class CodedData;
}
 
namespace cffmpeg_wrap{
    class stream
    {
    private:
        std::list<std::shared_ptr<ffwrapper::CodedData> > list_avpkt_;
        std::mutex mutex_avpkt_;
        const int max_size_;
    public:
        explicit stream(const int maxSize);
        ~stream();
 
        int SetPacket(std::shared_ptr<ffwrapper::CodedData> data);
        void GetPacket(unsigned char **pktData, int *size, int *key);
    };
    
}
 
#endif