Mercurial > mplayer.hg
annotate libmpdemux/stheader.h @ 16572:56a5f69e9b35
"LIVE.COM Streaming Media" is now called "LIVE555 Streaming Media".
author | rsf |
---|---|
date | Fri, 23 Sep 2005 22:35:04 +0000 |
parents | 601e2c8a2922 |
children | cea08919336b |
rev | line source |
---|---|
4933 | 1 #ifndef __ST_HEADER_H |
2 #define __ST_HEADER_H 1 | |
3 | |
12341
0db4a3a5b01d
removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
8965
diff
changeset
|
4 #include "aviheader.h" |
0db4a3a5b01d
removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
8965
diff
changeset
|
5 #include "ms_hdr.h" |
7471 | 6 |
7 // Stream headers: | |
4196 | 8 |
291 | 9 typedef struct { |
10 demux_stream_t *ds; | |
7467 | 11 struct codecs_st *codec; |
303 | 12 unsigned int format; |
1656 | 13 int inited; |
8057 | 14 float delay; // relative (to sh_video->timer) time in audio stream |
291 | 15 // output format: |
7467 | 16 int sample_format; |
291 | 17 int samplerate; |
18 int samplesize; | |
19 int channels; | |
746 | 20 int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) |
21 int i_bps; // == bitrate (compressed bytes/sec) | |
296 | 22 // in buffers: |
7604
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
23 int audio_in_minsize; // max. compressed packet size (== min. in buffer size) |
291 | 24 char* a_in_buffer; |
25 int a_in_buffer_len; | |
26 int a_in_buffer_size; | |
7604
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
27 // decoder buffers: |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
28 int audio_out_minsize; // max. uncompressed packet size (==min. out buffsize) |
296 | 29 char* a_buffer; |
30 int a_buffer_len; | |
31 int a_buffer_size; | |
7604
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
32 // output buffers: |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
33 char* a_out_buffer; |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
34 int a_out_buffer_len; |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
35 int a_out_buffer_size; |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
36 // void* audio_out; // the audio_out handle, used for this audio stream |
32efb806436e
aufio filter layer (libaf) integration to libmpcodecs, mplayer and mencoder
arpi
parents:
7471
diff
changeset
|
37 void* afilter; // the audio filter stream |
14819
601e2c8a2922
Remove file-global mpadec, add ad_driver member to sh_audio_t instead.
hzoli
parents:
12341
diff
changeset
|
38 struct ad_functions_s* ad_driver; |
8152 | 39 #ifdef DYNAMIC_PLUGINS |
40 void *dec_handle; | |
41 #endif | |
7467 | 42 // win32-compatible codec parameters: |
291 | 43 AVIStreamHeader audio; |
7467 | 44 WAVEFORMATEX* wf; |
45 // codec-specific: | |
3642
2cef9d562af0
void* context added - it should keep the codec-specific stuff (struct ptr or HANDLE)
arpi
parents:
2567
diff
changeset
|
46 void* context; // codec-specific stuff (usually HANDLE or struct pointer) |
7467 | 47 unsigned char* codecdata; // extra header data passed from demuxer to codec |
5301 | 48 int codecdata_len; |
291 | 49 } sh_audio_t; |
50 | |
51 typedef struct { | |
52 demux_stream_t *ds; | |
7467 | 53 struct codecs_st *codec; |
303 | 54 unsigned int format; |
1656 | 55 int inited; |
8057 | 56 float timer; // absolute time in video stream, since last start/seek |
7467 | 57 // frame counters: |
58 float num_frames; // number of frames played | |
59 int num_frames_decoded; // number of frames decoded | |
8965 | 60 // timing (mostly for mpeg): |
61 float pts; // predicted/interpolated PTS of the current frame | |
62 float i_pts; // PTS for the _next_ I/P frame | |
7467 | 63 // output format: (set by demuxer) |
64 float fps; // frames per second (set only if constant fps) | |
65 float frametime; // 1/fps | |
66 float aspect; // aspect ratio stored in the file (for prescaling) | |
67 int i_bps; // == bitrate (compressed bytes/sec) | |
68 int disp_w,disp_h; // display size (filled by fileformat parser) | |
69 // output driver/filters: (set by libmpcodecs core) | |
303 | 70 unsigned int outfmtidx; |
7467 | 71 void* video_out; // the video_out handle, used for this video stream |
72 void* vfilter; // the video filter chain, used for this video stream | |
73 int vf_inited; | |
8152 | 74 #ifdef DYNAMIC_PLUGINS |
75 void *dec_handle; | |
76 #endif | |
7467 | 77 // win32-compatible codec parameters: |
291 | 78 AVIStreamHeader video; |
7467 | 79 BITMAPINFOHEADER* bih; |
8158 | 80 void* ImageDesc; // for quicktime codecs |
7467 | 81 // codec-specific: |
82 void* context; // codec-specific stuff (usually HANDLE or struct pointer) | |
291 | 83 } sh_video_t; |
84 | |
7467 | 85 // demuxer.c: |
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 |
7467 | 91 // video.c: |
2567 | 92 int video_read_properties(sh_video_t *sh_video); |
93 int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps); | |
4933 | 94 |
95 #endif |