Encode and Preview code

Hi,
Please refer to the source code of nvgstcapture-1.0 in
https://developer.nvidia.com/embedded/dlc/l4t-sources-24-2-1

Also a sample from @dk1900
[url]https://devtalk.nvidia.com/default/topic/1005986/jetson-tk1/tk1-omxh264enc-not-respecting-bitrate-during-scene-changes-/post/5137046/#5137046[/url]