How does libvlc process an .sdp file?
Posted: 19 Oct 2014 01:34
Hi I am having a problem with an app I'm creating for android which streams video to a pc app written in java using vlcj. I correctly get the .sdp session description file from the phone and if I open this in plain old vlc 2.1.5 there is no problem. The video/audio appears as expected and everything is great. When I try to open this with vlcj which just calls the native libvlc methods, I cannot open the same vlc file. Using this vlcj implementation, I can open any other type of media exactly how it would work in vlc.
So I have been going through vlc and the logs when I open this .sdp file trying to figure out what process is used to open the sdp file that is different than any other file. Obviously there is something involved in getting the RTP streams from the sdp file and setting that up, but I figured that would all be done by libvlc in my playMedia(mrl) call. I even get the "opening" event from libvlc, followed by the buffering event which has the value 0.0, followed by the "playing" event. When I play a file that actually works I see buffering 0.0, 3.3, etc until it gets to 100% before playing. With the .sdp file in vlcj it doesn't do that.
One thing I noticed is that when I go to open a file in vlc windows client, .sdp files are in the "playlist" section. Is there something that libvlc does separately for these files that is necessary before playing them? I honestly cannot figure out this problem at all because back at home on my desktop pc in the dorm it works absolutely fine. The vlcj author on stack overflow basically told me that it's not vlcjs fault since it just calls libvlc methods natively.
Another thing I noticed was that in vlcj, when loading an mrl the lib has to decide whether the file uses media_new_location or media_new_path and my sdp file automatically gets chosen as a path. Should this be a location since it's technically going to a network stream?
Any thoughts appreciated thank you.
So I have been going through vlc and the logs when I open this .sdp file trying to figure out what process is used to open the sdp file that is different than any other file. Obviously there is something involved in getting the RTP streams from the sdp file and setting that up, but I figured that would all be done by libvlc in my playMedia(mrl) call. I even get the "opening" event from libvlc, followed by the buffering event which has the value 0.0, followed by the "playing" event. When I play a file that actually works I see buffering 0.0, 3.3, etc until it gets to 100% before playing. With the .sdp file in vlcj it doesn't do that.
One thing I noticed is that when I go to open a file in vlc windows client, .sdp files are in the "playlist" section. Is there something that libvlc does separately for these files that is necessary before playing them? I honestly cannot figure out this problem at all because back at home on my desktop pc in the dorm it works absolutely fine. The vlcj author on stack overflow basically told me that it's not vlcjs fault since it just calls libvlc methods natively.
Another thing I noticed was that in vlcj, when loading an mrl the lib has to decide whether the file uses media_new_location or media_new_path and my sdp file automatically gets chosen as a path. Should this be a location since it's technically going to a network stream?
Any thoughts appreciated thank you.