* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
-const int64_t DecoderStack::DecodeChunkLength = 4096;
-const unsigned int DecoderStack::DecodeNotifyPeriod = 65536;
+const int64_t DecoderStack::DecodeChunkLength = 10 * 1024 * 1024;
+const unsigned int DecoderStack::DecodeNotifyPeriod = 1024;
DecoderStack::DecoderStack(pv::Session &session,
const srd_decoder *const dec) :
DecoderStack::DecoderStack(pv::Session &session,
const srd_decoder *const dec) :
connect(&session_, SIGNAL(frame_ended()),
this, SLOT(on_frame_ended()));
connect(&session_, SIGNAL(frame_ended()),
this, SLOT(on_frame_ended()));
// Add the decoder rows
for (const GSList *l = decc->annotation_rows; l; l = l->next) {
const srd_decoder_annotation_row *const ann_row =
(srd_decoder_annotation_row *)l->data;
assert(ann_row);
// Add the decoder rows
for (const GSList *l = decc->annotation_rows; l; l = l->next) {
const srd_decoder_annotation_row *const ann_row =
(srd_decoder_annotation_row *)l->data;
assert(ann_row);
const Row &row, uint64_t start_sample,
uint64_t end_sample) const
{
const Row &row, uint64_t start_sample,
uint64_t end_sample) const
{
// We get the logic data of the first channel in the list.
// This works because we are currently assuming all
// We get the logic data of the first channel in the list.
// This works because we are currently assuming all
- ((logic_signal = (*dec->channels().begin()).second)) &&
- ((data = logic_signal->logic_data())))
+ ((signalbase = (*dec->channels().begin()).second.get())) &&
+ ((data = signalbase->logic_data().get())))
- const int64_t sample_count, const unsigned int unit_size,
+ const int64_t abs_start_samplenum, const int64_t sample_count, const unsigned int unit_size,
const int64_t chunk_end = min(
i + chunk_sample_count, sample_count);
const int64_t chunk_end = min(
i + chunk_sample_count, sample_count);
if (srd_session_send(session, i, chunk_end, chunk,
(chunk_end - i) * unit_size, unit_size) != SRD_OK) {
error_message_ = tr("Decoder reported an error");
if (srd_session_send(session, i, chunk_end, chunk,
(chunk_end - i) * unit_size, unit_size) != SRD_OK) {
error_message_ = tr("Decoder reported an error");
- decode_data(*sample_count, unit_size, session);
+ decode_data(abs_start_samplenum, *sample_count, unit_size, session);
+ abs_start_samplenum = *sample_count;
row_iter = d->rows_.find((*r).second);
else {
// Failing that, use the decoder as a key
row_iter = d->rows_.find((*r).second);
else {
// Failing that, use the decoder as a key
}
assert(row_iter != d->rows_.end());
if (row_iter == d->rows_.end()) {
qDebug() << "Unexpected annotation: decoder = " << decc <<
", format = " << a.format();
}
assert(row_iter != d->rows_.end());
if (row_iter == d->rows_.end()) {
qDebug() << "Unexpected annotation: decoder = " << decc <<
", format = " << a.format();