Image resize

I am trying to convert video(video.mp4) from the disk to frames using hardware and resize them
is there any c++ samples?

gst-launch-1.0 videotestsrc ! ‘video/x-raw, width=(int)640, height=(int)480,
format=(string)I420’ ! nvjpegenc ! multifilesink location=frame%d.jpg -e

https://devtalk.nvidia.com/default/topic/1058270/deepstream-sdk/nvvidconv-vs-nvvideoconvert-ds-4-0-nano-/post/5366862/#5366862

could you extend, please?
are you trying to reduce resolution for performance?
trying to increase resolution for quality?
both?
neither of the two?
like in the examples below?

gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1' ! nvvidconv ! 'video/x-raw, width=640, height=480, format=I420, framerate=30/1' ! videoconvert ! identity drop-allocation=1 ! 'video/x-raw, width=640, height=480, format=RGB, framerate=30/1' ! v4l2sink device=/dev/video2
./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM), width=640, height=480, format=NV12, framerate=30/1 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-interval=1"

there are examples in the forum how to incorporate gstreamer pipeline into c/python code.
e.g:
https://devtalk.nvidia.com/default/topic/1057461/jetson-nano/jetson-nano-gstreamer-opencv-using-nvjpegenc-to-encode-frames-from-opencv-as-appsrc/
https://devtalk.nvidia.com/default/topic/1031544/gstreamer-input-to-opencv-process-and-send-back-to-gstreamer-show-/
https://devtalk.nvidia.com/default/topic/1057312/jetson-tx2/fail-to-open-tx2-onboard-camera-with-opencv-c-via-nsight-gstreamer-issue/
etc

you may like to check https://devtalk.nvidia.com/default/topic/975862/which-method-is-the-fastest-to-resize-image-and-converion-color-format-/
they point out to the sample 07
https://github.com/sabipeople/tegra/blob/master/tegra_multimedia_api/README