Exports for User.
More...
|
| int | sceMp4RecCreateRecorder (SceMp4RecRecorder *rec) |
| | Create a new MP4 video recorder.
|
| |
| int | sceMp4RecDeleteRecorder (SceMp4RecRecorder *rec) |
| | Delete an existing MP4 video recorder.
|
| |
| int | sceMp4RecQueryPhysicalMemSize (SceMp4RecRecorder *rec, int mode, uint32_t *encoder_size, uint32_t *av_size) |
| | Queries the required memory size for video and audio encoding.
|
| |
| int | sceMp4RecInit (SceMp4RecRecorder *rec, SceMp4RecInitParam *params) |
| | Init a new video recording session.
|
| |
| int | sceMp4RecTerm (SceMp4RecRecorder *rec, SceMp4RecTermParam *params) |
| | Terminate an ongoing recording session.
|
| |
| int | sceMp4RecCsc (SceMp4RecFrame *dst, SceMp4RecFrame *src) |
| | Perform hardware accelerated rescaling and colorspace conversion.
|
| |
| int | sceMp4RecAddVideoSample (SceMp4RecRecorder *rec, void *buffer, int size) |
| | Add a new video sample to the ongoing recording recording session.
|
| |
| int | sceMp4RecAddAudioSample (SceMp4RecRecorder *rec, void *buffer, int size) |
| | Add a new audio sample to the ongoing recording recording session.
|
| |
Exports for User.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
Load the required module:
int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_MP4_RECORDER
MP4 Recorder module.
Definition sysmodule.h:108
◆ SceMp4RecRecorder
| Data Fields |
|
SceSize |
size |
sizeof(SceMp4RecRecorder) |
|
void * |
base |
Pointer to the base address of the recorder memblock. |
|
uint32_t |
base_size |
Size of the recorder memblock in bytes. |
|
int |
unk |
Unknown area. |
◆ SceMp4RecInitParam
| struct SceMp4RecInitParam |
| Data Fields |
|
SceSize |
size |
sizeof(SceMp4RecInitParam) |
|
uint32_t |
mode |
One of SceMp4RecMode. |
|
void * |
encoder_mem |
Pointer to base address of a physically contiguous memory block to use for video encoding. |
|
uint32_t |
encoder_size |
Size of the memory block used for video encoding in bytes. |
|
void * |
av_mem |
Pointer to base address of a physically contiguous memory block to use for audio encoding. |
|
uint32_t |
av_size |
Size of the memory block used for audio encoding in bytes. |
|
int |
affinity |
CPU affinity mask for the recorder thread. |
|
int |
priority |
Priority for the recoreder thread. |
◆ SceMp4RecFrame
| Data Fields |
|
SceSize |
size |
sizeof(SceMp4RecFrame) |
|
int |
pixelformat |
Pixelformat (One of SceMp4RecPixelFormat) |
|
int |
stride |
Frame stride in pixels. |
|
int |
width |
Frame width in pixels. |
|
int |
height |
Frame height in pixels. |
|
char |
unk[16] |
Unknown area. |
|
void * |
buffer |
Pointer to the frame buffer. |
|
uint32_t |
reserved |
Reserved area. |
◆ SceMp4RecTermParam
| struct SceMp4RecTermParam |
| Data Fields |
|
SceSize |
size |
sizeof(SceMp4RecTermParam) |
|
SceBool |
discard |
Wether to save or discard the final video file. |
|
uint32_t |
reserved[128] |
Reserved area. |
|
void * |
metadata |
Metadata of the final video file. |
◆ SCE_MP4REC_COMMON_DENOM_TIMESCALE
| #define SCE_MP4REC_COMMON_DENOM_TIMESCALE 240000 |
Common denominator timescale between audio and video.
◆ SCE_MP4REC_VIDEO_TIMESCALE
| #define SCE_MP4REC_VIDEO_TIMESCALE 30000 |
◆ SCE_MP4REC_AUDIO_TIMESCALE
| #define SCE_MP4REC_AUDIO_TIMESCALE 48000 |
◆ SCE_MP4REC_VIDEO_SAMPLE_DURATION
| #define SCE_MP4REC_VIDEO_SAMPLE_DURATION 1001 |
Duration of a single video sample in ms.
◆ SCE_MP4REC_AUDIO_SAMPLE_DURATION
| #define SCE_MP4REC_AUDIO_SAMPLE_DURATION 1024 |
Duration of a single audio sample in ms.
◆ SCE_MP4REC_AUDIO_BUFFER_SIZE
| #define SCE_MP4REC_AUDIO_BUFFER_SIZE 4096 |
Size in bytes of the audio buffer used during recording.
◆ SceMp4RecPixelFormat
| Enumerator |
|---|
| SCE_MP4REC_PIXELFORMAT_A8B8G8R8 | 32-bit ABGR format
|
| SCE_MP4REC_PIXELFORMAT_YUV420_PACKED | Packed YUV420 format.
|
◆ SceMp4RecMode
| Enumerator |
|---|
| SCE_MP4REC_MODE_640_368_2MBPS | 640x368 with 2mbps bitrate
|
| SCE_MP4REC_MODE_640_368_1MBPS | 640x368 with 1mbps bitrate
|
| SCE_MP4REC_MODE_480_272_2MBPS | 480x272 with 2mbps bitrate
|
| SCE_MP4REC_MODE_480_272_1MBPS | 480x272 with 1mbps bitrate
|
| SCE_MP4REC_MODE_368_208_2MBPS | 368x208 with 2mbps bitrate
|
| SCE_MP4REC_MODE_368_208_1MBPS | 368x208 with 1mbps bitrate
|
◆ sceMp4RecCreateRecorder()
Create a new MP4 video recorder.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the new recorder. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecDeleteRecorder()
Delete an existing MP4 video recorder.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to delete. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecQueryPhysicalMemSize()
| int sceMp4RecQueryPhysicalMemSize |
( |
SceMp4RecRecorder * |
rec, |
|
|
int |
mode, |
|
|
uint32_t * |
encoder_size, |
|
|
uint32_t * |
av_size |
|
) |
| |
Queries the required memory size for video and audio encoding.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to use. |
| [in] | mode | - The recorder mode to use (One of SceMp4RecMode). |
| [out] | encoder_size | - The required size in bytes for the video encoding memory block. |
| [out] | av_size | - The required size in bytes for the audio encoding memory block. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecInit()
Init a new video recording session.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to use. |
| [in] | params | - Struct describing the recording session parameters to use. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecTerm()
Terminate an ongoing recording session.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to use. |
| [in] | params | - Struct describing the recording session parameters to use for the final video file. |
- Returns
- 0 on success, < 0 on error.
- Note
- - If the video is not discarded, it will be auomatically saved in ux0:video.
◆ sceMp4RecCsc()
Perform hardware accelerated rescaling and colorspace conversion.
- Parameters
-
| [in] | dst | - Struct describing the desired frame output setup. |
| [in] | src | - Struct describing the frame input setup. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecAddVideoSample()
Add a new video sample to the ongoing recording recording session.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to use. |
| [in] | buffer | - Buffer pointing to the frame buffer to add to the recording. |
| [in] | size | - Size in bytes of the passed frame buffer. |
- Returns
- 0 on success, < 0 on error.
◆ sceMp4RecAddAudioSample()
Add a new audio sample to the ongoing recording recording session.
- Parameters
-
| [in] | rec | - Struct describing memory layout for the recorder to use. |
| [in] | buffer | - Buffer pointing to the audio buffer to add to the recording. |
| [in] | size | - Size in bytes of the passed audio buffer (Must be SCE_MP4REC_AUDIO_BUFFER_SIZE) |
- Returns
- 0 on success, < 0 on error.
◆ size [1/4]
sizeof(SceMp4RecRecorder)
◆ base
| void* SceMp4RecRecorder::base |
Pointer to the base address of the recorder memblock.
◆ base_size
| uint32_t SceMp4RecRecorder::base_size |
Size of the recorder memblock in bytes.
◆ unk [1/2]
| int SceMp4RecRecorder::unk |
◆ size [2/4]
sizeof(SceMp4RecInitParam)
◆ mode
| uint32_t SceMp4RecInitParam::mode |
◆ encoder_mem
| void* SceMp4RecInitParam::encoder_mem |
Pointer to base address of a physically contiguous memory block to use for video encoding.
◆ encoder_size
| uint32_t SceMp4RecInitParam::encoder_size |
Size of the memory block used for video encoding in bytes.
◆ av_mem
| void* SceMp4RecInitParam::av_mem |
Pointer to base address of a physically contiguous memory block to use for audio encoding.
◆ av_size
| uint32_t SceMp4RecInitParam::av_size |
Size of the memory block used for audio encoding in bytes.
◆ affinity
| int SceMp4RecInitParam::affinity |
CPU affinity mask for the recorder thread.
◆ priority
| int SceMp4RecInitParam::priority |
Priority for the recoreder thread.
◆ size [3/4]
◆ pixelformat
| int SceMp4RecFrame::pixelformat |
◆ stride
| int SceMp4RecFrame::stride |
◆ width
| int SceMp4RecFrame::width |
◆ height
| int SceMp4RecFrame::height |
◆ unk [2/2]
| char SceMp4RecFrame::unk[16] |
◆ buffer
| void* SceMp4RecFrame::buffer |
Pointer to the frame buffer.
◆ reserved [1/2]
| uint32_t SceMp4RecFrame::reserved |
◆ size [4/4]
sizeof(SceMp4RecTermParam)
◆ discard
| SceBool SceMp4RecTermParam::discard |
Wether to save or discard the final video file.
◆ reserved [2/2]
| uint32_t SceMp4RecTermParam::reserved[128] |
◆ metadata
| void* SceMp4RecTermParam::metadata |
Metadata of the final video file.