Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNRTPEncoderBase Class Reference

#include <MNRTPEncoderBase.h>

Inheritance diagram for MNRTPEncoderBase:

Inheritance graph
[legend]
Collaboration diagram for MNRTPEncoderBase:

Collaboration graph
[legend]
List of all members.

Public Types

enum  timer_type { TT_PERIODIC, TT_DYNAMIC }

Public Member Functions

size_t get_std_packetsize () const
void set_std_packetsize (size_t sz)
size_t get_packetsize () const
Timeval get_timeout () const
size_t get_ts_offset () const
void set_ts_offset (size_t ts)
virtual size_t get_abs_byte_pos ()=0
virtual void update_absolute_position (int32 offset)=0
 MNRTPEncoderBase ()
virtual ~MNRTPEncoderBase ()
virtual MNRopeget_next_data (SH::SinkEndpoint *pull_here, size_t max_bytes_to_pull, SH::ReturnCode &except, size_t &pulled_bytes, bool &rtp_marker, u_int32 &rtp_timestamp, Timeval &next_playtime_packet, int bandwidth)=0
virtual MNRopeget_data (SH::SinkEndpoint *pull_here, size_t max_bytes_to_pull, SH::ReturnCode &except, size_t &pulled_bytes, bool &rtp_marker, u_int32 &rtp_timestamp, Timeval &next_playtime_packet, int bandwidth, u_int32 filepos)
virtual u_int32_t get_std_bw (int fd)=0
virtual int get_timer_type ()=0
virtual size_t get_pulled_bytes ()=0

Static Public Member Functions

MNRTPEncoderBasefactory (SDP::PayloadTypes payload_type, RetransBase *retrans)

Member Enumeration Documentation

enum MNRTPEncoderBase::timer_type
 

Timer type definition for different encoding schemes. e.g. TT_PERIODIC for CBR encoding and TT_DYNAMIC for dynamic encoding

Enumeration values:
TT_PERIODIC 
TT_DYNAMIC 


Constructor & Destructor Documentation

MNRTPEncoderBase::MNRTPEncoderBase  ) 
 

Constructor.

virtual MNRTPEncoderBase::~MNRTPEncoderBase  )  [virtual]
 

Destructor.


Member Function Documentation

MNRTPEncoderBase* MNRTPEncoderBase::factory SDP::PayloadTypes  payload_type,
RetransBase retrans
[static]
 

Static factory function that creates a new EncoderCodec of the given type if it is known.

virtual size_t MNRTPEncoderBase::get_abs_byte_pos  )  [pure virtual]
 

Implemented in MNRTPEncoderCommon.

virtual MNRope* MNRTPEncoderBase::get_data SH::SinkEndpoint pull_here,
size_t  max_bytes_to_pull,
SH::ReturnCode except,
size_t &  pulled_bytes,
bool &  rtp_marker,
u_int32 rtp_timestamp,
Timeval next_playtime_packet,
int  bandwidth,
u_int32  filepos
[virtual]
 

virtual MNRope* MNRTPEncoderBase::get_next_data SH::SinkEndpoint pull_here,
size_t  max_bytes_to_pull,
SH::ReturnCode except,
size_t &  pulled_bytes,
bool &  rtp_marker,
u_int32 rtp_timestamp,
Timeval next_playtime_packet,
int  bandwidth
[pure virtual]
 

A pure virtual function that must be implemented by all specific codecs.

Parameters:
pull_here IN: A pointer to a stream handler's source endpoint, from which the function can pull data to produce a packet.
max_bytes_to_pull IN: The other functions call this packetsize, but combine it with additional meanings. Max_bytes_to_pull indicates only the maximum number of bytes that the caller can process in a single swallow. If this value is 0, the caller has no restrictions concerning length.
except OUT: An error code. It can be ignored if the return value is not NULL, and it should be evaluated if the return value is NULL. In the latter case, it indicates the error that occurred. The codec-specific error codes (stream_event_t) can be mapped from the larger set of stream handler error codes (the values are not identical).
pulled_bytes OUT: Indicates the number of bytes that have been pulled from the source endpoint. This value must be valid even if the return value is NULL and an except value has been set.
rtp_marker OUT: On exit, this value is 1 if the marker bit in the RTP header should be set, otherwise it is 0. Since the marker value is codec-dependent, only the codec can decide when to set and when to clear it.
rtp_timestamp OUT: RTP timestamp of the data stream. The resoltuion of the RTP timestamp depends on the payload type.
next_playtime_packet OUT: The time that the caller must wait before requesting the following packet. It is the callers decision whether this packet is sent immediately or after the timeout (if that behaviour is consistent). In contrast to codec_next_timeout use by the other functions, This variable is always unmodified from the normal playtime. The caller must compute all fast forward or slow motion values from this value.
Returns:
A rope containing the encoded data, or NULL in case of error. If NULL is returned, the out variable except specifies details of the error.

Implemented in RTP::EncLayerDummy, MNRTPEncoderH261, MNRTPEncoderMP3, MNRTPEncoderMPEG, MNRTPEncoderPCMU, and MNRTPEncoderSPEG.

size_t MNRTPEncoderBase::get_packetsize  )  const
 

virtual size_t MNRTPEncoderBase::get_pulled_bytes  )  [pure virtual]
 

This function returns the amount of bytes that were read from the file source.

Implemented in MNRTPEncoderCommon.

virtual u_int32_t MNRTPEncoderBase::get_std_bw int  fd  )  [pure virtual]
 

Implemented in RTP::EncLayerDummy, MNRTPEncoderH261, MNRTPEncoderMP3, MNRTPEncoderMPEG, MNRTPEncoderPCMU, and MNRTPEncoderSPEG.

size_t MNRTPEncoderBase::get_std_packetsize  )  const
 

Timeval MNRTPEncoderBase::get_timeout  )  const
 

virtual int MNRTPEncoderBase::get_timer_type  )  [pure virtual]
 

This function is called by the packetizer stream handler to allow it to specify what kind of timing should be used for the packetizing

Returns:
timer_type that is set by the encoder

Implemented in RTP::EncLayerDummy, MNRTPEncoderH261, MNRTPEncoderMP3, MNRTPEncoderMPEG, MNRTPEncoderPCMU, and MNRTPEncoderSPEG.

size_t MNRTPEncoderBase::get_ts_offset  )  const
 

void MNRTPEncoderBase::set_std_packetsize size_t  sz  ) 
 

void MNRTPEncoderBase::set_ts_offset size_t  ts  ) 
 

virtual void MNRTPEncoderBase::update_absolute_position int32  offset  )  [pure virtual]
 

Implemented in MNRTPEncoderCommon.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:00 2005 for Komssys by doxygen 1.3.8