| 87 | const void *V4L2FrameBuffer::Data() const { return data_ ? data_.get() : buffer_.start; } |
| 88 | |
| 89 | uint8_t *V4L2FrameBuffer::MutableData() { |
| 90 | if (!data_) { |
| 91 | throw std::runtime_error( |
| 92 | "MutableData() is not supported for frames directly created from V4L2 buffers. Use " |
| 93 | "Clone() to create an owning (writable) copy before calling MutableData()."); |
| 94 | } |
| 95 | return data_.get(); |
| 96 | } |
| 97 | |
| 98 | int V4L2FrameBuffer::GetDmaFd() const { return buffer_.dmafd; } |
| 99 |