// Find the decoder in the stack
auto iter = stack_.begin();
- for(int i = 0; i < index; i++, iter++)
+ for (int i = 0; i < index; i++, iter++)
assert(iter != stack_.end());
// Delete the element
return samplerate_;
}
-double DecoderStack::start_time() const
+const pv::util::Timestamp& DecoderStack::start_time() const
{
return start_time_;
}
optional<int64_t> DecoderStack::wait_for_data() const
{
unique_lock<mutex> input_lock(input_mutex_);
- while(!interrupt_ && !frame_complete_ &&
+ while (!interrupt_ && !frame_complete_ &&
samples_decoded_ >= sample_count_)
input_cond_.wait(input_lock);
return boost::make_optional(!interrupt_ &&
segment_->get_samples(chunk, i, chunk_end);
if (srd_session_send(session, i, chunk_end, chunk,
- (chunk_end - i) * unit_size) != SRD_OK) {
+ (chunk_end - i) * unit_size, unit_size) != SRD_OK) {
error_message_ = tr("Decoder reported an error");
break;
}
for (const shared_ptr<decode::Decoder> &dec : stack_)
{
- srd_decoder_inst *const di = dec->create_decoder_inst(session, unit_size);
+ srd_decoder_inst *const di = dec->create_decoder_inst(session);
if (!di)
{
do {
decode_data(*sample_count, unit_size, session);
- } while(error_message_.isEmpty() && (sample_count = wait_for_data()));
+ } while (error_message_.isEmpty() && (sample_count = wait_for_data()));
// Destroy the session
srd_session_destroy(session);