Difference between revisions of "GRC services"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 108: Line 108:
 
== StartOffscreenRecording ==
 
== StartOffscreenRecording ==
 
Takes an input u64, no output.
 
Takes an input u64, no output.
 +
 +
Seems to be unused by official user processes, [[#StartOffscreenRecordingEx]] is used instead.
  
 
== AbortOffscreenRecording ==
 
== AbortOffscreenRecording ==
Takes an input u64, no output.
+
Takes an input u64 '''LayerHandle''', no output.
  
 
== RequestOffscreenRecordingFinishReady ==
 
== RequestOffscreenRecordingFinishReady ==
Takes an input u64, no output.
+
Takes an input u64 '''LayerHandle''', no output.
  
 
== StartOffscreenRecordingEx ==
 
== StartOffscreenRecordingEx ==
Takes an input u64 and an [[#OffscreenRecordingParameter]], no output.
+
Takes an input u64 '''LayerHandle''' and an [[#OffscreenRecordingParameter]], no output.
  
 
== CompleteOffscreenRecordingFinish ==
 
== CompleteOffscreenRecordingFinish ==
 
Takes an input u64 and a type-0x5 input buffer, no output.
 
Takes an input u64 and a type-0x5 input buffer, no output.
 +
 +
Seems to be unused by official user processes, [[#CompleteOffscreenRecordingFinishEx0]] is used instead.
  
 
== CompleteOffscreenRecordingFinishEx0 ==
 
== CompleteOffscreenRecordingFinishEx0 ==
Takes an input u64 and 2 type-0x5 input buffers, no output.
+
Takes an input u64 '''LayerHandle''' and 2 type-0x5 input buffers, no output.
  
 
== EncodeOffscreenLayerAudioSample ==
 
== EncodeOffscreenLayerAudioSample ==
Takes an input u64 and a type-0x5 input buffer, returns an output u64.
+
Takes an input u64 '''LayerHandle''' and a type-0x5 input buffer, returns an output u64.
  
 
== GetOffscreenLayerError ==
 
== GetOffscreenLayerError ==
Takes an input u64, no output.
+
Takes an input u64 '''LayerHandle''', no output.
  
 
== GetOffscreenLayerRecordingFinishReadyEvent ==
 
== GetOffscreenLayerRecordingFinishReadyEvent ==
Takes an input u64, returns an output handle.
+
Takes an input u64 '''LayerHandle''', returns an output event handle.
  
 
== GetOffscreenLayerAudioEncodeReadyEvent ==
 
== GetOffscreenLayerAudioEncodeReadyEvent ==
Takes an input u64, returns an output handle.
+
Takes an input u64 '''LayerHandle''', returns an output event handle.
  
 
= OffscreenRecordingParameter =
 
= OffscreenRecordingParameter =

Revision as of 21:21, 22 October 2018

GRC (Game Recording) uses libstagefright and the NvMMLite TVMR library for writing recorded video to MP4s.

Error reporting is done using the new /dev/nverpt-ctrl ioctls.

grc:c

This is "nn::grcsrv::IGrcService".

Cmd Name
1 OpenContinuousRecorder
2 OpenGameMovieTrimmer

IContinuousRecorder

This is "nn::grcsrv::IContinuousRecorder".

Cmd Name
1
2
10
11
12
13

IGameMovieTrimmer

This is "nn::grcsrv::IGameMovieTrimmer".

Cmd Name
1 BeginTrim
2 EndTrim
10 GetNotTrimmingEvent
20 SetThumbnailRgba

grc:d

This is "nn::grcsrv::IRemoteVideoTransfer".

Cmd Name
1
2

IMovieMaker

This is "nn::grcsrv::IMovieMaker".

Cmd Name
2 #CreateVideoProxy
10 #OpenOffscreenLayer
11 #CloseOffscreenLayer
20 #StartOffscreenRecording
21 #AbortOffscreenRecording
22 #RequestOffscreenRecordingFinishReady
23 #CompleteOffscreenRecordingFinish
24 #StartOffscreenRecordingEx
25 #CompleteOffscreenRecordingFinishEx0
30 #GetOffscreenLayerError
41 #EncodeOffscreenLayerAudioSample
50 #GetOffscreenLayerRecordingFinishReadyEvent
52 #GetOffscreenLayerAudioEncodeReadyEvent

CreateVideoProxy

No input, returns an IHOSBinderDriver.

OpenOffscreenLayer

Takes an input u64 LayerHandle, returns an output u32.

CloseOffscreenLayer

Takes an input u64 LayerHandle, no output.

StartOffscreenRecording

Takes an input u64, no output.

Seems to be unused by official user processes, #StartOffscreenRecordingEx is used instead.

AbortOffscreenRecording

Takes an input u64 LayerHandle, no output.

RequestOffscreenRecordingFinishReady

Takes an input u64 LayerHandle, no output.

StartOffscreenRecordingEx

Takes an input u64 LayerHandle and an #OffscreenRecordingParameter, no output.

CompleteOffscreenRecordingFinish

Takes an input u64 and a type-0x5 input buffer, no output.

Seems to be unused by official user processes, #CompleteOffscreenRecordingFinishEx0 is used instead.

CompleteOffscreenRecordingFinishEx0

Takes an input u64 LayerHandle and 2 type-0x5 input buffers, no output.

EncodeOffscreenLayerAudioSample

Takes an input u64 LayerHandle and a type-0x5 input buffer, returns an output u64.

GetOffscreenLayerError

Takes an input u64 LayerHandle, no output.

GetOffscreenLayerRecordingFinishReadyEvent

Takes an input u64 LayerHandle, returns an output event handle.

GetOffscreenLayerAudioEncodeReadyEvent

Takes an input u64 LayerHandle, returns an output event handle.

OffscreenRecordingParameter

This is a 0x80-byte struct.