fijkplayer icon indicating copy to clipboard operation
fijkplayer copied to clipboard

RTSP Disconnect From Data Source

Open andrewcapatina opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The problem I am facing is that when I am done watching a RTSP video and clean up the Fijkplayer resources, my connection with the RTSP server is not terminated. This means I may need to add some extra network communication to my app which I should not because this should be handled by the RTSP protocol.

Describe the solution you'd like A clear and concise description of what you want to happen.

A solution I would like is to add a method within fijkplayer.dart that terminates the connection with RTSP server. So that means that my server can detect when the client (app) disconnects from the server and no longer needs to watch a video.

Add a method like endDataSource(String url) to the file.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Alternatives I've considered is to use the socket() class to establish a TCP connection and use some message to turn off the server streaming video. But I think this is unnecessary as the RTSP protocol should be able to terminate the connection.

I've also forked the repository and tried to see if I can call some function using MethodChannel to terminate the connection, but there is no documentation on what functions are avaialble for the MethodChannel.

I've tried looking through FijkPlayer API but it looks like there isn't anything I could use after searching for a while. I've tried using available function calls and looking at ffmpeg options but there wasn't anything I could find that would be exactly what I needed.

Additional context Add any other context or screenshots about the feature request here.

Is there documentation avaialable for determining what functions are available for the MethodChannel used in this code? It would be very helpful and if I could contribute to adding new functionality, I would like to try.

If someone already has a solution for this issue, please let me know.

The RTSP server I set up is setup using Gstreamer library on linux. Maybe there could be another reason why my server won't detect disconnections.

andrewcapatina avatar Jan 19 '22 06:01 andrewcapatina