RTPSendThread Class Reference

[ARTS Index] [ARTS Heirarchy]


Service thread for real-time streaming input. More...

#include <rtp.h>

Inherits: RTPThread

Public Members

Protected Members


Detailed Description

The service thread used to deliver received rtp packets. This virtual service thread provides the core functionality for streaming of inbound media packets. In fact, streaming includes abstract I/O services that are implemented on a per protocol bases which allows RTPRecvThread to drive IPX "RTP" sockets or even VAT sessions.


RTPSendThread(Semaphore *start = NULL, int pri = 0, timeout_t timer = 20)

Construct a RTP service thread for sending packets. We normally use 20ms timing frames.

Parameters:
pri level of this thread relative to parent.
start semaphore to use for synchronized startup.

virtual ~RTPSendThread()

Terminate the sending thread service after timing out until the current frame has a chance to be sent.

virtual inline unsigned getSampling(void)

Allows derived class to retrieve data sampling format. This may be useful in conjunction with some codec's. The derived RTPFetch() may use this to determine recording format, etc.

Returns:
RTP data sampling format in use.

virtual void setSession(unsigned long session)

This may be used to specify a new session id number to use.

Parameters:
session id.

virtual void InitSender(void)

Initial thread service. This is used to support multiple inheretance of sending and receiving threads in a single object.

virtual void ExitSender(void)

Exit thread service for self destructing objects. This is used to support multiple inheretance of sending and receiving threads in a single object.

virtual void RunSender(void)

The default run method of a sending service thread. This is used to support multipe inheretance of sending and receiving threads in a single object.

virtual ssize_t RTPSend(unsigned char *buf, size_t len)

Receive RTP data into an RTP formatted packet using the current protocol from the read routine in the derived class. This may apply decompression and other codec functions. This function normally blocks until a RTP packet is received.

Parameters:
buf pointer to rtpdata buffer.
len of bytes to write.
Returns:
actual number of bytes sent on success, -1 on error.

virtual size_t RTPFetch(unsigned char *buf, timeout_t timer)

Fetch a sample of data in the current sampling format for the time interval specified.

Parameters:
timer for data frame to read.
buf pointer to rtpdata buffer.
Returns:
number of bytes fetched on success, -1 on failure.

virtual void RTPUpdate(timeout_t timer)

Update the time stamp for the next sent packet in the derived protocol.

Parameters:
current sending timeout.

virtual void RTPSendError(void)

Error handler for derived class.

inline void setTimeout(timeout_t timer)

Set the effective time frame for sending RTP data. This cal should be made within a derived RTPUpdate() method to assure it does not occur during processing.

Parameters:
new timeout.

  • Author: David Sugar (dyfet@ostel.com)
  • Documentation generated by dyfet@centauri.sys on Tue Jun 29 23:36:17 EDT 1999
Kdoc