libnx
v4.7.0
|
Screenshot control (caps:sc) service IPC wrapper. More...
Go to the source code of this file.
Macros | |
#define | CAPSSC_JPEG_BUFFER_SIZE 0x80000 |
Functions | |
Result | capsscInitialize (void) |
Initialize caps:sc. Only available on [2.0.0+]. | |
void | capsscExit (void) |
Exit caps:sc. | |
Service * | capsscGetServiceSession (void) |
Gets the Service for caps:sc. | |
Result | capsscCaptureRawImageWithTimeout (void *buf, size_t size, ViLayerStack layer_stack, u64 width, u64 height, s64 buffer_count, s64 buffer_index, s64 timeout) |
This takes a screenshot, with the screenshot being written into the output buffer. More... | |
Result | capsscOpenRawScreenShotReadStream (u64 *out_size, u64 *out_width, u64 *out_height, ViLayerStack layer_stack, s64 timeout) |
This takes a raw screenshot, with the screenshot being held until capsscCloseRawScreenShotReadStream is called. More... | |
Result | capsscCloseRawScreenShotReadStream (void) |
Discards a stream opened by capsscOpenRawScreenShotReadStream. More... | |
Result | capsscReadRawScreenShotReadStream (u64 *bytes_read, void *buf, size_t size, u64 offset) |
Reads from a stream opened by capsscOpenRawScreenShotReadStream. More... | |
Result | capsscCaptureJpegScreenShot (u64 *out_jpeg_size, void *jpeg_buf, size_t jpeg_buf_size, ViLayerStack layer_stack, s64 timeout) |
This takes a screenshot, with the screenshot being written as jpeg into the output buffer. More... | |
Screenshot control (caps:sc) service IPC wrapper.
Result capsscCaptureJpegScreenShot | ( | u64 * | out_jpeg_size, |
void * | jpeg_buf, | ||
size_t | jpeg_buf_size, | ||
ViLayerStack | layer_stack, | ||
s64 | timeout | ||
) |
This takes a screenshot, with the screenshot being written as jpeg into the output buffer.
out_jpeg_size | Pointer to write the size of the captured jpeg to. |
jpeg_buf | Output buffer containing the JPEG image. |
jpeg_buf_size | Size of jpeg_buf, official software uses 0x80000. |
layer_stack | ViLayerStack |
timeout | Timeout in nanoseconds. |
Result capsscCaptureRawImageWithTimeout | ( | void * | buf, |
size_t | size, | ||
ViLayerStack | layer_stack, | ||
u64 | width, | ||
u64 | height, | ||
s64 | buffer_count, | ||
s64 | buffer_index, | ||
s64 | timeout | ||
) |
This takes a screenshot, with the screenshot being written into the output buffer.
buf | Output buffer containing the RGBA8 image. |
size | Size of buf, should be 0x384000(1280*720*4) * buffer_count. |
layer_stack | ViLayerStack |
width | Image width, must be 1280. |
height | Image height, must be 720. |
buffer_count | Total number of output image buffers. |
buffer_index | Starting image buffer index. Must be < buffer_count. |
timeout | Timeout in nanoseconds. A default value of 100000000 can be used. |
Result capsscCloseRawScreenShotReadStream | ( | void | ) |
Discards a stream opened by capsscOpenRawScreenShotReadStream.
Result capsscOpenRawScreenShotReadStream | ( | u64 * | out_size, |
u64 * | out_width, | ||
u64 * | out_height, | ||
ViLayerStack | layer_stack, | ||
s64 | timeout | ||
) |
This takes a raw screenshot, with the screenshot being held until capsscCloseRawScreenShotReadStream is called.
out_size | Pointer to write the size of the captured raw image to. Always 0x384000(1280*720*4). |
out_width | Pointer to write the width of the captured raw image to. Always 1280. |
out_height | Pointer to write the height of the captured raw image to. Always 720. |
layer_stack | ViLayerStack |
timeout | Timeout in nanoseconds. |
Reads from a stream opened by capsscOpenRawScreenShotReadStream.
bytes_read | Pointer to write the amounts of bytes written to buffer. |
buf | Output buffer containing the RGBA8 image. |
size | Size of buf. |
offset | Offset in image where read should start. |