Re: [Live-devel] Getting jitter value
> On Dec 2, 2023, at 5:19 AM, Ayik Ahmet wrote: > > Hello, thank you for responses they helped me a lot. However I came up with a > new question. I would like to get number of clients. The way I’d do this is not by looking at RTCP ’transmission statistics' (because they’re not always reliable/up-to-date, because some clients might not send back RTCP “RR”s, or they might get lost or blocked). Instead, I’d simply count the number of “ClientSession” objects. (Note, *not* the number of “ClientConnection” objects, because it is possible for a RTSP client to close its TCP connection even while it is still receiving RTP packets, or even to use more than one TCP connection for the same client session.) Just call: yourServer->numClientSessions() to get this count. Ross Finlayson Live Networks, Inc. http://www.live555.com/ ___ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel
Re: [Live-devel] Getting jitter value
Hello, thank you for responses they helped me a lot. However I came up with a new question. I would like to get number of clients. It works partially okay, For example, when I connect new client, I can see this increment suddenly, when I disconnect client I see effect after 10-20 seconds. Lets say still acceptable. But when there is no client I get random values. I assume it is because there is no RTPSink alive anymore. and I could not find anyway to check if my created RTPSink is alive. I m storing its pointer but when there is no client, it is neither valid nor null, So I cant determine status if RTPSink. Thanks In Advance Ozgur Ayik From: live-devel on behalf of Ross Finlayson Sent: Thursday, November 30, 2023 11:46 AM To: LIVE555 Streaming Media - development & use Subject: Re: [Live-devel] Getting jitter value > On Nov 30, 2023, at 11:27 PM, Ayik Ahmet wrote: > > Hello, I want to get jitter from my RTPSink, but I cant get > RTPTransmissionStatsDB by using > > RTPTransmissionStatsDB& transmissionStatsDB() const { return > *fTransmissionStatsDB; } > > because RTPTransmissionStatsDB doesnot have any contructor. How can I obtain > this class instance to get jitter? I think you’re misunderstanding the meaning of the "transmissionStatsDB()” function. It’s not used to create an object; instead, it simply returns a reference to an object that already exists. I.e., you can just do something like: RTPTransmissionStatsDB& db = myRTPSink->transmissionStatsDB(); RTPTransmissionStatsDB::iterator iter(db); while ((RTPTransmissionStats* stats = iter.next()) != NULL) { unsigned jitter = stats->jitter(); // etc. } Ross Finlayson Live Networks, Inc. http://www.live555.com/ ___ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel ___ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel
Re: [Live-devel] Getting jitter value
> On Nov 30, 2023, at 11:27 PM, Ayik Ahmet wrote: > > Hello, I want to get jitter from my RTPSink, but I cant get > RTPTransmissionStatsDB by using > > RTPTransmissionStatsDB& transmissionStatsDB() const { return > *fTransmissionStatsDB; } > > because RTPTransmissionStatsDB doesnot have any contructor. How can I obtain > this class instance to get jitter? I think you’re misunderstanding the meaning of the "transmissionStatsDB()” function. It’s not used to create an object; instead, it simply returns a reference to an object that already exists. I.e., you can just do something like: RTPTransmissionStatsDB& db = myRTPSink->transmissionStatsDB(); RTPTransmissionStatsDB::iterator iter(db); while ((RTPTransmissionStats* stats = iter.next()) != NULL) { unsigned jitter = stats->jitter(); // etc. } Ross Finlayson Live Networks, Inc. http://www.live555.com/ ___ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel