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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -