libnx
v4.2.0
include
switch
services
capsdc.h
Go to the documentation of this file.
1
/**
2
* @file capsdc.h
3
* @brief Jpeg Decoder (caps:dc) service IPC wrapper. Only available on [4.0.0+].
4
* @note Only holds one session that is occupied by capsrv.
5
* @author Behemoth
6
* @copyright libnx Authors
7
*/
8
#pragma once
9
#include "../types.h"
10
#include "../sf/service.h"
11
#include "../services/caps.h"
12
13
/// Initialize caps:dc
14
Result
capsdcInitialize
(
void
);
15
16
/// Exit caps:dc.
17
void
capsdcExit
(
void
);
18
19
/// Gets the Service for caps:dc.
20
Service
*
capsdcGetServiceSession
(
void
);
21
22
/**
23
* @brief Decodes a jpeg buffer into RGBX.
24
* @param[in] width Image width.
25
* @param[in] height Image height.
26
* @param[in] opts \ref CapsScreenShotDecodeOption.
27
* @param[in] jpeg Jpeg image input buffer.
28
* @param[in] jpeg_size Input image buffer size.
29
* @param[out] out_image RGBA8 image output buffer.
30
* @param[in] out_image_size Output image buffer size, should be at least large enough for RGBA8 width x height.
31
*/
32
Result
capsdcDecodeJpeg
(
u32
width,
u32
height,
const
CapsScreenShotDecodeOption
*opts,
const
void
* jpeg,
size_t
jpeg_size,
void
* out_image,
size_t
out_image_size);
CapsScreenShotDecodeOption
ScreenShotDecodeOption.
Definition:
caps.h:74
u32
uint32_t u32
32-bit unsigned integer.
Definition:
types.h:21
Result
u32 Result
Function error code result type.
Definition:
types.h:44
capsdcDecodeJpeg
Result capsdcDecodeJpeg(u32 width, u32 height, const CapsScreenShotDecodeOption *opts, const void *jpeg, size_t jpeg_size, void *out_image, size_t out_image_size)
Decodes a jpeg buffer into RGBX.
capsdcExit
void capsdcExit(void)
Exit caps:dc.
Service
Service object structure.
Definition:
service.h:13
capsdcInitialize
Result capsdcInitialize(void)
Initialize caps:dc.
capsdcGetServiceSession
Service * capsdcGetServiceSession(void)
Gets the Service for caps:dc.
Generated by
1.8.17