Mercurial > mplayer.hg
annotate stheader.h @ 1928:07f50ea77510
added ffmp3, fixed mp3 comments
author | arpi |
---|---|
date | Fri, 21 Sep 2001 21:38:16 +0000 |
parents | 60afe3421c04 |
children | 624df8ea0e0e |
rev | line source |
---|---|
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 |
1828 | 10 #ifdef HAVE_OGGVORBIS |
11 #include <math.h> | |
12 #include <vorbis/codec.h> | |
13 typedef struct { | |
14 ogg_sync_state oy; /* sync and verify incoming physical bitstream */ | |
15 ogg_stream_state os; /* take physical pages, weld into a logical | |
16 stream of packets */ | |
17 ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ | |
18 ogg_packet op; /* one raw packet of data for decode */ | |
19 | |
20 vorbis_info vi; /* struct that stores all the static vorbis bitstream | |
21 settings */ | |
22 vorbis_comment vc; /* struct that stores all the bitstream user comments */ | |
23 vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ | |
24 vorbis_block vb; /* local working space for packet->PCM decode */ | |
25 } ov_struct_t; | |
26 #endif | |
27 | |
291 | 28 typedef struct { |
29 demux_stream_t *ds; | |
303 | 30 unsigned int format; |
31 codecs_t *codec; | |
1656 | 32 int inited; |
291 | 33 // output format: |
1369
7a2f1881b776
a_frame, v_frame killed, using sh_audio/video->timer. has_audio not more used after initialization.
arpi
parents:
1289
diff
changeset
|
34 float timer; // value of old a_frame |
291 | 35 int samplerate; |
36 int samplesize; | |
37 int channels; | |
746 | 38 int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) |
39 int i_bps; // == bitrate (compressed bytes/sec) | |
296 | 40 // in buffers: |
291 | 41 char* a_in_buffer; |
42 int a_in_buffer_len; | |
43 int a_in_buffer_size; | |
296 | 44 // out buffers: |
45 char* a_buffer; | |
46 int a_buffer_len; | |
47 int a_buffer_size; | |
758 | 48 int sample_format; |
291 | 49 // win32 codec stuff: |
50 AVIStreamHeader audio; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
51 WAVEFORMATEX *wf; |
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
52 // char wf_ext[64]; // in format |
291 | 53 WAVEFORMATEX o_wf; // out format |
54 HACMSTREAM srcstream; // handle | |
55 int audio_in_minsize; | |
56 int audio_out_minsize; | |
57 // other codecs: | |
587
8511095c5283
stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents:
432
diff
changeset
|
58 // ac3_frame_t *ac3_frame; |
8511095c5283
stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents:
432
diff
changeset
|
59 void* ac3_frame; |
291 | 60 int pcm_bswap; |
1828 | 61 #ifdef HAVE_OGGVORBIS |
62 ov_struct_t *ov; // should be assigned on init | |
63 #endif | |
291 | 64 } sh_audio_t; |
65 | |
66 typedef struct { | |
67 demux_stream_t *ds; | |
303 | 68 unsigned int format; |
69 codecs_t *codec; | |
1656 | 70 int inited; |
291 | 71 // output format: |
1369
7a2f1881b776
a_frame, v_frame killed, using sh_audio/video->timer. has_audio not more used after initialization.
arpi
parents:
1289
diff
changeset
|
72 float timer; // value of old v_frame |
291 | 73 float fps; |
74 float frametime; // 1/fps | |
1400 | 75 int i_bps; // == bitrate (compressed bytes/sec) |
399 | 76 int disp_w,disp_h; // display size (filled by fileformat parser) |
77 // int coded_w,coded_h; // coded size (filled by video codec) | |
303 | 78 unsigned int outfmtidx; |
291 | 79 // unsigned int bitrate; |
80 // buffers: | |
1400 | 81 float num_frames; // number of frames played |
1546 | 82 int num_frames_decoded; // number of frames decoded |
291 | 83 char *our_out_buffer; |
84 // win32 codec stuff: | |
85 AVIStreamHeader video; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
86 BITMAPINFOHEADER *bih; // in format |
291 | 87 BITMAPINFOHEADER o_bih; // out format |
88 HIC hic; // handle | |
89 } sh_video_t; | |
90 | |
1289 | 91 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); |
92 sh_video_t* new_sh_video(demuxer_t *demuxer,int id); | |
426 | 93 |