Forum Discussion
Kirk_Bauer_1018
Nimbostratus
Jul 20, 2007How to tell when a RTSP request completes?
My knowledge of RTSP is very limited so maybe I'm not asking this properly. But it seems I can watch for the event RTSP_REQUEST to see when a new RTSP session is started. Does that session typically request just one video (accessible via RTSP::uri)? How do I tell when that video is done playing and/or that request is finished?
I want to be able to track the number of active RTSP streams per-URI. Something like this (using the persistence table to track data with timeouts):
when RULE_INIT {
array set ::uri_count { }
}
when RTSP_REQUEST {
set uri [RTSP::uri]
if { [ info exists ::uri_count($uri) ] } {
incr ::uri_count($uri)
} else {
set ::uri_count($uri) 1
}
}
when ?????????? {
if { [ info exists ::uri_count($uri) ] } {
decr ::uri_count($uri)
if { $uri_count($uri) <= 0 } {
unset ::uri_count($uri)
}
}
}
I just don't know how to detect when the request is finished... can anybody help?
- Brandon_Burns_8Historic F5 AccountKirk,
- Kirk_Bauer_1018
Nimbostratus
Unfortunately per-URI. They want URI persistence but want to limit the maximum number of connections for one URI on one server. - Kirk_Bauer_1018
Nimbostratus
Does anybody know how the events are chained and in which order? For example, if I do this: - Deb_Allen_18Historic F5 AccountYes, you can reference the variable in any subsequent event for the life of the connection.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects