MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / decode_data

Method decode_data

DSView/pv/data/decoderstack.cpp:502–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502void 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;

Callers

nothing calls this directly

Calls 11

srd_session_sendFunction · 0.85
srd_session_endFunction · 0.85
get_sampleMethod · 0.80
is_able_freeMethod · 0.80
free_decode_lpbMethod · 0.80
is_closedMethod · 0.80
clearMethod · 0.45
get_ring_sample_countMethod · 0.45
has_dataMethod · 0.45
get_samplesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected