RTPRecvThread 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.


RTPRecvThread(Semaphore *start = NULL, int pri = 0)

Construct a RTP service thread for receiving packets.

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

virtual ~RTPRecvThread()

Terminate the receiving thread service.

virtual inline unsigned getSampled(void)

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

Returns:
RTP data sampling format in use.

virtual void InitReceiver(void)

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

virtual void ExitReceiver(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 RunReceiver(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 RTPRecv(unsigned char *buf, unsigned short *seq, unsigned long *timestamp)

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:
seq number of received packet.
timestamp of received packet.
buf pointer to rtpdata buffer.
Returns:
actual number of bytes read on success, -1 on error.

virtual size_t RTPPost(unsigned char *buf, unsigned short seq, unsigned long timestamp, size_t len)

Virtual function used to post the last retrieved message. This operates by calling the protocol 'derived' class which has the header information for the last read packet.

Parameters:
seq number of last read packet.
buf pointer to rtpdata buffer.
time stamp of this packet.
Returns:
number of bytes posted on success, -1 on failure.

virtual void RTPRecvError(void)

Error processing routine for receive failures.

virtual void SessionId(unsigned long session)

Protocol may use this to specify a new session has been initiated.

Parameters:
session number of this session.

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