2.5. Capturing and Playing Module

If the user is going to start recording procedures, he must first prepare two objects: a queue and a codec. The queue object is a pointer to the queue structure, where encoded data is stored for RTP. The codec object is a pointer to a codec structure, containing all coding parameters and functions. These objects (a queue and a codec) are passed to a capturing thread.

If user is about to start playing procedures, start_player is called. Queue and codec are passed to this function. In this case 'queue' means the queue structure, from which encoded frames are taken. These frames are put there by RTP thread. Codec is a pointer to decoder structure, used while audio decoding. The third parameter is a number of buffered frames in queue. Playing thread is a part of receiver - it must take care whether signal is played continuously. The length of the buffer is taken from the queue structure. The more frames are buffered, the bigger delay, but also the less probability of losing continuousity of the signal. This value is constant. Until now, no adaptive procedures have been prepared. To stop the playing thread stop_player is used.

The API is as follows: