Mercurial > mplayer.hg
annotate libmpdemux/stheader.h @ 7428:29cce5d75dca
updated version (from ftp/incoming)
author | arpi |
---|---|
date | Tue, 17 Sep 2002 16:11:50 +0000 |
parents | f83050f59e23 |
children | 3a22c16fea46 |
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 |
5607 | 10 #include "../libmpcodecs/mp_image.h" |
4196 | 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; |
291 | 36 int audio_in_minsize; |
37 int audio_out_minsize; | |
38 // other codecs: | |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
39 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
5301 | 40 unsigned char *codecdata; |
41 int codecdata_len; | |
291 | 42 } sh_audio_t; |
43 | |
44 typedef struct { | |
45 demux_stream_t *ds; | |
303 | 46 unsigned int format; |
2310 | 47 struct codecs_st *codec; |
1656 | 48 int inited; |
291 | 49 // 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
|
50 float timer; // value of old v_frame |
291 | 51 float fps; |
52 float frametime; // 1/fps | |
1400 | 53 int i_bps; // == bitrate (compressed bytes/sec) |
399 | 54 int disp_w,disp_h; // display size (filled by fileformat parser) |
55 // 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
|
56 float aspect; |
303 | 57 unsigned int outfmtidx; |
291 | 58 // unsigned int bitrate; |
59 // buffers: | |
1400 | 60 float num_frames; // number of frames played |
1546 | 61 int num_frames_decoded; // number of frames decoded |
4196 | 62 mp_image_t *image; |
291 | 63 // win32 codec stuff: |
64 AVIStreamHeader video; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
65 BITMAPINFOHEADER *bih; // in format |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
66 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
4973 | 67 void* video_out; |
5506 | 68 void* vfilter; |
5924 | 69 int vf_inited; |
291 | 70 } sh_video_t; |
71 | |
5084 | 72 sh_audio_t* get_sh_audio(demuxer_t *demuxer,int id); |
73 sh_video_t* get_sh_video(demuxer_t *demuxer,int id); | |
1289 | 74 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); |
75 sh_video_t* new_sh_video(demuxer_t *demuxer,int id); | |
5084 | 76 void free_sh_audio(sh_audio_t *sh); |
77 void free_sh_video(sh_video_t *sh); | |
426 | 78 |
2567 | 79 int video_read_properties(sh_video_t *sh_video); |
80 int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps); | |
4933 | 81 |
82 #endif |