grc: Renamed grcdRead to grcdTransfer and updated the param names for it.

This commit is contained in:
yellows8 2019-10-23 23:32:33 -04:00
parent e81b63ac00
commit 0d5e51757d
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 10 additions and 10 deletions

View File

@ -12,7 +12,7 @@
#include "../kernel/tmem.h"
#include "../display/native_window.h"
/// Stream type values for \ref grcdRead.
/// Stream type values for \ref grcdTransfer.
typedef enum {
GrcStream_Video = 0, ///< Video stream with H.264 NAL units. Official sw uses buffer size 0x32000.
GrcStream_Audio = 1, ///< Audio stream with PcmFormat_Int16, 2 channels, and samplerate = 48000Hz. Official sw uses buffer size 0x1000.
@ -182,16 +182,16 @@ Service* grcdGetServiceSession(void);
Result grcdBegin(void);
/**
* @brief Reads a stream, from the video recording being done of the currently running game title.
* @brief Retrieves stream data from the continuous recorder in use (from the video recording of the currently running game title).
* @note This will block until data is available. This will hang if there is no game title running which has video capture enabled.
* @param[in] stream \ref GrcStream
* @param[out] buffer Output buffer.
* @param[in] size Max size of the output buffer.
* @param[out] unk Unknown.
* @param[out] num_frames num_frames
* @param[out] data_size Actual output data size.
* @param[out] timestamp Timestamp?
* @param[out] start_timestamp Start timestamp.
*/
Result grcdRead(GrcStream stream, void* buffer, size_t size, u32 *unk, u32 *data_size, u64 *timestamp);
Result grcdTransfer(GrcStream stream, void* buffer, size_t size, u32 *num_frames, u32 *data_size, u64 *start_timestamp);
///@}

View File

@ -377,11 +377,11 @@ Result grcdBegin(void) {
return _grcCmdNoIO(&g_grcdSrv, 1);
}
Result grcdRead(GrcStream stream, void* buffer, size_t size, u32 *unk, u32 *data_size, u64 *timestamp) {
Result grcdTransfer(GrcStream stream, void* buffer, size_t size, u32 *num_frames, u32 *data_size, u64 *start_timestamp) {
struct {
u32 unk;
u32 num_frames;
u32 data_size;
u64 timestamp;
u64 start_timestamp;
} out;
u32 tmp=stream;
@ -390,9 +390,9 @@ Result grcdRead(GrcStream stream, void* buffer, size_t size, u32 *unk, u32 *data
.buffers = { { buffer, size } },
);
if (R_SUCCEEDED(rc)) {
if (unk) *unk = out.unk;
if (num_frames) *num_frames = out.num_frames;
if (data_size) *data_size = out.data_size;
if (timestamp) *timestamp = out.timestamp;
if (start_timestamp) *start_timestamp = out.start_timestamp;
}
return rc;
}