Hi,
The samples are for demonstrating some functions and can be reference for developing certain use-case. May not be able to fit your use-case exactly and would need to take some time to look into the code. For 10_camera_recording, it is run like:
Capture frames through Argus -> modify some pixels in the frame through NvBuffer APIs -> encode into h264 stream
Please grep NvBufferMemMap() in the sample and you should see the related code.
The sample is for Bayer sensor. If your camera source is YUV sensor or USB camera, please check 12_camera_v4l2_cuda sample