1 #ifndef MPLAYER_STHEADER_H
2 #define MPLAYER_STHEADER_H
13 struct codecs_st
*codec
;
16 float stream_delay
; // number of seconds stream should be delayed (according to dwStart or similar)
22 int o_bps
; // == samplerate*samplesize*channels (uncompr. bytes/sec)
23 int i_bps
; // == bitrate (compressed bytes/sec)
25 int audio_in_minsize
; // max. compressed packet size (== min. in buffer size)
30 int audio_out_minsize
; // max. uncompressed packet size (==min. out buffsize)
37 int a_out_buffer_size
;
38 // void* audio_out; // the audio_out handle, used for this audio stream
39 struct af_stream_s
*afilter
; // the audio filter stream
40 struct ad_functions_s
* ad_driver
;
41 #ifdef CONFIG_DYNAMIC_PLUGINS
44 // win32-compatible codec parameters:
45 AVIStreamHeader audio
;
48 void* context
; // codec-specific stuff (usually HANDLE or struct pointer)
49 unsigned char* codecdata
; // extra header data passed from demuxer to codec
51 double pts
; // last known pts value in output from decoder
52 int pts_bytes
; // bytes output by decoder after last known pts
53 char* lang
; // track language
60 struct codecs_st
*codec
;
63 float timer
; // absolute time in video stream, since last start/seek
64 float stream_delay
; // number of seconds stream should be delayed (according to dwStart or similar)
66 float num_frames
; // number of frames played
67 int num_frames_decoded
; // number of frames decoded
68 // timing (mostly for mpeg):
69 double pts
; // predicted/interpolated PTS of the current frame
70 double i_pts
; // PTS for the _next_ I/P frame
71 float next_frame_time
;
73 double buffered_pts
[20];
75 // output format: (set by demuxer)
76 float fps
; // frames per second (set only if constant fps)
77 float frametime
; // 1/fps
78 float aspect
; // aspect ratio stored in the file (for prescaling)
79 float stream_aspect
; // aspect ratio stored in the media headers (e.g. in DVD IFO files)
80 int i_bps
; // == bitrate (compressed bytes/sec)
81 int disp_w
,disp_h
; // display size (filled by fileformat parser)
82 // output driver/filters: (set by libmpcodecs core)
83 unsigned int outfmtidx
;
84 struct vf_instance_s
*vfilter
; // the video filter chain, used for this video stream
86 #ifdef CONFIG_DYNAMIC_PLUGINS
89 // win32-compatible codec parameters:
90 AVIStreamHeader video
;
91 BITMAPINFOHEADER
* bih
;
92 void* ImageDesc
; // for quicktime codecs
94 void* context
; // codec-specific stuff (usually HANDLE or struct pointer)
99 char type
; // t = text, v = VobSub, a = SSA/ASS
100 unsigned char* extradata
; // extra header data passed from demuxer
103 ass_track_t
* ass_track
; // for SSA/ASS streams (type == 'a')
105 char* lang
; // track language
110 #define new_sh_audio(d, i) new_sh_audio_aid(d, i, i)
111 sh_audio_t
* new_sh_audio_aid(demuxer_t
*demuxer
,int id
,int aid
);
112 #define new_sh_video(d, i) new_sh_video_vid(d, i, i)
113 sh_video_t
* new_sh_video_vid(demuxer_t
*demuxer
,int id
,int vid
);
114 #define new_sh_sub(d, i) new_sh_sub_sid(d, i, i)
115 sh_sub_t
*new_sh_sub_sid(demuxer_t
*demuxer
, int id
, int sid
);
116 void free_sh_audio(demuxer_t
*demuxer
, int id
);
117 void free_sh_video(sh_video_t
*sh
);
120 int video_read_properties(sh_video_t
*sh_video
);
121 int video_read_frame(sh_video_t
* sh_video
,float* frame_time_ptr
,unsigned char** start
,int force_fps
);
123 #endif /* MPLAYER_STHEADER_H */