Mercurial > mplayer.hg
annotate libmpdemux/stheader.h @ 5599:3dde5e5eef90
syncfb, mp1e, opendivx removed/disabled
author | arpi |
---|---|
date | Sat, 13 Apr 2002 17:28:33 +0000 |
parents | b8b6fcb5062a |
children | 1972c3475d93 |
rev | line source |
---|---|
4933 | 1 #ifndef __ST_HEADER_H |
2 #define __ST_HEADER_H 1 | |
3 | |
291 | 4 // Stream headers: |
5 | |
2338 | 6 #include "wine/mmreg.h" |
7 #include "wine/avifmt.h" | |
8 #include "wine/vfw.h" | |
291 | 9 |
4196 | 10 #include "../mp_image.h" |
11 | |
291 | 12 typedef struct { |
13 demux_stream_t *ds; | |
303 | 14 unsigned int format; |
2310 | 15 struct codecs_st *codec; |
1656 | 16 int inited; |
291 | 17 // 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
|
18 float timer; // value of old a_frame |
291 | 19 int samplerate; |
20 int samplesize; | |
21 int channels; | |
746 | 22 int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) |
23 int i_bps; // == bitrate (compressed bytes/sec) | |
296 | 24 // in buffers: |
291 | 25 char* a_in_buffer; |
26 int a_in_buffer_len; | |
27 int a_in_buffer_size; | |
296 | 28 // out buffers: |
29 char* a_buffer; | |
30 int a_buffer_len; | |
31 int a_buffer_size; | |
758 | 32 int sample_format; |
291 | 33 // win32 codec stuff: |
34 AVIStreamHeader audio; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
35 WAVEFORMATEX *wf; |
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
36 // char wf_ext[64]; // in format |
291 | 37 WAVEFORMATEX o_wf; // out format |
38 HACMSTREAM srcstream; // handle | |
39 int audio_in_minsize; | |
40 int audio_out_minsize; | |
41 // other codecs: | |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
42 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
587
8511095c5283
stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents:
432
diff
changeset
|
43 // ac3_frame_t *ac3_frame; |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
44 void* ac3_frame; // TODO: use *context |
291 | 45 int pcm_bswap; |
1828 | 46 #ifdef HAVE_OGGVORBIS |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
47 struct ov_struct_st *ov; // should be assigned on init TODO: use *context |
1828 | 48 #endif |
5301 | 49 unsigned char *codecdata; |
50 int codecdata_len; | |
291 | 51 } sh_audio_t; |
52 | |
53 typedef struct { | |
54 demux_stream_t *ds; | |
303 | 55 unsigned int format; |
2310 | 56 struct codecs_st *codec; |
1656 | 57 int inited; |
291 | 58 // 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
|
59 float timer; // value of old v_frame |
291 | 60 float fps; |
61 float frametime; // 1/fps | |
1400 | 62 int i_bps; // == bitrate (compressed bytes/sec) |
399 | 63 int disp_w,disp_h; // display size (filled by fileformat parser) |
64 // int coded_w,coded_h; // coded size (filled by video codec) | |
2031
624df8ea0e0e
New aspect prescale code, parses aspect value from mpeg sequence header or commandline.
atmos4
parents:
1828
diff
changeset
|
65 float aspect; |
303 | 66 unsigned int outfmtidx; |
291 | 67 // unsigned int bitrate; |
68 // buffers: | |
1400 | 69 float num_frames; // number of frames played |
1546 | 70 int num_frames_decoded; // number of frames decoded |
4875 | 71 unsigned our_out_buffer_size; |
291 | 72 char *our_out_buffer; |
4196 | 73 mp_image_t *image; |
291 | 74 // win32 codec stuff: |
75 AVIStreamHeader video; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
76 BITMAPINFOHEADER *bih; // in format |
291 | 77 BITMAPINFOHEADER o_bih; // out format |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
78 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
291 | 79 HIC hic; // handle |
4973 | 80 void* video_out; |
5506 | 81 void* vfilter; |
291 | 82 } sh_video_t; |
83 | |
5084 | 84 sh_audio_t* get_sh_audio(demuxer_t *demuxer,int id); |
85 sh_video_t* get_sh_video(demuxer_t *demuxer,int id); | |
1289 | 86 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); |
87 sh_video_t* new_sh_video(demuxer_t *demuxer,int id); | |
5084 | 88 void free_sh_audio(sh_audio_t *sh); |
89 void free_sh_video(sh_video_t *sh); | |
426 | 90 |
2567 | 91 int video_read_properties(sh_video_t *sh_video); |
92 int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps); | |
4933 | 93 |
94 #endif |