vitasdk
Documentation of the vitasdk
mp4rec.h
Go to the documentation of this file.
1
6#ifndef _PSP2_MP4REC_H_
7#define _PSP2_MP4REC_H_
8
10#include <psp2/types.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#define SCE_MP4REC_COMMON_DENOM_TIMESCALE 240000
17#define SCE_MP4REC_VIDEO_TIMESCALE 30000
18#define SCE_MP4REC_AUDIO_TIMESCALE 48000
19
20#define SCE_MP4REC_VIDEO_SAMPLE_DURATION 1001
21#define SCE_MP4REC_AUDIO_SAMPLE_DURATION 1024
22
23#define SCE_MP4REC_AUDIO_BUFFER_SIZE 4096
24
29
38
39typedef struct {
41 void *base;
42 uint32_t base_size;
43 int unk;
45
46typedef struct {
48 uint32_t mode;
50 uint32_t encoder_size;
51 void *av_mem;
52 uint32_t av_size;
56
57typedef struct {
60 int stride;
61 int width;
62 int height;
63 char unk[16];
64 void *buffer;
65 uint32_t reserved;
67
68typedef struct {
71 uint32_t reserved[128];
72 void *metadata;
74
84
94
106int sceMp4RecQueryPhysicalMemSize(SceMp4RecRecorder *rec, int mode, uint32_t *encoder_size, uint32_t *av_size);
107
118
130
141
153
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif /* _PSP2_MP4REC_H_ */
void * buffer
Definition bt.h:6
SceSize size
struct size(variable size)
Definition debug.h:0
SceSize size
sizeof(SceMp4RecRecorder)
Definition mp4rec.h:40
int pixelformat
Pixelformat (One of SceMp4RecPixelFormat)
Definition mp4rec.h:59
SceBool discard
Wether to save or discard the final video file.
Definition mp4rec.h:70
void * base
Pointer to the base address of the recorder memblock.
Definition mp4rec.h:41
uint32_t reserved
Reserved area.
Definition mp4rec.h:65
uint32_t mode
One of SceMp4RecMode.
Definition mp4rec.h:48
SceMp4RecMode
Definition mp4rec.h:30
uint32_t base_size
Size of the recorder memblock in bytes.
Definition mp4rec.h:42
uint32_t av_size
Size of the memory block used for audio encoding in bytes.
Definition mp4rec.h:52
SceSize size
sizeof(SceMp4RecInitParam)
Definition mp4rec.h:47
int sceMp4RecCreateRecorder(SceMp4RecRecorder *rec)
Create a new MP4 video recorder.
int sceMp4RecDeleteRecorder(SceMp4RecRecorder *rec)
Delete an existing MP4 video recorder.
int affinity
CPU affinity mask for the recorder thread.
Definition mp4rec.h:53
int stride
Frame stride in pixels.
Definition mp4rec.h:60
int width
Frame width in pixels.
Definition mp4rec.h:61
int height
Frame height in pixels.
Definition mp4rec.h:62
uint32_t encoder_size
Size of the memory block used for video encoding in bytes.
Definition mp4rec.h:50
void * buffer
Pointer to the frame buffer.
Definition mp4rec.h:64
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.
SceSize size
sizeof(SceMp4RecTermParam)
Definition mp4rec.h:69
void * av_mem
Pointer to base address of a physically contiguous memory block to use for audio encoding.
Definition mp4rec.h:51
int sceMp4RecTerm(SceMp4RecRecorder *rec, SceMp4RecTermParam *params)
Terminate an ongoing recording session.
void * metadata
Metadata of the final video file.
Definition mp4rec.h:72
int sceMp4RecCsc(SceMp4RecFrame *dst, SceMp4RecFrame *src)
Perform hardware accelerated rescaling and colorspace conversion.
int unk
Unknown area.
Definition mp4rec.h:43
SceSize size
sizeof(SceMp4RecFrame)
Definition mp4rec.h:58
void * encoder_mem
Pointer to base address of a physically contiguous memory block to use for video encoding.
Definition mp4rec.h:49
SceMp4RecPixelFormat
Definition mp4rec.h:25
int sceMp4RecAddAudioSample(SceMp4RecRecorder *rec, void *buffer, int size)
Add a new audio sample to the ongoing recording recording session.
int sceMp4RecAddVideoSample(SceMp4RecRecorder *rec, void *buffer, int size)
Add a new video sample to the ongoing recording recording session.
int priority
Priority for the recoreder thread.
Definition mp4rec.h:54
@ SCE_MP4REC_MODE_640_368_1MBPS
640x368 with 1mbps bitrate
Definition mp4rec.h:32
@ SCE_MP4REC_MODE_368_208_2MBPS
368x208 with 2mbps bitrate
Definition mp4rec.h:35
@ SCE_MP4REC_MODE_480_272_1MBPS
480x272 with 1mbps bitrate
Definition mp4rec.h:34
@ SCE_MP4REC_MODE_640_368_2MBPS
640x368 with 2mbps bitrate
Definition mp4rec.h:31
@ SCE_MP4REC_MODE_368_208_1MBPS
368x208 with 1mbps bitrate
Definition mp4rec.h:36
@ SCE_MP4REC_MODE_480_272_2MBPS
480x272 with 2mbps bitrate
Definition mp4rec.h:33
@ SCE_MP4REC_PIXELFORMAT_YUV420_PACKED
Packed YUV420 format.
Definition mp4rec.h:27
@ SCE_MP4REC_PIXELFORMAT_A8B8G8R8
32-bit ABGR format
Definition mp4rec.h:26
Definition mp4rec.h:57
Definition mp4rec.h:46
Definition mp4rec.h:39
Definition mp4rec.h:68
int SceBool
Definition types.h:59
unsigned int SceSize
Definition types.h:56