Lines Matching refs:batch
419 ALOGD("channel '%s' consumer ~ consumed batch event, seq=%u",
447 Batch& batch = mBatches.editItemAt(batchIndex);
448 if (canAddSample(batch, &mMsg)) {
449 batch.samples.push(mMsg);
451 ALOGD("channel '%s' consumer ~ appended to batch event",
456 // We cannot append to the batch in progress, so we need to consume
457 // the previous batch right now and defer the new message until later.
460 batch, batch.samples.size(), outSeq, outEvent);
466 ALOGD("channel '%s' consumer ~ consumed batch event and "
474 // Start a new batch if needed.
478 Batch& batch = mBatches.editTop();
479 batch.samples.push(mMsg);
481 ALOGD("channel '%s' consumer ~ started batch event",
514 Batch& batch = mBatches.editItemAt(i);
516 result = consumeSamples(factory, batch, batch.samples.size(),
526 ssize_t split = findSampleNoLaterThan(batch, sampleTime);
531 result = consumeSamples(factory, batch, split + 1, outSeq, outEvent);
533 if (batch.samples.isEmpty()) {
537 next = &batch.samples.itemAt(0);
549 Batch& batch, size_t count, uint32_t* outSeq, InputEvent** outEvent) {
555 InputMessage& msg = batch.samples.editItemAt(i);
568 batch.samples.removeItemsAt(0, count);
812 // Send finished signals for the batch sequence chain first.
842 // Send finished signal for the last message in the batch.
864 const Batch& batch = mBatches.itemAt(i);
865 const InputMessage& head = batch.samples.itemAt(0);
936 bool InputConsumer::canAddSample(const Batch& batch, const InputMessage *msg) {
937 const InputMessage& head = batch.samples.itemAt(0);
952 ssize_t InputConsumer::findSampleNoLaterThan(const Batch& batch, nsecs_t time) {
953 size_t numSamples = batch.samples.size();
956 && batch.samples.itemAt(index).body.motion.eventTime <= time) {