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

could you extend, please?
are you trying to reduce resolution for performance?
trying to increase resolution for quality?
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.

you may like to check
they point out to the sample 07