when i worked for comcast all their trucks were fitted with cameras that do exactly what you are talking about. they had accellerometers that, when tripped, would imbed the previous 30 seconds and the 30 seconds after it was tripped in the recorded memory
by doing that it saves recording space (and therefore size of the unit and hardware).
essentially if you were to get in an accident the video would show the situation that you were in just before the accident occurred and your reaction or results afterwards
only problem was the damn thing would go off when you hit a decent pothole or some train tracks, or if you had to stop abruptly for whatever reason without impact. we were kinda limitted in how many times a week we could set the thing off before we got repremanded.
at the end of the week all we did was pull a hardwired usb out of the shop and connect it to the mounted camera to load our week's incidents
i can't remember what it was called but it was hardwired to the car's battery and it was mounted on the mirror