Mercurial > mplayer.hg
annotate libmpdemux/stheader.h @ 4226:63baf6de03e1
made a little more headway but it still doesn't work properly
author | melanson |
---|---|
date | Fri, 18 Jan 2002 02:51:24 +0000 |
parents | b75f3bb25261 |
children | d282da672340 |
rev | line source |
---|---|
291 | 1 // Stream headers: |
2 | |
2338 | 3 #include "wine/mmreg.h" |
4 #include "wine/avifmt.h" | |
5 #include "wine/vfw.h" | |
291 | 6 |
4196 | 7 #include "../mp_image.h" |
8 | |
291 | 9 typedef struct { |
10 demux_stream_t *ds; | |
303 | 11 unsigned int format; |
2310 | 12 struct codecs_st *codec; |
1656 | 13 int inited; |
291 | 14 // 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
|
15 float timer; // value of old a_frame |
291 | 16 int samplerate; |
17 int samplesize; | |
18 int channels; | |
746 | 19 int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) |
20 int i_bps; // == bitrate (compressed bytes/sec) | |
296 | 21 // in buffers: |
291 | 22 char* a_in_buffer; |
23 int a_in_buffer_len; | |
24 int a_in_buffer_size; | |
296 | 25 // out buffers: |
26 char* a_buffer; | |
27 int a_buffer_len; | |
28 int a_buffer_size; | |
758 | 29 int sample_format; |
291 | 30 // win32 codec stuff: |
31 AVIStreamHeader audio; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
32 WAVEFORMATEX *wf; |
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
33 // char wf_ext[64]; // in format |
291 | 34 WAVEFORMATEX o_wf; // out format |
35 HACMSTREAM srcstream; // handle | |
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) |
587
8511095c5283
stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents:
432
diff
changeset
|
40 // 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
|
41 void* ac3_frame; // TODO: use *context |
291 | 42 int pcm_bswap; |
1828 | 43 #ifdef HAVE_OGGVORBIS |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
44 struct ov_struct_st *ov; // should be assigned on init TODO: use *context |
1828 | 45 #endif |
291 | 46 } sh_audio_t; |
47 | |
48 typedef struct { | |
49 demux_stream_t *ds; | |
303 | 50 unsigned int format; |
2310 | 51 struct codecs_st *codec; |
1656 | 52 int inited; |
291 | 53 // 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
|
54 float timer; // value of old v_frame |
291 | 55 float fps; |
56 float frametime; // 1/fps | |
1400 | 57 int i_bps; // == bitrate (compressed bytes/sec) |
399 | 58 int disp_w,disp_h; // display size (filled by fileformat parser) |
59 // 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
|
60 float aspect; |
303 | 61 unsigned int outfmtidx; |
291 | 62 // unsigned int bitrate; |
63 // buffers: | |
1400 | 64 float num_frames; // number of frames played |
1546 | 65 int num_frames_decoded; // number of frames decoded |
291 | 66 char *our_out_buffer; |
4196 | 67 mp_image_t *image; |
291 | 68 // win32 codec stuff: |
69 AVIStreamHeader video; | |
432
5251b0c57e39
sh_audio->wf and sh_video->bih changed to dynamic (thanx to Jens Hoffmann)
arpi_esp
parents:
426
diff
changeset
|
70 BITMAPINFOHEADER *bih; // in format |
291 | 71 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
|
72 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
291 | 73 HIC hic; // handle |
74 } sh_video_t; | |
75 | |
1289 | 76 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); |
77 sh_video_t* new_sh_video(demuxer_t *demuxer,int id); | |
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); |