UDP & RTP Filter Lacking In DirectShow
Fellow C++ Developers, =)
At the moment, I’m in the progress of creating a Mpeg-2 player in Microsoft Visual C++ with the use of DirectShow v9.0. The Mpeg2 player works as expected when playing Mpeg2 video files off the local machine. However, my goal is to display a live and continuous stream of Mpeg2 data.
So what about this Mpeg-2 stream? The Mpeg-2 stream is coming over a network through either UDP or UDP with RTP. Thus, I have 2 protocols I may choose from: stream encapsulation (UDP) or stream encapsulation (RTP/UDP). What creates this video stream is a dedicated Mpeg-2 encoder device that will transmit Mpeg-2 video over a Ethernet based network. The one catch I have is that I have no RTP DirectShow Filter, and so am pondering upon what I should do about this dilemma? I have tried searching for a RTP DirectShow Filter but don’t find many suitable options.So, my first question is does anyone know of any (perhaps free RTP DirectShow Filter’s)? The last thing I want to do is pay $600 for a RTP DirectShow filter. If it was perhaps $150 or less I may consider.
If I use RTP, then I will have forward error correction which has the means to compensate for the loss or corruption of the MPEG stream as it is transmitted over the network. However, because it’s a live stream, I’m not really interested in being able to pause it or even rewind it or anything of that nature. I simply need the Mpeg2 video to display in my Mpeg2 player application. Because of this, I’m thinking that it may suffice to just set my Mpeg2 encoder to encapsulate the Mpeg-2 video in a UDP stream (though I would really like to find a RTP DirectShow filter).
If I use UDP, then I essentially would have to listen on the port for UDP packets, extract the Mpeg2 data, and pass it on to the FilterGraph? How do I pass on the Mpeg2 data to the FilterGraph once I extract the small Mpeg-2 payload chunk? What if the UDP packets are out of order and the Mpeg2 data gets reversed? Will this crash the Mpeg2 decoder in my application? I don’t mind if the Mpeg2 video becomes garbled now and then if a UDP packet becomes corrupt or doesn’t reach its destination as long as some form of video is being showed
What other issues must I take into consideration? Would UDP suffice? Or is it better off for me to obtain a RTP DirectShow Filter? What would be the complexities if I wrote my own RTP DirectShow filter?
Thanks, :)
Jason

