libnx
v4.8.0
|
GRC Game Recording (grc:*) service IPC wrapper. More...
#include "../types.h"
#include "../sf/service.h"
#include "../services/caps.h"
#include "../kernel/event.h"
#include "../kernel/tmem.h"
#include "../display/native_window.h"
Go to the source code of this file.
Data Structures | |
struct | GrcGameMovieTrimmer |
GameMovieTrimmer. More... | |
struct | GrcMovieMaker |
IMovieMaker. More... | |
struct | GrcGameMovieId |
GameMovieId. More... | |
struct | GrcOffscreenRecordingParameter |
OffscreenRecordingParameter. More... | |
Macros | |
#define | GRC_MOVIEMAKER_WORKMEMORY_SIZE_DEFAULT 0x6000000 |
Default size for grcCreateMovieMaker, this is the size used by official sw. | |
Enumerations | |
enum | GrcStream { GrcStream_Video = 0 , GrcStream_Audio = 1 } |
Stream type values for grcdTransfer. More... | |
Functions | |
Trimming | |
Result | grcTrimGameMovie (GrcGameMovieId *dst_movieid, const GrcGameMovieId *src_movieid, size_t tmem_size, const void *thumbnail, s32 start, s32 end) |
Creates a GrcGameMovieTrimmer using appletCreateGameMovieTrimmer, uses the cmds from it to trim the specified video, then closes it. More... | |
IMovieMaker | |
void | grcCreateOffscreenRecordingParameter (GrcOffscreenRecordingParameter *param) |
Creates a GrcOffscreenRecordingParameter with the default values, see GrcOffscreenRecordingParameter for the default values. More... | |
Result | grcCreateMovieMaker (GrcMovieMaker *m, size_t size) |
Creates a GrcMovieMaker using appletCreateMovieMaker, and does the required initialization. More... | |
void | grcMovieMakerClose (GrcMovieMaker *m) |
Closes a GrcMovieMaker. More... | |
static NWindow * | grcMovieMakerGetNWindow (GrcMovieMaker *m) |
Gets the NWindow for the specified MovieMaker. More... | |
Result | grcMovieMakerAbort (GrcMovieMaker *m) |
Aborts recording with the specified MovieMaker. More... | |
Result | grcMovieMakerStart (GrcMovieMaker *m, const GrcOffscreenRecordingParameter *param) |
Starts recording with the specified MovieMaker and GrcOffscreenRecordingParameter. More... | |
Result | grcMovieMakerFinish (GrcMovieMaker *m, s32 width, s32 height, const void *userdata, size_t userdata_size, const void *thumbnail, size_t thumbnail_size, CapsApplicationAlbumEntry *entry) |
Finishes recording with the specified MovieMaker. More... | |
Result | grcMovieMakerGetError (GrcMovieMaker *m) |
Gets the recording error with the specified MovieMaker. More... | |
Result | grcMovieMakerEncodeAudioSample (GrcMovieMaker *m, const void *buffer, size_t size) |
Encodes audio sample data with the specified MovieMaker. More... | |
grc:d | |
Result | grcdInitialize (void) |
Initialize grc:d. | |
void | grcdExit (void) |
Exit grc:d. | |
Service * | grcdGetServiceSession (void) |
Gets the Service for grc:d. | |
Result | grcdBegin (void) |
Begins streaming. This must not be called more than once, even from a different service session: otherwise the sysmodule will assert. | |
Result | grcdTransfer (GrcStream stream, void *buffer, size_t size, u32 *num_frames, u32 *data_size, u64 *start_timestamp) |
Retrieves stream data from the continuous recorder in use (from the video recording of the currently running application). More... | |
GRC Game Recording (grc:*) service IPC wrapper.
enum GrcStream |
Stream type values for grcdTransfer.
Result grcCreateMovieMaker | ( | GrcMovieMaker * | m, |
size_t | size | ||
) |
Creates a GrcMovieMaker using appletCreateMovieMaker, and does the required initialization.
[out] | m | GrcMovieMaker |
[in] | size | TransferMemory WorkMemory size. See GRC_MOVIEMAKER_WORKMEMORY_SIZE_DEFAULT. |
void grcCreateOffscreenRecordingParameter | ( | GrcOffscreenRecordingParameter * | param | ) |
Creates a GrcOffscreenRecordingParameter with the default values, see GrcOffscreenRecordingParameter for the default values.
[out] | param | GrcOffscreenRecordingParameter |
Result grcdTransfer | ( | GrcStream | stream, |
void * | buffer, | ||
size_t | size, | ||
u32 * | num_frames, | ||
u32 * | data_size, | ||
u64 * | start_timestamp | ||
) |
Retrieves stream data from the continuous recorder in use (from the video recording of the currently running application).
[in] | stream | GrcStream |
[out] | buffer | Output buffer. |
[in] | size | Max size of the output buffer. |
[out] | num_frames | num_frames |
[out] | data_size | Actual output data size. |
[out] | start_timestamp | Start timestamp. |
Result grcMovieMakerAbort | ( | GrcMovieMaker * | m | ) |
Aborts recording with the specified MovieMaker.
m | GrcMovieMaker |
void grcMovieMakerClose | ( | GrcMovieMaker * | m | ) |
Result grcMovieMakerEncodeAudioSample | ( | GrcMovieMaker * | m, |
const void * | buffer, | ||
size_t | size | ||
) |
Encodes audio sample data with the specified MovieMaker.
m | GrcMovieMaker | |
[in] | buffer | Audio buffer. |
[in] | size | Size of the buffer. |
Result grcMovieMakerFinish | ( | GrcMovieMaker * | m, |
s32 | width, | ||
s32 | height, | ||
const void * | userdata, | ||
size_t | userdata_size, | ||
const void * | thumbnail, | ||
size_t | thumbnail_size, | ||
CapsApplicationAlbumEntry * | entry | ||
) |
Finishes recording with the specified MovieMaker.
m | GrcMovieMaker | |
width | Width for the thumbnail, must be 1280. | |
height | Height for the thumbnail, must be 720. | |
[in] | userdata | UserData input buffer for the JPEG thumbnail. Optional, can be NULL. |
[in] | userdata_size | Size of the UserData input buffer. Optional, can be 0. Must be <=0x400. |
[in] | thumbnail | RGBA8 image buffer containing the thumbnail. Optional, can be NULL. |
[in] | thumbnail_size | Size of the thumbnail buffer. Optional, can be 0. |
[out] | entry | Output CapsApplicationAlbumEntry for the recorded video. Optional, can be NULL. Only available on [7.0.0+], if this is not NULL on pre-7.0.0 an error is thrown. |
Result grcMovieMakerGetError | ( | GrcMovieMaker * | m | ) |
Gets the recording error with the specified MovieMaker.
m | GrcMovieMaker |
|
inlinestatic |
Gets the NWindow for the specified MovieMaker.
m | GrcMovieMaker |
Result grcMovieMakerStart | ( | GrcMovieMaker * | m, |
const GrcOffscreenRecordingParameter * | param | ||
) |
Starts recording with the specified MovieMaker and GrcOffscreenRecordingParameter.
m | GrcMovieMaker | |
[in] | param | GrcOffscreenRecordingParameter |
Result grcTrimGameMovie | ( | GrcGameMovieId * | dst_movieid, |
const GrcGameMovieId * | src_movieid, | ||
size_t | tmem_size, | ||
const void * | thumbnail, | ||
s32 | start, | ||
s32 | end | ||
) |
Creates a GrcGameMovieTrimmer using appletCreateGameMovieTrimmer, uses the cmds from it to trim the specified video, then closes it.
[out] | dst_movieid | GrcGameMovieId for the output video. |
[in] | src_movieid | GrcGameMovieId for the input video. |
[in] | tmem_size | TransferMemory size. Official sw uses size 0x2000000. |
[in] | thumbnail | Optional, can be NULL. RGBA8 1280x720 thumbnail image data. |
[in] | start | Start timestamp in 0.5s units. |
[in] | end | End timestamp in 0.5s units. |