| | |
| | | { |
| | | class FormatIn; |
| | | class CodedData; |
| | | class cvbridge; |
| | | } // namespace ffwrapper |
| | | |
| | | namespace cffmpeg_wrap |
| | | { |
| | | typedef struct _frm{ |
| | | uint8_t *data; |
| | | int length; |
| | | int width; |
| | | int height; |
| | | int format; |
| | | int64_t id; |
| | | }FRM; |
| | | |
| | | class decoder |
| | | { |
| | | private: |
| | | |
| | | ffwrapper::FormatIn *decRef_; |
| | | ffwrapper::cvbridge *conv_; |
| | | |
| | | std::list<FRM> list_frm_; |
| | | std::mutex mutex_frm_; |
| | | std::list<CPacket> list_pkt_; |
| | | std::mutex mutex_pkt_; |
| | | |
| | | int64_t next_idx_; |
| | | |
| | | private: |
| | | int initDecoder(); |
| | | int saveFrame(AVFrame *frame, const int64_t &id); |
| | | public: |
| | | void Start(); |
| | | int SetFrame(const CPacket &pkt); |