Using Cuda Decoder for streamed h264 data

I am using cuda Decoder API to decode h264 data. The example given with sdk uses a h264 source file. I have h264 frames being streamed in and I want to decode these frames one by one. I was not able to find any documentation on how to pass frames instead of source file.

Can someone help me out here.