annotate libmpdemux/stheader.h @ 6346:f9b044b3aca1

rv20 added
author arpi
date Sun, 09 Jun 2002 01:09:09 +0000
parents 27d1f7faefd4
children f83050f59e23
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4933
429994672d8c 're-include' possibility
nick
parents: 4875
diff changeset
1 #ifndef __ST_HEADER_H
429994672d8c 're-include' possibility
nick
parents: 4875
diff changeset
2 #define __ST_HEADER_H 1
429994672d8c 're-include' possibility
nick
parents: 4875
diff changeset
3
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
4 // Stream headers:
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
5
2338
4f3e8c8ea32f includes cleanup
arpi
parents: 2310
diff changeset
6 #include "wine/mmreg.h"
4f3e8c8ea32f includes cleanup
arpi
parents: 2310
diff changeset
7 #include "wine/avifmt.h"
4f3e8c8ea32f includes cleanup
arpi
parents: 2310
diff changeset
8 #include "wine/vfw.h"
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
9
5607
1972c3475d93 mp_image.h and img_format.h moved to libmpcodecs
arpi
parents: 5506
diff changeset
10 #include "../libmpcodecs/mp_image.h"
4196
b75f3bb25261 image field added. 10*10l....
arpi
parents: 3642
diff changeset
11
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
12 typedef struct {
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
13 demux_stream_t *ds;
303
828ec81e0d64 codecs.conf support
arpi_esp
parents: 296
diff changeset
14 unsigned int format;
2310
9e059416eea6 libdemuxer...
arpi
parents: 2031
diff changeset
15 struct codecs_st *codec;
1656
cd77b8e28f82 new field: inited
arpi
parents: 1546
diff changeset
16 int inited;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
19 int samplerate;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
20 int samplesize;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
21 int channels;
746
cd1f0d4de0b8 new audio playback and A-V sync code
arpi_esp
parents: 587
diff changeset
22 int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec)
cd1f0d4de0b8 new audio playback and A-V sync code
arpi_esp
parents: 587
diff changeset
23 int i_bps; // == bitrate (compressed bytes/sec)
296
c3d7a28a0d1a audio init moved to dec_audio.c
arpi_esp
parents: 291
diff changeset
24 // in buffers:
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
25 char* a_in_buffer;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
26 int a_in_buffer_len;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
27 int a_in_buffer_size;
296
c3d7a28a0d1a audio init moved to dec_audio.c
arpi_esp
parents: 291
diff changeset
28 // out buffers:
c3d7a28a0d1a audio init moved to dec_audio.c
arpi_esp
parents: 291
diff changeset
29 char* a_buffer;
c3d7a28a0d1a audio init moved to dec_audio.c
arpi_esp
parents: 291
diff changeset
30 int a_buffer_len;
c3d7a28a0d1a audio init moved to dec_audio.c
arpi_esp
parents: 291
diff changeset
31 int a_buffer_size;
758
5a92a5601666 better audio out buffering & sample_format added
arpi_esp
parents: 746
diff changeset
32 int sample_format;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
33 // win32 codec stuff:
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
37 WAVEFORMATEX o_wf; // out format
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
38 HACMSTREAM srcstream; // handle
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
39 int audio_in_minsize;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
40 int audio_out_minsize;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
45 int pcm_bswap;
1828
60afe3421c04 OggVorbis support, ALPHA state!
atmos4
parents: 1656
diff changeset
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
60afe3421c04 OggVorbis support, ALPHA state!
atmos4
parents: 1656
diff changeset
48 #endif
5301
d72c3169a343 Improved MP4 parsing (finally)
atmos4
parents: 5084
diff changeset
49 unsigned char *codecdata;
d72c3169a343 Improved MP4 parsing (finally)
atmos4
parents: 5084
diff changeset
50 int codecdata_len;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
51 } sh_audio_t;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
52
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
53 typedef struct {
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
54 demux_stream_t *ds;
303
828ec81e0d64 codecs.conf support
arpi_esp
parents: 296
diff changeset
55 unsigned int format;
2310
9e059416eea6 libdemuxer...
arpi
parents: 2031
diff changeset
56 struct codecs_st *codec;
1656
cd77b8e28f82 new field: inited
arpi
parents: 1546
diff changeset
57 int inited;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
60 float fps;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
61 float frametime; // 1/fps
1400
2bf9c561b01d stage2 step 1
arpi
parents: 1369
diff changeset
62 int i_bps; // == bitrate (compressed bytes/sec)
399
33115689181a some more fields in sh_video_t
arpi_esp
parents: 303
diff changeset
63 int disp_w,disp_h; // display size (filled by fileformat parser)
33115689181a some more fields in sh_video_t
arpi_esp
parents: 303
diff changeset
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
828ec81e0d64 codecs.conf support
arpi_esp
parents: 296
diff changeset
66 unsigned int outfmtidx;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
67 // unsigned int bitrate;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
68 // buffers:
1400
2bf9c561b01d stage2 step 1
arpi
parents: 1369
diff changeset
69 float num_frames; // number of frames played
1546
d4cd08b06665 display number of decoded frames (for progr. mpeg2)
arpi
parents: 1400
diff changeset
70 int num_frames_decoded; // number of frames decoded
4875
d282da672340 We should know size of out buffer
nick
parents: 4196
diff changeset
71 unsigned our_out_buffer_size;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
72 char *our_out_buffer;
4196
b75f3bb25261 image field added. 10*10l....
arpi
parents: 3642
diff changeset
73 mp_image_t *image;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
74 // win32 codec stuff:
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
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
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
79 HIC hic; // handle
4973
544c1dae591c video_out added to sh_video_t
arpi
parents: 4933
diff changeset
80 void* video_out;
5506
b8b6fcb5062a field 'vfilter' added to sh_video_t
arpi
parents: 5301
diff changeset
81 void* vfilter;
5924
27d1f7faefd4 vf_inited flag added
arpi
parents: 5607
diff changeset
82 int vf_inited;
291
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
83 } sh_video_t;
da98e96499bb sh_audio/sh_video added, general codec cleanup
arpi_esp
parents:
diff changeset
84
5084
2fd327bf64fc added get_sh_video/audio and realmedia seeking
alex
parents: 4973
diff changeset
85 sh_audio_t* get_sh_audio(demuxer_t *demuxer,int id);
2fd327bf64fc added get_sh_video/audio and realmedia seeking
alex
parents: 4973
diff changeset
86 sh_video_t* get_sh_video(demuxer_t *demuxer,int id);
1289
3f490fad9bdf some code clanup (first step to libdemuxer)
arpi
parents: 758
diff changeset
87 sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id);
3f490fad9bdf some code clanup (first step to libdemuxer)
arpi
parents: 758
diff changeset
88 sh_video_t* new_sh_video(demuxer_t *demuxer,int id);
5084
2fd327bf64fc added get_sh_video/audio and realmedia seeking
alex
parents: 4973
diff changeset
89 void free_sh_audio(sh_audio_t *sh);
2fd327bf64fc added get_sh_video/audio and realmedia seeking
alex
parents: 4973
diff changeset
90 void free_sh_video(sh_video_t *sh);
426
26e513f392b2 new stream selection code
arpi_esp
parents: 399
diff changeset
91
2567
ea6158be8103 video frame reading cleanup
arpi
parents: 2341
diff changeset
92 int video_read_properties(sh_video_t *sh_video);
ea6158be8103 video frame reading cleanup
arpi
parents: 2341
diff changeset
93 int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps);
4933
429994672d8c 're-include' possibility
nick
parents: 4875
diff changeset
94
429994672d8c 're-include' possibility
nick
parents: 4875
diff changeset
95 #endif