After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703158 - gst-rtsp-server: identify client of a stream transport
gst-rtsp-server: identify client of a stream transport
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-26 23:00 UTC by Aleix Conchillo Flaqué
Modified: 2013-10-04 04:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
store client in stream transport (4.17 KB, patch)
2013-06-26 23:09 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2013-06-26 23:00:54 UTC
I am using RTP session on-ssrc-active to adjust an encoder bitrate. I do that depending on fraction lost for the given on-ssrc-active source and other factors.

From on-ssrc-active, there is no way to know which GstRTSPClient the source corresponds to.
Comment 1 Aleix Conchillo Flaqué 2013-06-26 23:09:06 UTC
Created attachment 247861 [details] [review]
store client in stream transport

With this, it is possible to retrieve the client associated with a stream transport.

From on-ssrc-active, we get the RTP source which has a qdata (GstRTSPServer.stream) for the stream transport. And from that we get the client.

However, GstRTSPServer.stream qdata is not documented anywhere. Not sure if it's supposed to be used.
Comment 2 Wim Taymans 2013-06-27 03:08:01 UTC
It is not correct. A stream transport can have multiple (or no) clients.
Comment 3 Aleix Conchillo Flaqué 2013-06-27 05:37:57 UTC
(In reply to comment #2)
> It is not correct. A stream transport can have multiple (or no) clients.

I thought those were the streams. And that each stream had a list of stream transports, each one created by the setup request.

GstRTSPStreamTransport only holds one GstRTSPTransport which seems only one client-server relationship.

Obviously, I am missing something important.
Comment 4 Wim Taymans 2013-07-01 09:38:51 UTC
> 
> Obviously, I am missing something important.

The GstRTSPClient is just an object handling this particular client connection. What can happen is this:

 - client connects (gets GstRTSPClient object)
 - client does some things, opens session, starts RTP data transport
 - client closes connection (GstRTSPClient finilizes, RTP transport continues)
 - client connects again, new GstRTSPClient is created, uses session id to
   find previous session info, does some more things on its stream (PAUSE, PLAY
   etc)

So, the Client object does not really model a Client but more like a connection with a client that comes and goes. This means that a stream can exist without a GstRTSPClient object.

also, a stream can exist with multiple GstRTSPClient objects when the clients would use the same session id. It is possible for a client to open multiple connections and do operations on the session streams from both connections.

Both of these situations are not very common but the data model allows them.
Comment 5 Aleix Conchillo Flaqué 2013-07-01 20:41:46 UTC
Thank you, that really helped. I was thinking everything as a one time connection where RTSP and RTP connections are always alive and related with single GstRTSPClient.

Actually, this is how my use case works. I'll try to figure out a general case, if it makes sense at all.