filter out on boolean event

ctor dtor ctorctor at gmail.com
Tue Jan 24 14:50:42 PST 2012


Hi everybody,
the problem that I am trying to solve is turning to a more generic one so
the related discussion maybe of general interest.
My need started around the "motion" plugin but soon it became applicable to
its more viable alternative too - the "motiondetector" plugin.
Both these plugins do perform motion detection on a video stream, both
signaling with a similar message the motion detected/undetected status
change.
I was looking for, at least, one of the following features implemented via
gstreamer plugin or app, on the basis of the "motion detected" status:

a) being able to only filter out video frames where motion is detected,
resulting in a rebuilt continuous video stream (hopefully with no still
frames).
Maybe an example for this is the audio "cutter" filter.

b) writing out a different video file/stream whenever the "motion detected"
status does change, in the same fashion that multifilesink does

One of the first tries in order for b) was to modify the multifilesink code
in order to cut output files on the "motion detected" status change.
A skeleton pipeline for this could be
        filesrc ! \
        (video decoding elements) ! \
(x)    motion ! \
        (video encoding elements) ! \
(y)    multifilesink

Please tell me if wrong, I understood that only a gstreamer application
building a pipeline can notify (y) on the basis of a message from (x),
so in order for b) writing a plugin derived from multifilesink won't
suffice.
Now I am trying to write a gstreamer application, I was able to build up
the pipeline and manage a bus callback for the "motion detected" message,
but I think I will take a break in writing unuseful code... :)

I believe however that my approach is applicable to any plugin, other than
motion detection related, that performs an analysis on the video stream
resulting in assigning a boolean value to each frame passed. The final sink
implementing a) or b) could be far down the pipeline.
To me it seems a quite generic problem, name it "boolean event filter"
e.g., so I guess there could be solutions around... any ideas ?
Thanks everybody for the interest,

Bye
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120124/19036e91/attachment.htm>


More information about the gstreamer-devel mailing list