Using a networkstream as a source

Topics: Question
Jan 6, 2016 at 3:56 PM
Edited Jan 6, 2016 at 3:57 PM
I'm really green in network and streaming programming and learning it as I go along, so apologies if my question is based on wrong assumptions.

I'm trying to build an application whose aim is to convert a customized network stream to an rtsp stream. I'm getting the packets using a NetworkStream. After some processing on my end I am able to get a valid H264 structure, and when I dump the received information to a file (ending the connection after a predefined number of bytes have been read) it can be played using ffplay.

I've downloaded the source, built and imported the required libraries to my project.

Is it possible to push the bytes I processed into an RTSPServer to be transmitted?
I've looked at the Unitests section and couldn't find something similar to what I'm trying to accomplish. I saw a mention in the forum about one of the tests being able to transmit the desktop screen however I could not locate it in the Unitests, is there something I'm missing?

Thanks in advance!
Jan 6, 2016 at 5:05 PM
Please see the RFC6184MEDIA class, it has a Packetize method which accepts Nal units as byte array and will create the Rtp packets as required from that input.

Essentially you just have to feed your byte array to the Packetize method and it will be sent out from the source.

If you have any questions post the code you used and I'll help you from there.
Marked as answer by juliusfriedman on 1/6/2016 at 9:05 AM