c - Gstreamer: capturing still frames from webcam with appsink? -
i have working c program streams continuous frames webcam appsink. however, i'm interested in capturing single frames when user presses key.
in other words: when idle, appsink receives no frames, when key pressed, appsink should pull single new frame camera source.
i've tried using output_selector "valve" switch frames between fakesink , appsink. when app idle, pipeline running, , looks like
v4l2src -> output_selector -> fakesink
and when want capture frame, change output_selector's active pad pipeline looks this:
v4l2src -> output_selector -> jpegenc -> appsink
then gst_app_sink_pull_sample() , switch active pad fakesink. issue (usually every other capture) duplicate frame that's same last one. how can resolve issue? there way achieve desired behavior?
Comments
Post a Comment