Motion Detection Filter in DOTNET C#
Started by Otis at 09-30-2005 14:05. Topic has 8 replies.
|
|
09-30-2005, 14:05
|
Otis

Joined on 10-19-2004
Charlotte, NC
Posts 308
|
|
|
The attached C# application uses our Multimedia COM object and our Motion Detection Filter. V14.5
Otis Goodwin LEAD Developer Support
|
|
|
|
|
Report
|
|
|
|
07-15-2006, 4:01
|
dillwaly
Joined on 07-15-2006
Posts 3
|
Re: Motion Detection Filter in DOTNET C#
|
 
 
|
|
|
hi
LTMMLib, LMVMtnDetLib and AxLTMMLib libraries have not included in attached component.
please attached them.
thanx
|
|
|
|
|
Report
|
|
|
|
07-17-2006, 10:09
|
Otis

Joined on 10-19-2004
Charlotte, NC
Posts 308
|
|
|
I have attached a project that has been modified to use the V15 SDK. If you have the Multimedia V15 SDK installed, this project should compile with no changes.
Otis Goodwin LEAD Developer Support
|
|
|
|
|
Report
|
|
|
|
01-10-2007, 9:21
|
serkanp
Joined on 01-10-2007
Posts 1
|
Re: Motion Detection Filter in DOTNET C#
|
 
 
|
|
|
is there any vb.net 2005 sample ?
also c# version not working on eval 15
|
|
|
|
|
Report
|
|
|
|
06-01-2007, 5:22
|
motyka
Joined on 06-01-2007
Posts 5
|
Re: Motion Detection Filter in DOTNET C#
|
 
 
|
|
|
Hello, I've got a problem with motin detection filter in C# (Visual Studio 2005)
Filter graph hangs on callback. When I don't use callback, the filter wokrs fine, (the motion detection areas are visible on video). But when I try to use callback - the graph hangs. My code:
ILMVMtnDet motionDetFilter = new LMVMtnDetClass(); // filter declaration .. then after I add filter to graph and connects with other filters I do some configuration:
private void ConfigureMotionDetection(ILMVMtnDet motionDetection) { m_MotionDetectionCallback = new MotionDetectionCallback();
motionDetection.AutoStart = true; motionDetection.CallbackObj = new MotionDetectionCallback(); } The callback class: public class MotionDetectionCallback : ILMVMtnDetUserCallback { public MotionDetectionCallback() { } ~MotionDetectionCallback() { } public int CallbackProc(int lEvent, int pFrame, int lWidth, int lHeight, int lBitCount, int lFrameSize, bool bTopDown) { System.Diagnostics.Debug.WriteLine(lEvent); return 0; } }
Any ideas, pliz?
Regards, Roman.
|
|
|
|
|
Report
|
|
|
|
06-04-2007, 9:45
|
Otis

Joined on 10-19-2004
Charlotte, NC
Posts 308
|
Re: Motion Detection Filter in DOTNET C#
|
 
 
|
|
|
Your code looks correct so I will need more information to resolve this issue. Please send a small sample project (not your entire project), and I will debug your project here.
Otis Goodwin LEAD Developer Support
|
|
|
|
|
Report
|
|
|
|
06-05-2007, 6:14
|
motyka
Joined on 06-01-2007
Posts 5
|
|
|
Hello, I based my sample on GSSF sample from DirectShowNet, as I use it indeed. But during building that sample I've probably found the reason of such behavior. If you compile that project with USEWINFORM directive, which starts Winform, the callback will be ok, but if you don't use that directive (pure console application) the callback hangs:
static void Main() { #if USEWINFORM Application.Run(new Form1()); // then start button - it is ok #else Console.WriteLine("Press eneter to start it"); Console.ReadLine(); m_play = new DxPlay(); m_play.Start(); Console.WriteLine("Press eneter to stop it"); Console.ReadLine(); m_play.Stop(); #endif }
It may have it's origin in 'test/warning' which fires motion detection filter, and it might hangs when no windows message loop is present (or sth. like that). I believe that filter without that warning window wouldn't hangs on callback, could you confirm that?
Regards, Roman.
|
|
|
|
|
Report
|
|
|
|
06-07-2007, 9:23
|
Otis

Joined on 10-19-2004
Charlotte, NC
Posts 308
|
Re: Motion Detection Filter in DOTNET C#
|
 
 
|
|
|
You need a message pump to process the messages. If you are using a console application, you can probably add System.Windows.Forms and use DoEvents to process the messages.
Otis Goodwin LEAD Developer Support
|
|
|
|
|
Report
|
|
|
|
|
LEAD Support Fo... » Developer » Multimedia » Motion Detection Filter in DOTNET C#
|
|
Copyright LEAD Technologies, Inc. 2008
