class Capture

Defined at line 80 of file ../../src/camera/bin/factory/capture.h

Public Members

uint32_t stream_
bool want_image_
function_impl callback_
vector image_
StreamProperties properties_
bool is_png_error_

Public Methods

fpromise::result<std::unique_ptr<Capture>, zx_status_t> Create (uint32_t stream, const std::string path, bool want_image, CaptureResponse callback)

Defined at line 14 of file ../../src/camera/bin/factory/capture.cc

void Capture ()

Defined at line 26 of file ../../src/camera/bin/factory/capture.cc

void ~Capture ()

Defined at line 87 of file ../../src/camera/bin/factory/capture.h

zx_status_t WriteImage (FILE * fp, WriteFlags flags, Crop & crop)

write frame data, converting, cropping and swapping if requested

crop is modified to return the actual dimensions written

crop is intersected with size of image (0 width/height means full image)

returns ZX_ERR_NOT_SUPPORTED if frame is an unsupported PixelFormat or flags

returns ZX_ERR_INVALID_ARGS if crop is not even coords

Defined at line 115 of file ../../src/camera/bin/factory/capture.cc

void WritePNGAsNV12 (FILE * fp)

write frame data assuming it's NV12, convert to RGB

Defined at line 331 of file ../../src/camera/bin/factory/capture.cc

void WritePNGUnprocessed (FILE * fp, bool is_bayer)

write frame data assuming as 8-bit gray. YUV/NV12 will show 2 planes, Y then UV.

if is_bayer is true, just output the Y plane (top 2/3 of height)

Defined at line 336 of file ../../src/camera/bin/factory/capture.cc