25 #include "sdp/SdpCodec.h" 26 #include "os/OsBSem.h" 58 static const UtlContainableType
TYPE;
66 const UtlString &plcName =
"");
79 static OsStatus
reset(
const UtlString& namedResource, OsMsgQ& fgQ);
85 static OsStatus
selectCodecs(
const UtlString& namedResource,
95 static OsStatus
setPlc(
const UtlString& namedResource,
97 const UtlString& plcName =
"");
149 virtual OsStatus
getCurrentLatency(
int &latency,
int input=0,
int output=0)
const;
RtpSeq mLastPulledSeq
Sequence number of last pulled packet.
Definition: MprDecode.h:185
UtlBoolean handleDisable()
perform the disable operation on the resource
Definition: MprDecode.cpp:1011
Message object used to communicate with the media processing task.
Definition: MpResourceMsg.h:30
int32_t rtpStreamHint
Recommended playback position (in RTP timestamp units).
Definition: MprDecode.h:177
virtual OsStatus pushBuffer(int inputPort, MpBufPtr &inputBuffer)
MpResource::pushBuffer
Definition: MprDecode.cpp:231
RtpTimestamp rtpStreamPosition
Current pulling JB position (in RTP timestamp units).
Definition: MprDecode.h:176
Definition: MpPlcBase.h:40
MpDecoderBase ** mpPrevCodecs
Similar list of all codecs that have ever been listed on mpCurrentCodecs.
Definition: MprDecode.h:208
MpJitterBufferEstimation * mpJbEstimationState
State of JB delay estimation.
Definition: MprDecode.h:187
unsigned sampleRate
Sample rate of this stream.
Definition: MprDecode.h:173
UtlBoolean handleReset()
Handle MPRM_RESET message.
Definition: MprDecode.cpp:985
RtpSeq rtpStreamSeq
Current sequence number of RTP stream.
Definition: MprDecode.h:175
Definition: MpResourceMsg.h:56
Base class for all media processing decoders.
Definition: MpDecoderBase.h:37
virtual ~MprDecode()
Destructor.
Definition: MprDecode.cpp:109
UtlBoolean mIsStreamInitialized
Have we received at least one packet?
Definition: MprDecode.h:170
Definition: MprDecode.h:54
UtlBoolean handleSelectCodecs(SdpCodec *pCodecs[], int numCodecs)
Replace mpCurrentCodecs with pCodecs.
Definition: MprDecode.cpp:746
UtlBoolean mOwnDJ
Is dejitter owned by this decoder?
Definition: MprDecode.h:169
int mG722HackPayloadType
Definition: MprDecode.h:201
UtlBoolean handleDeselectCodecs(UtlBoolean shouldLock=TRUE)
Remove all codecs from mpCurrentCodecs, transferring them to mpPrevCodecs.
Definition: MprDecode.cpp:910
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
virtual OsStatus getCurrentLatency(int &latency, int input=0, int output=0) const
Get current input to output latency (in samples)
Definition: MprDecode.cpp:372
MpDecoderBase ** mpCurrentCodecs
List of the codecs to be used to decode media.
Definition: MprDecode.h:194
void setConnectionId(MpConnectionID connectionId)
Set the ID of a connection this resource belongs to.
Definition: MprDecode.cpp:347
Smart pointer to MpRtpBuf.
Definition: MpRtpBuf.h:348
static const UtlContainableType TYPE
Class name, used for run-time checks.
Definition: MprDecode.h:58
static OsStatus deselectCodecs(const UtlString &namedResource, OsMsgQ &fgQ)
Clear set of codecs this resource is able to decode.
Definition: MprDecode.cpp:205
unsigned playbackFrameSize
Stream frame size of this stream (in RTP timestamp units).
Definition: MprDecode.h:179
uint32_t dejitterLength
Definition: MprDecode.h:181
MpDecoderPayloadMap mDecoderMap
Mapping of payload types to decoder instances.
Definition: MprDecode.h:211
virtual UtlBoolean handleMessage(MpResourceMsg &rMsg)
Handle new style messages for this resource.
Definition: MprDecode.cpp:705
UtlContainableType getContainableType() const
Definition: MprDecode.cpp:367
uint8_t rtpPayloadType
Current RTP payload type.
Definition: MprDecode.h:180
AddlResMsgTypes
Definition: MprDecode.h:50
UtlBoolean handleDeselectCodec(MpDecoderBase *pDecoder)
Remove one codec from mpConnection's payload type decoder table.
Definition: MprDecode.cpp:893
uint32_t RtpTimestamp
RTP timestamp.
Definition: MpTypes.h:60
Class for decoding of incoming RTP, resampling it to target sample rate and slicing to frames of targ...
Definition: MpJitterBuffer.h:45
uint32_t playbackStreamPosition
Current playback position (in RTP timestamp units).
Definition: MprDecode.h:178
MprDejitter * mpMyDJ
Dejitter instance, used by this decoder.
Definition: MprDecode.h:168
virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[], MpBufPtr outBufs[], int inBufsSize, int outBufsSize, UtlBoolean isEnabled, int samplesPerFrame, int samplesPerSecond)
This method does the real work for the media processing resource and must be defined in each class de...
Definition: MprDecode.cpp:404
int mNumCurrentCodecs
Length of mpCurrentCodecs array.
Definition: MprDecode.h:195
virtual void reset()
Reset decoder to the initial state to be able process new stream.
Definition: MprDecode.cpp:191
int mNumPrevCodecs
Length of mpPrevCodecs array.
Definition: MprDecode.h:209
void deletePriorCodecs()
Delete the array of previously used codecs.
Definition: MprDecode.cpp:161
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
UtlBoolean mEnableG722Hack
Definition: MprDecode.h:196
void setMyDejitter(MprDejitter *newDJ, UtlBoolean ownDj)
Pair this decode resource with the dejitter resource.
Definition: MprDecode.cpp:221
The "Recorder" media processing resource.
Definition: MprRecorder.h:53
The "Decode" media processing resource.
Definition: MprDecode.h:45
uint16_t RtpSeq
RTP sequence number.
Definition: MpTypes.h:59
UtlBoolean mIsJBInitialized
Is JB initialized or not?
Definition: MprDecode.h:166
UtlBoolean handleSetPlc(const UtlString &plcName)
Change PLC algorithm to one provided.
Definition: MprDecode.cpp:904
Helper class for MprDecode - it maps payload types to decoder instances.
Definition: MpDecoderPayloadMap.h:27
static OsStatus setPlc(const UtlString &namedResource, OsMsgQ &fgQ, const UtlString &plcName="")
Change PLC algorithm to one with given name. THIS METHOD DOES NOT WORK!
Definition: MprDecode.cpp:212
struct MprDecode::StreamState mStreamState
static OsStatus selectCodecs(const UtlString &namedResource, OsMsgQ &fgQ, SdpCodec *codecs[], int numCodecs)
Provide set of codecs this decode resource will be able to decode.
Definition: MprDecode.cpp:196
Smart pointer to MpBuf.
Definition: MpBuf.h:160
OsStatus setFlowGraph(MpFlowGraphBase *pFlowGraph)
Associates this resource with the indicated flow graph.
Definition: MprDecode.cpp:682
void setStreamId(int connectionId)
Set the ID of a stream inside of the connection this resource belongs to.
Definition: MprDecode.cpp:356
UtlBoolean tryDecodeAsSignalling(const MpRtpBufPtr &rtp)
Decode RTP packet if it belongs to signaling codec.
Definition: MprDecode.cpp:634
MprDecode & operator=(const MprDecode &rhs)
Assignment operator (not implemented for this class)
Definition: MprDecode.h:53
int MpConnectionID
Flowgraph connection ID.
Definition: MpTypes.h:56
UtlBoolean handleSetVadParam(UtlSerialized &serialData)
Handle message to set VAD parameter.
Definition: MprDecode.cpp:1021
Definition: MprDecode.h:55
UtlBoolean isFirstRtpPulled
Have we got first packet from JB queue?
Definition: MprDecode.h:174
Abstract base class for Jitter Buffer Estimation (JBE) algorithms.
Definition: MpJitterBufferEstimation.h:35
OsStatus pushPacket(MpRtpBufPtr &pRtp)
Add incoming RTP packet to the decoding queue.
Definition: MprDecode.cpp:247
The "Dejitter" utility class.
Definition: MprDejitter.h:39
MprDecode(const UtlString &rName, const UtlString &plcName="")
Constructor.
Definition: MprDecode.cpp:88
#define TRUE
Definition: PlgDefsV1.h:41
Definition: MprDecode.h:52
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
MpJitterBuffer * mpJB
Pointer to JitterBuffer instance.
Definition: MprDecode.h:165
Definition: MprDecode.h:171