2001-04-06 01:18:59 +00:00
|
|
|
// Stream headers:
|
|
|
|
|
2001-04-07 21:27:57 +00:00
|
|
|
/*
|
2001-04-06 01:18:59 +00:00
|
|
|
typedef struct {
|
|
|
|
int driver;
|
|
|
|
// codec descriptor from codec.conf
|
|
|
|
} codecinfo_t;
|
2001-04-07 21:27:57 +00:00
|
|
|
*/
|
2001-04-06 01:18:59 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
demux_stream_t *ds;
|
2001-04-07 21:27:57 +00:00
|
|
|
unsigned int format;
|
|
|
|
codecs_t *codec;
|
2001-04-06 01:18:59 +00:00
|
|
|
// output format:
|
|
|
|
int samplerate;
|
|
|
|
int samplesize;
|
|
|
|
int channels;
|
|
|
|
int o_bps; // == samplerate*samplesize*channels
|
2001-04-06 16:31:18 +00:00
|
|
|
// in buffers:
|
2001-04-06 01:18:59 +00:00
|
|
|
char* a_in_buffer;
|
|
|
|
int a_in_buffer_len;
|
|
|
|
int a_in_buffer_size;
|
2001-04-06 16:31:18 +00:00
|
|
|
// out buffers:
|
|
|
|
char* a_buffer;
|
|
|
|
int a_buffer_len;
|
|
|
|
int a_buffer_size;
|
2001-04-06 01:18:59 +00:00
|
|
|
// win32 codec stuff:
|
|
|
|
AVIStreamHeader audio;
|
|
|
|
WAVEFORMATEX wf;
|
|
|
|
char wf_ext[64]; // in format
|
|
|
|
WAVEFORMATEX o_wf; // out format
|
|
|
|
HACMSTREAM srcstream; // handle
|
|
|
|
int audio_in_minsize;
|
|
|
|
int audio_out_minsize;
|
|
|
|
// other codecs:
|
|
|
|
ac3_frame_t *ac3_frame;
|
|
|
|
int pcm_bswap;
|
|
|
|
} sh_audio_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
demux_stream_t *ds;
|
2001-04-07 21:27:57 +00:00
|
|
|
unsigned int format;
|
|
|
|
codecs_t *codec;
|
2001-04-06 01:18:59 +00:00
|
|
|
// output format:
|
|
|
|
float fps;
|
|
|
|
float frametime; // 1/fps
|
2001-04-07 21:27:57 +00:00
|
|
|
unsigned int outfmtidx;
|
2001-04-06 01:18:59 +00:00
|
|
|
// unsigned int bitrate;
|
|
|
|
// buffers:
|
|
|
|
char *our_out_buffer;
|
|
|
|
// win32 codec stuff:
|
|
|
|
AVIStreamHeader video;
|
|
|
|
BITMAPINFOHEADER bih; // in format
|
|
|
|
BITMAPINFOHEADER o_bih; // out format
|
|
|
|
HIC hic; // handle
|
|
|
|
} sh_video_t;
|
|
|
|
|