I am using the VLC c# video component to stream video within an application using MJPEG streaming codec. The goal of my application is that when an event or trigger happens, a video file is written starting from x seconds before the trigger to y seconds after the trigger. What I need is a module in the format of a C# class which can be integrated into my application which does the following:
1. buffer the video stream for x seconds
2. when a trigger occurs write the x seconds of video to a file and continue for y seconds
3. the result should be a video of (x + y) seconds
Hopefully this is clear. I have included a sample visual c# project replicating the parameters I am using in my application. Please let me know if you have any questions.