[MPlayer-dev-eng] [PATCH] new libvo driver: vo_ivtv [ask for review]

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jul 11 10:16:13 CEST 2006


Hello,
On Mon, Jul 10, 2006 at 11:51:47PM +0200, Benjamin Zores wrote:
> +static char ivtvbuf[262144]; /* 256 kB */

IMHO write it as 256 * 1024 and get rid of the comment.

> +  if (arg)
> +  {
> +    if (!strncmp (arg, VO_IVTV_SUBOPTION_HELP,
> +                  strlen (VO_IVTV_SUBOPTION_HELP)))
> +    {

I'd prefer if you could use the suboption parser as e.g. vo_gl does.

> +  printf ("Out: %d\n", out);

hmmm left-over debugging code?

> +static int
> +draw_frame (uint8_t * src[])
> +{
> +  vo_mpegpes_t *p = (vo_mpegpes_t *) src[0];
> +
> +  memcpy (&ivtvbuf[0], p->data, p->size);

well, you could just write ivtvbuf instead of &ivtvbuf[0] .

> +  ivtvlen = p->size;
> +  
> +  return 0;
> +}
> +
> +static void
> +flip_page (void)
> +{
> +  ivtv_write ();
> +}

Hmmm... I always supposed the data from the draw frame must stay valid
until after the flip. In that case you could save the memcpy and write
the data from the buffer directly. Did you try that?

Ok, end of very quick surfacial review.

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list