public VideoGdi(TvFormat tvFormat, Control surface)
{
if (surface == null)
return;
Debug.WriteLine(this, "Initializeing GDI ...", DebugStatus.None);
switch (tvFormat)
{
case TvFormat.Ntsc:
_scanlinesToCut = 8;
_scanlines = 224;
_bitmap = new Bitmap(256, 224);
break;
case TvFormat.Pal:
_scanlinesToCut = 0;
_scanlines = 240;
_bitmap = new Bitmap(256, 240);
break;
}
_buffer = new int[256*_scanlines];
_surface = surface;
UpdateSize(0, 0, _surface.Width + 1, _surface.Height + 1);
Debug.WriteLine(this, "Video device " + @"""" + "GDI" + @"""" + " Ok !!", DebugStatus.Cool);
}