Mercurial > mplayer.hg
annotate libmpdemux/stheader.h @ 4993:53c569d36b2c
small changes in libvo's X11 support
author | pontscho |
---|---|
date | Fri, 08 Mar 2002 20:14:08 +0000 |
parents | 544c1dae591c |
children | 2fd327bf64fc |
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 |
291 | 49 } sh_audio_t; |
50 | |
51 typedef struct { | |
52 demux_stream_t *ds; | |
303 | 53 unsigned int format; |
2310 | 54 struct codecs_st *codec; |
1656 | 55 int inited; |
291 | 56 // 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
|
57 float timer; // value of old v_frame |
291 | 58 float fps; |
59 float frametime; // 1/fps | |
1400 | 60 int i_bps; // == bitrate (compressed bytes/sec) |
399 | 61 int disp_w,disp_h; // display size (filled by fileformat parser) |
62 // 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
|
63 float aspect; |
303 | 64 unsigned int outfmtidx; |
291 | 65 // unsigned int bitrate; |
66 // buffers: | |
1400 | 67 float num_frames; // number of frames played |
1546 | 68 int num_frames_decoded; // number of frames decoded |
4875 | 69 unsigned our_out_buffer_size; |
291 | 70 char *our_out_buffer; |
4196 | 71 mp_image_t *image; |
291 | 72 // win32 codec stuff: |
73 AVIStreamHeader video; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
74 BITMAPINFOHEADER *bih; // in format |
291 | 75 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
|
76 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
291 | 77 HIC hic; // handle |
4973 | 78 void* video_out; |
291 | 79 } sh_video_t; |
80 | |
1289 | 81 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); |
82 sh_video_t* new_sh_video(demuxer_t *demuxer,int id); | |
426 | 83 |
2567 | 84 int video_read_properties(sh_video_t *sh_video); |
85 int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps); | |
4933 | 86 |
87 #endif |