How to use CUDA libraries with H264 raw data

I downloaded and run cudaDecodeD3D9.sln example and it runs perfectly by reading data from a video file. I don´t know if CUDA libraries can manage with H264 raw data stream. Actually I am getting RTP packets frame by frame from IP network and convert them to h264 raw data. But i can not manage to push h264 raw data to CUDA libraries. cudaDecodeD3D9.sln uses VideoSource library to read from a file. What i understand from what i read so far, i must use cuVideoParser library or cuVideoDecode directly, not use cuVideoSource . But i can’t manage to use any of the classes with h264 raw data stream too. Since i get raw data frame by frame i think i must start with cuVideoDecode, but i am really confused about how to use this class with h264 raw data. I will be gratefull for your advices, thanks