Posted by
Sven Gothel on
Aug 06, 2013; 6:59am
URL: https://forum.jogamp.org/GLMediaPlayer-Stream-initialization-tp4029746p4029747.html
On 08/06/2013 12:07 AM, Stefko [via jogamp] wrote:
> Does anybody know the reason for having GLMediaPlayer initialized using a
> URLConnection as a parameter?
Using a URL* is flexible in general,
since it also contains local file, jar etc
protocols - plus you can add your own URL handlers.
Using a URLConnection, states that a connection should have been
made already, i.e. resolved URL w/ opened stream.
Maybe this is even too much of a requirement ?
> Having URLConnection imposes the Java limitations on the
> supported protocols while in fact it's the ffmpeg code which handles the
> protocols/parses the URL etc.
GLMediaPlayer does not consist out of our libav/ffmpeg implementation only,
i.e. the Android backend requires an URI.
An URI does not imply a resolved name and hence no connection has been made.
> I have a project which requires playing live rtsp stream and couldn't do it
> with the original JOGL code. Had to modify the Java and some of the C code,
> recompile etc to make it accept just a String with the URL for the stream
> initialization.
>
> Isn't it better if we replace the URLConnection parameter with a String and
> use the full potential of the ffmpeg, or am I missing something very obvious?
You made your point!
If we use an URI instead, we would loose the requirements
while still hinting to a 'proper' resource location protocol.
URI would also allow using the RTSP scheme/protocol
w/o requiring one to 'manually' implementing an URL handler in Java.
>
> Any comments are most welcome!
If you can provide a tested patch for us,
using an URI instead of URLConnection,
that would be great.
Otherwise you may be able to confirm that an URI
will solve this issue.
Thank you.
~Sven