291
|
1 // Stream headers:
|
|
2
|
303
|
3 /*
|
291
|
4 typedef struct {
|
|
5 int driver;
|
|
6 // codec descriptor from codec.conf
|
|
7 } codecinfo_t;
|
303
|
8 */
|
291
|
9
|
|
10 typedef struct {
|
|
11 demux_stream_t *ds;
|
303
|
12 unsigned int format;
|
|
13 codecs_t *codec;
|
291
|
14 // output format:
|
|
15 int samplerate;
|
|
16 int samplesize;
|
|
17 int channels;
|
|
18 int o_bps; // == samplerate*samplesize*channels
|
296
|
19 // in buffers:
|
291
|
20 char* a_in_buffer;
|
|
21 int a_in_buffer_len;
|
|
22 int a_in_buffer_size;
|
296
|
23 // out buffers:
|
|
24 char* a_buffer;
|
|
25 int a_buffer_len;
|
|
26 int a_buffer_size;
|
291
|
27 // win32 codec stuff:
|
|
28 AVIStreamHeader audio;
|
|
29 WAVEFORMATEX wf;
|
|
30 char wf_ext[64]; // in format
|
|
31 WAVEFORMATEX o_wf; // out format
|
|
32 HACMSTREAM srcstream; // handle
|
|
33 int audio_in_minsize;
|
|
34 int audio_out_minsize;
|
|
35 // other codecs:
|
|
36 ac3_frame_t *ac3_frame;
|
|
37 int pcm_bswap;
|
|
38 } sh_audio_t;
|
|
39
|
|
40 typedef struct {
|
|
41 demux_stream_t *ds;
|
303
|
42 unsigned int format;
|
|
43 codecs_t *codec;
|
291
|
44 // output format:
|
|
45 float fps;
|
|
46 float frametime; // 1/fps
|
303
|
47 unsigned int outfmtidx;
|
291
|
48 // unsigned int bitrate;
|
|
49 // buffers:
|
|
50 char *our_out_buffer;
|
|
51 // win32 codec stuff:
|
|
52 AVIStreamHeader video;
|
|
53 BITMAPINFOHEADER bih; // in format
|
|
54 BITMAPINFOHEADER o_bih; // out format
|
|
55 HIC hic; // handle
|
|
56 } sh_video_t;
|
|
57
|