class VideoFrame
Defined at line 23 of file ../../src/camera/drivers/usb_video/video_frame.h
VideoFrame represents one frame of a video stream. Instances of this class
are created when a new frame is detected, and destroyed when the frame is fully
received into the buffer.
Public Methods
zx::result<fuchsia::camera::FrameAvailableEvent> Release ()
Releases the write lock on the buffer, and returns information
for transmitting that a frame is available for consumption.
This should only be called when ProcessPayload indicates
the frame is complete.
The returned FrameAvailableEvent accounts for frame errors, or if we didn't have a buffer.
Release will only return an error if there was a logical issue with the frame,
in which case the frame should not be sent to the stream client.
Defined at line 23 of file ../../src/camera/drivers/usb_video/video_frame.cc
void VideoFrame (fzl::VmoPool::Buffer buffer, const UsbState & usb_state, uint32_t frame_number)
Both the UsbState and the VmoPool which produced the buffer passed to VideoFrame
must be valid for the lifetime of the frame.
Defined at line 27 of file ../../src/camera/drivers/usb_video/video_frame.h
uint32_t FrameNumber ()
Defined at line 58 of file ../../src/camera/drivers/usb_video/video_frame.h
zx_status_t ProcessPayload (usb_request_t * req)
Extracts the payload data from the usb request response,
and stores it in the video buffer.
Defined at line 83 of file ../../src/camera/drivers/usb_video/video_frame.cc