PDA

View Full Version : Motion Detection / Recording



fjalmendrote
April 21, 2005, 10:57:50
Hi!

I'm trying to do a Motion Detector that records only when there is movement. My system works, but I want to make a modification and I don't know how.

I want that when the MV Motion Detection filter arrives to the number of post roll frames, teh recording stops, and if there was movement again, the recording would restart but in other file.

My graph file is:

Capture Source->MV MotionDetection->MVRecording->Codec->AVIMux->Filewriter

How can I do it?

Thank you,

Javi

Bernd Peretzke
April 21, 2005, 13:24:42
Hi,

you can only change the output file name if the filter graph is stopped and the input pin from the file writer is disconnected. The IMVSCSetFile::SetSinkFile() method from the MV Smart Control changes the output file name and reconnect the file writer filter (only in stopped state). To detect the state of the recording filter you can use the filter events or a timer to call the IMVRecording::IsRunning() method.

Regards
Bernd