Taking snapshots at discrete time using nvcamerasrc

Hi,

I’m trying to take snapshots on the TX1 on a gstreamer pipeline as the following :

nvcamerasrc ! jpegenc ! appsink

I dont want to sent the pipeline from NULL->PLAYING and back everytime I need a snapshot, since I want it to be as close as it can to the discrete time value from where I asked for the snapshot. Swiching from PAUSE->PLAYING doesn’t work since the nvcamerasrc has q internal queue of 10 buffers, so I get older buffers for my snapshots. I made an application using libargus to test if this could be done and I was able to take snapshots really fast at discrete values, but using nvcamerasrc is a bit more convenient for me. I see two properties on nvcamerasrc that resembles some functiionality exposed on libargus:

trigger             : property to fire pre capture trigger
                        flags: readable, writable
                        Enum "GstNvCamCaptureTrigger" Default: 0, ""
                           (1): idle             - GST_NVCAM_TRIGGER_IDLE
                           (2): start            - GST_NVCAM_TRIGGER_START
  intent              : property to select capture intent
                        flags: readable, writable
                        Enum "GstNvCamCaptureIntent" Default: 1, "preview"
                           (1): preview          - GST_NVCAM_INTENT_PREVIEW
                           (2): still            - GST_NVCAM_INTENT_STILL
                           (3): video            - GST_NVCAM_INTENT_VIDEO
                           (4): video-snapshot   - GST_NVCAM_INTENT_VIDEO_SNAPSHOT
                           (5): zsl              - GST_NVCAM_INTENT_ZSL

I got the following questions;

1- Are these properties working?
2- If so, can someone provide an example on how to use them properly?
3- Will they work for my particular worcase or they are intended for something else?

Regards,
JJ

Hi JJ,
Please refer to nvgstcapture-1.0. It runs in preview ad do jpeg capture on demand.

The source code path:
https://developer.nvidia.com/embedded/dlc/l4t-sources-24-2-1