MCPcopy Create free account
hub / github.com/TzuHuanTai/RaspberryPi-WebRTC / MutableData

Method MutableData

src/common/v4l2_frame_buffer.cpp:89–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87const void *V4L2FrameBuffer::Data() const { return data_ ? data_.get() : buffer_.start; }
88
89uint8_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
98int V4L2FrameBuffer::GetDmaFd() const { return buffer_.dmafd; }
99

Callers 1

CloneMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected