Lines Matching refs:batch
412 ALOGD("channel '%s' consumer ~ consumed batch event, seq=%u",
440 Batch& batch = mBatches.editItemAt(batchIndex);
441 if (canAddSample(batch, &mMsg)) {
442 batch.samples.push(mMsg);
444 ALOGD("channel '%s' consumer ~ appended to batch event",
449 // We cannot append to the batch in progress, so we need to consume
450 // the previous batch right now and defer the new message until later.
453 batch, batch.samples.size(), outSeq, outEvent);
459 ALOGD("channel '%s' consumer ~ consumed batch event and "
467 // Start a new batch if needed.
471 Batch& batch = mBatches.editTop();
472 batch.samples.push(mMsg);
474 ALOGD("channel '%s' consumer ~ started batch event",
507 Batch& batch = mBatches.editItemAt(i);
509 result = consumeSamples(factory, batch, batch.samples.size(),
516 ssize_t split = findSampleNoLaterThan(batch, sampleTime);
521 result = consumeSamples(factory, batch, split + 1, outSeq, outEvent);
523 if (batch.samples.isEmpty()) {
527 next = &batch.samples.itemAt(0);
539 Batch& batch, size_t count, uint32_t* outSeq, InputEvent** outEvent) {
545 InputMessage& msg = batch.samples.editItemAt(i);
558 batch.samples.removeItemsAt(0, count);
802 // Send finished signals for the batch sequence chain first.
832 // Send finished signal for the last message in the batch.
854 const Batch& batch = mBatches.itemAt(i);
855 const InputMessage& head = batch.samples.itemAt(0);
926 bool InputConsumer::canAddSample(const Batch& batch, const InputMessage *msg) {
927 const InputMessage& head = batch.samples.itemAt(0);
942 ssize_t InputConsumer::findSampleNoLaterThan(const Batch& batch, nsecs_t time) {
943 size_t numSamples = batch.samples.size();
946 && batch.samples.itemAt(index).body.motion.eventTime <= time) {