| | |
| | | #include "../data/FrameData.hpp" |
| | | |
| | | #include "../../common/gpu/info.h" |
| | | #include "PsToEs.hpp" |
| | | |
| | | using namespace logif; |
| | | |
| | |
| | | ,io_ctx_(NULL) |
| | | ,read_io_buff_(NULL) |
| | | ,read_io_buff_size_(32768) |
| | | ,handle_gb28181(NULL) |
| | | {} |
| | | |
| | | FormatIn::~FormatIn() |
| | |
| | | avcodec_close(dec_ctx_); |
| | | dec_ctx_ = NULL; |
| | | } |
| | | } |
| | | if (handle_gb28181){ |
| | | delete handle_gb28181; |
| | | } |
| | | } |
| | | |
| | |
| | | int FormatIn::openGb28181(const char *filename, AVDictionary **options){ |
| | | |
| | | std::string fn = filename; |
| | | addCamera(fn); |
| | | //GB28181API gb28181(fn); |
| | | if (handle_gb28181){ |
| | | delete handle_gb28181; |
| | | } |
| | | handle_gb28181 = new GB28181API; |
| | | handle_gb28181->addCamera(fn); |
| | | |
| | | int ret = openWithCustomIO(NULL, readData, options); |
| | | int ret = openWithCustomIO((void *)&handle_gb28181, handle_gb28181->readData, options); |
| | | if(ret < 0){ |
| | | logIt("do openWithCustomIO failed:%d",ret); |
| | | } |