I want to decode H264NAL unit data to still image data

The gstream plugins are implemented through jetson_multimedia_api. The plugins are public and you can download the source code and check:

Driver Package (BSP) Sources

For your use-case, we would suggest use jetson_multiemdia_api. If you consider use gstreamer, you can implement the pipeline like:

appsrc ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw,format=RGBA ! appsink

In the pipeline, you can feed h264 stream to appsrc and get RGBA data in appsink

Please refer to the sample demonstrating appsrc and appsink:
Latency issue: nvv4l2h265enc accumulates four images before releasing the first - #3 by DaneLLL