Hi!
I have a big problem with my DirectShow (DirectShow.Net)/ DirectX (SlimDX) application.
It worked perfectly fine on my notebook, but when I moved application to another machine output is not right.
This is how it looks like in correct output:
And there is what i get on other machine:
DirectShow graphs looks the same:
webcam -> smart tree -> Color Space converter -> Frame Grabber -> Null Renderer.
The application simply captures the frame and set it as a texture in DirectX.
I capture frames in ARGB32 format.
Computers:
Notebook (good result)
Intel Core 2 Duo T9300
ATI Mobility Radeon HD 3650
Windows 7 Pro x64 SP1
K-Lite Mega Codec Pack 6.6.0
PC (bad result)
Intel Core 2 Quad Q8300
MSI GeForce GTS250 1GB
Windows 7 Pro x64 SP1
K-Lite Mega Codec Pack 8.4.0
Webcam:
Logitech Pro HD C910
I suspect DirectShow problem with settings, but I dont know where to look for them. Can You tell me, so I can configure PC the same as notebook and run app on that?
Thanks,
Andrew
DirectShow/DirectX program doesn't work on 2 different computers.
It looks like you are making incorrect assumptions about the pitch of your D3D surface.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb206357(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb206357(v=vs.85).aspx
It looks like you are making incorrect assumptions about the pitch of your D3D surface.
http://msdn.microsof...7(v=vs.85).aspx
Thanks a lot! Thanks to You I was able to find wrong part of my code.
It seems that on notebook pitch is the same size as the stride.
When I fill texture bytes it used to be:
var data = texture.LockRectangle(0, LockFlags.None);
for (int i = 0; i < Height; i++)
{
data.Data.Write(TextureBytes, (Height - 1 - i)*Stride, Stride);
}
And the corrent version is:
var data = texture.LockRectangle(0, LockFlags.None);
for (int i = 0; i < Height; i++)
{
data.Data.Write(TextureBytes, (Height - 1 - i)*Stride, Stride);
data.Data.Position += data.Pitch - Stride;
}
Yea, the scanlines are always pitch bytes apart, regardless of the width of the surface.
Glad I could help
Glad I could help
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement