| | |
| | | prop.gpu_acc_ = !cpu_; |
| | | |
| | | std::unique_ptr<FormatIn> in(new FormatIn(prop.gpuAccl())); |
| | | AVDictionary *avdic = prop.optsFormat(); |
| | | int flag = -1; |
| | | if (gb_){ |
| | | flag = in->openGb28181(input, NULL); |
| | | }else{ |
| | | flag = in->open(input, &avdic); |
| | | AVDictionary *avdic = prop.optsFormat(); |
| | | if(avdic){ |
| | | flag = in->open(input, &avdic); |
| | | av_dict_free(&avdic); |
| | | }else{ |
| | | flag = in->open(input, NULL); |
| | | } |
| | | } |
| | | if(avdic){ |
| | | av_dict_free(&avdic); |
| | | } |
| | | |
| | | if(flag == 0){ |
| | | if(!in->findStreamInfo(NULL)){ |
| | | logIt("can't find video stream\n"); |
| | |
| | | |
| | | stream_ = new stream(in, 3 * in->getFPS()); |
| | | // stream_->AudioSwitch(audio_); |
| | | |
| | | |
| | | decoder_ = new decoder(in); |
| | | |
| | | rec_->Load(in); |
| | |
| | | void Wrapper::OpenRecorder(){ |
| | | run_rec_ = true; |
| | | } |
| | | |
| | | |
| | | void Wrapper::BuildRecorder(const char* id, const char *output, const int64_t &fid, const int mindur, const int maxdur, const bool audio){ |
| | | bool a = audio; |
| | | if (gb_) a = false; |
| | |
| | | cvbridge *bridge; |
| | | } PicEncoder; |
| | | |
| | | void *CreateEncoder(const int w, const int h, const int fps, const int br, |
| | | void *CreateEncoder(const int w, const int h, const int fps, const int br, |
| | | const int pix_fmt, const int scale_flag, const int gi){ |
| | | |
| | | PicEncoder *e = (PicEncoder*)malloc(sizeof(PicEncoder)); |