4868
|
1 # video decoder:
|
|
2
|
|
3 int init(sh_video) -> loads codec dll, check if available and it accepts header if any
|
|
4
|
|
5 int control(sh_video,cmd,param,...) -> various set/get/query functions
|
|
6
|
|
7 int decode(sh_video,framedrop) -> decode frame, callbacks to config/get_surface
|
|
8
|
|
9 int uninit(sh_video)
|
|
10
|
|
11 # callbacks for video decoder:
|
|
12
|
|
13 mpcodecs_config_vo(sh_video, w, h, preferred_outfmt){
|
|
14 // it will be called by codec (either init() or decode()) when it gets
|
|
15 // enough info to know image dimensions, colorspaces and buffering type
|
|
16
|
|
17 // this func should use control() to get/set parameters for a given outfmt
|
|
18 // (like supported buffering types, stride limitations, etc) or to
|
|
19 // query and select other colorspace.
|
|
20
|
|
21 }
|
|
22
|
|
23 // possible buffer setups:
|
|
24 - 1 static overwrite only (partial update type codecs: cvid, fli, vfw etc)
|
|
25 - 1+ independent temp writeonly (I-only mpegs, jpeg, mjpeg etc)
|
|
26 - 2+ static read/write (I+P mpegs)
|
|
27 - 2+ static read/write and 1+ temp writeonly (I+P+B mpegs)
|
|
28
|
|
29 image_t* mpcodecs_get_surface(sh_video, flags){
|
|
30 // flags:
|
|
31 // 0x1 - read (make it readable -> don't put to slow video ram)
|
|
32
|
|
33 }
|
|
34
|