rtmp2sink: handle EOS and close connection gracefully
It would be nice for rtmp2sink to handle EOS event and close connection gracefully, ideally with configurable commands that are sent (FCUnpublish, closeStream, deleteStream).
I've tried to hack something together, and it seems to do something useful (commands are being sent), but having no experience with GStreamer plugins development I could use some help with directions, something as simple as link to specific part of the documentation would be useful already.
The most worrying is this in logs so far:
0:00:06.329080082 92351 0x7f3e9c00ef00 ERROR rtmpconnection rtmpconnection.c:1023:gst_rtmp_connection_send_command:<GstRtmpConnection@0x7f3e84015cd0> Called from wrong thread
0:00:06.329096544 92351 0x7f3e9c00ef00 ERROR rtmpconnection rtmpconnection.c:1023:gst_rtmp_connection_send_command:<GstRtmpConnection@0x7f3e84015cd0> Called from wrong thread
0:00:06.329107698 92351 0x7f3e9c00ef00 ERROR rtmpconnection rtmpconnection.c:1023:gst_rtmp_connection_send_command:<GstRtmpConnection@0x7f3e84015cd0> Called from wrong thread
Here is what I have so far: nazar-pc/gst-plugins-bad@1f373afd