| | |
| | | VideoProp prop; |
| | | prop.url_ = input; |
| | | prop.rtsp_tcp_ = true; |
| | | prop.gpu_acc_ = !cpu_; |
| | | prop.gpu_acc_ = false; |
| | | prop.gpu_index_ = devid_; |
| | | |
| | | std::unique_ptr<FormatIn> in(new FormatIn(prop, prop.gpuAccl())); |
| | | int flag = -1; |
| | | #ifdef GB28181 |
| | | if (gb_){ |
| | | flag = in->openGb28181(input, NULL); |
| | | }else{ |
| | | #endif |
| | | AVDictionary *avdic = prop.optsFormat(); |
| | | if(avdic){ |
| | | flag = in->open(input, &avdic); |
| | |
| | | }else{ |
| | | flag = in->open(input, NULL); |
| | | } |
| | | #ifdef GB28181 |
| | | } |
| | | #endif |
| | | |
| | | if(flag == 0){ |
| | | if(!in->findStreamInfo(NULL)){ |
| | |
| | | return flag; |
| | | } |
| | | |
| | | #ifdef GB28181 |
| | | int GetGb28181Pic(const char *rtspUrl, char *retData, int *retDataLen, const int tt){ |
| | | int ret = 0; |
| | | std::atomic_bool add_camera{false}; |
| | |
| | | t.detach(); |
| | | return -1; |
| | | } |
| | | #endif |
| | | } |
| | | |