Libnemesi is implemented with several nested threads dispatched for every session. Within the main thread we send requests to the various servers identified by an RTSP Controller structure, then a thread is dispatched to handle responses.
This is a brief documentation of the various layers involved in libnemesi
libnemesi Reference: Doxygenerated reference for libnemesi
RTSP Layer: How the RTSP layer in libnemesi works
RTP Layer: Quick description of the RTP layer in libnemesi
RTCP Layer: How libnemesi implements the RTCP protocol
SDP parser: Libnemesi implements a simple SDP parser for sessions. This is how it works