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