| 460 | } |
| 461 | |
| 462 | void VaapiRgbPacketProcessor::process(const RgbPacket &packet) |
| 463 | { |
| 464 | if (listener_ == 0) |
| 465 | return; |
| 466 | |
| 467 | impl_->startTiming(); |
| 468 | |
| 469 | impl_->frame->timestamp = packet.timestamp; |
| 470 | impl_->frame->sequence = packet.sequence; |
| 471 | impl_->frame->exposure = packet.exposure; |
| 472 | impl_->frame->gain = packet.gain; |
| 473 | impl_->frame->gamma = packet.gamma; |
| 474 | |
| 475 | unsigned char *buf = packet.jpeg_buffer; |
| 476 | size_t len = packet.jpeg_buffer_length; |
| 477 | VaapiBuffer *vb = static_cast<VaapiBuffer *>(packet.memory); |
| 478 | impl_->good = impl_->decompress(buf, len, vb); |
| 479 | |
| 480 | impl_->stopTiming(LOG_INFO); |
| 481 | |
| 482 | if (!impl_->good) |
| 483 | impl_->frame->status = 1; |
| 484 | |
| 485 | if (listener_->onNewFrame(Frame::Color, impl_->frame)) |
| 486 | impl_->newFrame(); |
| 487 | } |
| 488 | |
| 489 | Allocator *VaapiRgbPacketProcessor::getAllocator() |
| 490 | { |
nothing calls this directly
no test coverage detected