Re: About video playback?

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Wed 09 May 2001 - 10:24:37 IDT


> Can I use svgalib to play video(25frame/second)?
> If can, what functions should I use?

Certainly you can. See MPlayer, smpeg, and my playvideo.

> I have tried these codes:
>  time(&t1);
>  i = 0;
>  do{
>  gl_setcontext(virtualscreen1);
>  gl_copyscreen(physicalscreen);
>  gl_setcontext(virtualscreen2);
>  gl_copyscreen(physicalscreen);
>  ++i;
>  }while((vga_getkey() == 0)&&(i<100));
>  time(&t2);
>  vga_setmode(TEXT);
>  printf("%d %d\n", t2-t1, 200/(t2-t1));

What video mode do you use? what is the size of the virtual screen?

I think it is better to use linear video memory and use memcpy to copy
from system memory to video memory.

You can use the demo programs linearspeed and speedtest to see the video
memory write speed. You will see that it depends on the mode used (on
some video cards), the memory organisation (vga or linear) and the use
of mtrrs.



-- 
Matan Ziv-Av.                         matan@svgalib.org



------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST