12 struct codecs_st
*codec
;
15 float stream_delay
; // number of seconds stream should be delayed (according to dwStart or similar)
21 int o_bps
; // == samplerate*samplesize*channels (uncompr. bytes/sec)
22 int i_bps
; // == bitrate (compressed bytes/sec)
24 int audio_in_minsize
; // max. compressed packet size (== min. in buffer size)
29 int audio_out_minsize
; // max. uncompressed packet size (==min. out buffsize)
36 int a_out_buffer_size
;
37 // void* audio_out; // the audio_out handle, used for this audio stream
38 struct af_stream_s
*afilter
; // the audio filter stream
39 struct ad_functions_s
* ad_driver
;
40 #ifdef DYNAMIC_PLUGINS
43 // win32-compatible codec parameters:
44 AVIStreamHeader audio
;
47 void* context
; // codec-specific stuff (usually HANDLE or struct pointer)
48 unsigned char* codecdata
; // extra header data passed from demuxer to codec
50 double pts
; // last known pts value in output from decoder
51 int pts_bytes
; // bytes output by decoder after last known pts
57 struct codecs_st
*codec
;
60 float timer
; // absolute time in video stream, since last start/seek
61 float stream_delay
; // number of seconds stream should be delayed (according to dwStart or similar)
63 float num_frames
; // number of frames played
64 int num_frames_decoded
; // number of frames decoded
65 // timing (mostly for mpeg):
66 double pts
; // predicted/interpolated PTS of the current frame
67 double i_pts
; // PTS for the _next_ I/P frame
68 float next_frame_time
;
70 double buffered_pts
[20];
72 // output format: (set by demuxer)
73 float fps
; // frames per second (set only if constant fps)
74 float frametime
; // 1/fps
75 float aspect
; // aspect ratio stored in the file (for prescaling)
76 float stream_aspect
; // aspect ratio stored in the media headers (e.g. in DVD IFO files)
77 int i_bps
; // == bitrate (compressed bytes/sec)
78 int disp_w
,disp_h
; // display size (filled by fileformat parser)
79 // output driver/filters: (set by libmpcodecs core)
80 unsigned int outfmtidx
;
81 struct vf_instance_s
*vfilter
; // the video filter chain, used for this video stream
83 #ifdef DYNAMIC_PLUGINS
86 // win32-compatible codec parameters:
87 AVIStreamHeader video
;
88 BITMAPINFOHEADER
* bih
;
89 void* ImageDesc
; // for quicktime codecs
91 void* context
; // codec-specific stuff (usually HANDLE or struct pointer)
96 char type
; // t = text, v = VobSub, a = SSA/ASS
97 int has_palette
; // If we have a valid palette
98 unsigned int palette
[16]; // for VobSubs
99 int width
, height
; // for VobSubs
101 unsigned int colors
[4];
102 int forced_subs_only
;
104 ass_track_t
* ass_track
; // for SSA/ASS streams (type == 'a')
109 #define new_sh_audio(d, i) new_sh_audio_aid(d, i, i)
110 sh_audio_t
* new_sh_audio_aid(demuxer_t
*demuxer
,int id
,int aid
);
111 #define new_sh_video(d, i) new_sh_video_vid(d, i, i)
112 sh_video_t
* new_sh_video_vid(demuxer_t
*demuxer
,int id
,int vid
);
113 #define new_sh_sub(d, i) new_sh_sub_sid(d, i, i)
114 sh_sub_t
*new_sh_sub_sid(demuxer_t
*demuxer
, int id
, int sid
);
115 void free_sh_audio(demuxer_t
*demuxer
, int id
);
116 void free_sh_video(sh_video_t
*sh
);
119 int video_read_properties(sh_video_t
*sh_video
);
120 int video_read_frame(sh_video_t
* sh_video
,float* frame_time_ptr
,unsigned char** start
,int force_fps
);
122 #endif /* STHEADER_H */