RetroArch/record/ffemu.h

70 lines
1.3 KiB
C
Raw Normal View History

2011-01-03 17:51:17 +01:00
#ifndef __FFEMU_H
#define __FFEMU_H
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Parameters passed to ffemu_new()
struct ffemu_params
{
// FPS of input video.
double fps;
// Sample rate of input audio.
double samplerate;
2011-01-03 17:51:17 +01:00
// Desired output resolution.
unsigned out_width;
unsigned out_height;
2011-06-14 22:44:54 +02:00
// Total size of framebuffer used in input.
unsigned fb_width;
unsigned fb_height;
2011-01-03 17:51:17 +01:00
// Aspect ratio of input video. Parameters are passed to the muxer,
// the video itself is not scaled.
float aspect_ratio;
2011-01-03 17:51:17 +01:00
// Audio channels.
unsigned channels;
2011-08-11 05:25:31 +02:00
// If input is ARGB or XRGB1555.
bool rgb32;
2011-01-04 15:44:05 +01:00
// Filename to dump to.
const char *filename;
2011-01-03 17:51:17 +01:00
};
struct ffemu_video_data
{
const void *data;
unsigned width;
unsigned height;
2011-01-03 20:46:50 +01:00
unsigned pitch;
2011-11-22 17:27:02 +01:00
bool is_dupe;
2011-01-03 17:51:17 +01:00
};
struct ffemu_audio_data
{
const int16_t *data;
size_t frames;
};
typedef struct ffemu ffemu_t;
ffemu_t *ffemu_new(const struct ffemu_params *params);
void ffemu_free(ffemu_t* handle);
bool ffemu_push_video(ffemu_t *handle, const struct ffemu_video_data *data);
bool ffemu_push_audio(ffemu_t *handle, const struct ffemu_audio_data *data);
bool ffemu_finalize(ffemu_t *handle);
2011-01-03 17:51:17 +01:00
#ifdef __cplusplus
}
#endif
#endif