RTSP

Mar 16, 2015 at 10:09 AM
Hello,

I'm trying to use your library to read a live H264 stream in TS container via RTSP instead of HLS. I wrote the code for a simple RTSP reader in WinRT, it works great, I can obtain the TS packets.
I'm trying to understand the Windows Phone Streaming Media source code but I need a little help. What should I implement in your library to replace HLS with my RTSP reader ?

Cordially,
Stephane.
Coordinator
Mar 16, 2015 at 5:13 PM
If you want to fit it into phonesm, the simplest thing is probably to copy the HttpConnectionReader directory into your own project, modify HttpConnectionReader and HttpConnectionReaderManager to do RTSP (either entirely or based on the supplied URL), then register the classes with the DI container. Since I don't think there is a "SetParameter()" extension method helper for what you need, you will need to get at the container builder through: "_mediaStreamFacade.Builder". I think the methods on the IBuilder interface are enough in this case, but if you need to, you can get at the actual AutoFac ContainerBuilder by casting the IBuilder instance to BuilderBase, and then using BuilderBase.ContainerBuilder. For reference, the HttpConnectionReader classes are registered through HttpConnectionModule.

Alternately, you could supply your own builder by modifying a copy of TsMediaManagerBuider and assigning a new MediaStreamFacade factory in DefaultMediaStreamFacadeParameters that uses your builder instead of TsMediaManagerBuilder. (The extra level of indirection through that static Factory property is to make it easier to customize the builder when using the Player Framework plugin.)

I'm 95% sure you can do all of this without modifying any of the phonesm code. At least, that is the intent and I'd like to know if anything does need changing (the most likely culprit being some class or member needing to be public or protected instead of protected or private). Oh, and you should be using the current source for this.
Mar 16, 2015 at 9:38 PM
Thank you very much for this full reply, I will try that as soon as possible.