[MPlayer-G2-dev] basic g2 vp (video pipeline) code

D Richard Felker III dalias at aerifal.cx
Sun Nov 2 20:34:06 CET 2003


On Sun, Nov 02, 2003 at 02:09:21AM -0500, D Richard Felker III wrote:
> mp_image_t *vp_pull_image(vp_link_t *link, int drop)
> {
> 	mp_image_t *img = link->img_redir;
> 	if (img) {
> 		link->img_redir = NULL;
> 		return img;
> 	}
> again:
> 	img = link->src->pull_image(link, drop);
> 	if (link->sister) {
> 		link->sister->img_redir = img;
> 		link->sister = NULL;
> 		goto again;
> 	}
> 	return img;
> }

One other feature worth mentioning, the drop flag to vp_pull_image: If
you intend to ignore the contents of a frame (for -framedrop, a/v sync
in fixed-fps output, or whatever reason), pass the drop flag when
calling vp_pull_image. The filter is _still_ required to return a
valid mpi for timing purposes, but the actual contents of the image
can be meaningless. Filters are recommended but not required to
propagate the drop flag back through the chain...and of course if it
gets all the way back to the codec and the next frame is a B frame,
the codec can skip decoding.

Optional ideas: require filters to propagate drop flag if its value is
greater than 1? Include a way to signal hard framedrop?

Rich



More information about the MPlayer-G2-dev mailing list