| 500 | } |
| 501 | |
| 502 | void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decode_end, srd_session *const session) |
| 503 | { |
| 504 | decode_task_status *status = _stask_stauts; |
| 505 | |
| 506 | //uint8_t *chunk = NULL; |
| 507 | uint64_t last_cnt = 0; |
| 508 | uint64_t notify_cnt = (decode_end - decode_start + 1)/100; |
| 509 | srd_decoder_inst *logic_di = NULL; |
| 510 | |
| 511 | // find the first level decoder instant |
| 512 | for (GSList *d = session->di_list; d; d = d->next) { |
| 513 | srd_decoder_inst *di = (srd_decoder_inst *)d->data; |
| 514 | srd_decoder *decoder = di->decoder; |
| 515 | const bool have_probes = (decoder->channels || decoder->opt_channels) != 0; |
| 516 | if (have_probes) { |
| 517 | logic_di = di; |
| 518 | break; |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | assert(logic_di); |
| 523 | |
| 524 | uint64_t entry_cnt = 0; |
| 525 | uint64_t i = decode_start; |
| 526 | char *error = NULL; |
| 527 | bool bError = false; |
| 528 | bool bEndTime = false; |
| 529 | //struct srd_push_param push_param; |
| 530 | |
| 531 | if( i >= decode_end){ |
| 532 | dsv_info("decode data index have been to end"); |
| 533 | } |
| 534 | |
| 535 | std::vector<const uint8_t *> chunk; |
| 536 | std::vector<uint8_t> chunk_const; |
| 537 | |
| 538 | bool bCheckEnd = false; |
| 539 | uint64_t end_index = decode_end; |
| 540 | |
| 541 | _progress = 0; |
| 542 | uint64_t sended_len = 0; |
| 543 | _is_decoding = true; |
| 544 | |
| 545 | void* lbp_array[35]; |
| 546 | |
| 547 | for (int j =0 ; j < logic_di->dec_num_channels; j++){ |
| 548 | lbp_array[j] = NULL; |
| 549 | } |
| 550 | |
| 551 | while(i < end_index && !_no_memory && !status->_bStop) |
| 552 | { |
| 553 | chunk.clear(); |
| 554 | chunk_const.clear(); |
| 555 | |
| 556 | if (_is_capture_end) |
| 557 | { |
| 558 | if (!bCheckEnd){ |
| 559 | bCheckEnd = true; |
nothing calls this directly
no test coverage detected