9 #include "../sf/service.h"
10 #include "../services/caps.h"
11 #include "../kernel/event.h"
12 #include "../kernel/tmem.h"
13 #include "../display/native_window.h"
69 #define GRC_MOVIEMAKER_WORKMEMORY_SIZE_DEFAULT 0x6000000
Result grcMovieMakerGetError(GrcMovieMaker *m)
Gets the recording error with the specified MovieMaker.
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 ...
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 s...
Result grcdInitialize(void)
Initialize grc:d.
GrcStream
Stream type values for grcdTransfer.
Definition: grc.h:16
@ GrcStream_Video
Video stream with H.264 NAL units. Official sw uses buffer size 0x32000.
Definition: grc.h:17
@ GrcStream_Audio
Audio stream with PcmFormat_Int16, 2 channels, and samplerate = 48000Hz. Official sw uses buffer size...
Definition: grc.h:18
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.
Result grcMovieMakerEncodeAudioSample(GrcMovieMaker *m, const void *buffer, size_t size)
Encodes audio sample data with the specified MovieMaker.
Result grcCreateMovieMaker(GrcMovieMaker *m, size_t size)
Creates a GrcMovieMaker using appletCreateMovieMaker, and does the required initialization.
void grcMovieMakerClose(GrcMovieMaker *m)
Closes a GrcMovieMaker.
Result grcMovieMakerStart(GrcMovieMaker *m, const GrcOffscreenRecordingParameter *param)
Starts recording with the specified MovieMaker and GrcOffscreenRecordingParameter.
Result grcMovieMakerAbort(GrcMovieMaker *m)
Aborts recording with the specified MovieMaker.
Result grcdBegin(void)
Begins streaming. This must not be called more than once, even from a different service session: othe...
static NWindow * grcMovieMakerGetNWindow(GrcMovieMaker *m)
Gets the NWindow for the specified MovieMaker.
Definition: grc.h:117
void grcdExit(void)
Exit grc:d.
void grcCreateOffscreenRecordingParameter(GrcOffscreenRecordingParameter *param)
Creates a GrcOffscreenRecordingParameter with the default values, see GrcOffscreenRecordingParameter ...
Service * grcdGetServiceSession(void)
Gets the Service for grc:d.
AlbumEntryId.
Definition: caps.h:91
ApplicationAlbumEntry.
Definition: caps.h:108
Kernel-mode event structure.
Definition: event.h:13
GameMovieId.
Definition: grc.h:42
CapsAlbumFileId file_id
CapsAlbumFileId
Definition: grc.h:43
GameMovieTrimmer.
Definition: grc.h:22
Service s
IGameMovieTrimmer.
Definition: grc.h:23
TransferMemory tmem
TransferMemory.
Definition: grc.h:24
IMovieMaker.
Definition: grc.h:28
bool started_flag
Whether grcMovieMakerStart was used successfully. This is also used by grcMovieMakerAbort.
Definition: grc.h:38
Service a
applet IMovieMaker
Definition: grc.h:29
Event audio_event
Output Event from GetOffscreenLayerAudioEncodeReadyEvent with autoclear=false.
Definition: grc.h:33
Event recording_event
Output Event from GetOffscreenLayerRecordingFinishReadyEvent with autoclear=false.
Definition: grc.h:32
bool layer_open
Whether OpenOffscreenLayer was used successfully, indicating that CloseOffscreenLayer should be used ...
Definition: grc.h:37
u64 layer_handle
LayerHandle.
Definition: grc.h:36
Service s
grc IMovieMaker
Definition: grc.h:30
TransferMemory tmem
TransferMemory.
Definition: grc.h:34
Service video_proxy
IHOSBinderDriver VideoProxy.
Definition: grc.h:31
NWindow win
NWindow
Definition: grc.h:35
OffscreenRecordingParameter.
Definition: grc.h:48
s32 video_width
VideoWidth, must match 1280 or 1920. Default value is 1280.
Definition: grc.h:53
s32 video_height
VideoHeight, must match 720 or 1080. Default value is 720.
Definition: grc.h:54
s32 audio_sample_format
PcmFormat AudioSampleFormat. Must match PcmFormat_Int16, which is the default value.
Definition: grc.h:61
s32 audio_bitrate
AudioBitRate. Default value is 128000 ([5.0.0-5.1.0] 1536000).
Definition: grc.h:58
s32 audio_samplerate
AudioSampleRate, 0 is invalid. Default value is 48000.
Definition: grc.h:59
s32 audio_channel_count
AudioChannelCount. Must match 2, which is the default value.
Definition: grc.h:60
s32 video_framerate
VideoFrameRate, must match 30 or 60. Default value is 30.
Definition: grc.h:55
u32 unk_x10
Unknown. Must match value 0x103, which is the default value.
Definition: grc.h:50
s32 video_keyFrameInterval
VideoKeyFrameInterval, 0 is invalid. Default value is 30.
Definition: grc.h:56
s32 video_imageOrientation
AlbumImageOrientation VideoImageOrientation. Default value is AlbumImageOrientation_Unknown0.
Definition: grc.h:63
s32 video_bitrate
VideoBitRate, 0 is invalid. Default value is 8000000.
Definition: grc.h:52
Native window structure.
Definition: native_window.h:17
Service object structure.
Definition: service.h:14
Transfer memory information structure.
Definition: tmem.h:13
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21