The problem with gstreamer in TX2

hello
Recently,I develop H264 encode in TX2,and use gstreamer, but All things I find is using command line,Also ,I’d like to use c and c++ code to develop this ,please give me some advice ,thanks!