Exemple #1
0
// Sends an MPRM_START_TONE message to the named MprToneGen resource.
// When received, the resource starts generating the toneId tone.
// Returns the result of attempting to queue the message to this resource.
OsStatus MprToneGen::startTone(const UtlString& namedResource,
                               OsMsgQ& fgQ,
                               int toneId)
{
   MpToneResourceMsg msg(namedResource, toneId);
   return fgQ.send(msg, sOperationQueueTimeout);
}
OsStatus MpRtpInputConnection::setRtpInactivityTimeout(const UtlString& namedResource,
                                                       OsMsgQ& fgQ,
                                                       int timeoutMs)
{
   MpIntResourceMsg msg((MpResourceMsg::MpResourceMsgType)MPRM_SET_INACTIVITY_TIMEOUT,
                        namedResource, timeoutMs);
   return fgQ.send(msg, sOperationQueueTimeout);
}
OsStatus MpRtpInputConnection::enableSsrcDiscard(const UtlString& namedResource,
                                                 OsMsgQ& fgQ,
                                                 UtlBoolean enable, RtpSRC ssrc)
{
   MpIntResourceMsg msg(enable?(MpResourceMsg::MpResourceMsgType)MPRM_ENABLE_SSRC_DISCARD
                              :(MpResourceMsg::MpResourceMsgType)MPRM_DISABLE_SSRC_DISCARD,
                        namedResource, ssrc);
   return fgQ.send(msg, sOperationQueueTimeout);
}
Exemple #4
0
OsStatus MpResource::setNotificationsEnabled(UtlBoolean enable,
                                             const UtlString& namedResource, 
                                             OsMsgQ& fgQ)
{
   MpResourceMsg msg(enable?MpResourceMsg::MPRM_ENABLE_ALL_NOTIFICATIONS
                           :MpResourceMsg::MPRM_DISABLE_ALL_NOTIFICATIONS,
                     namedResource);

   return fgQ.send(msg, sOperationQueueTimeout);
}
OsStatus MpRtpInputAudioConnection::stopReceiveRtp(OsMsgQ& messageQueue,
                                                   const UtlString& resourceName)
{
    MpResourceMsg stopReceiveMsg(MpResourceMsg::MPRM_STOP_RECEIVE_RTP, 
                                 resourceName);

    // Send the message in the queue.
    OsStatus result = messageQueue.send(stopReceiveMsg);
    return(result);
}
Exemple #6
0
OsStatus MprBridge::setMixWeightsForInput(const UtlString& namedResource, 
                                          OsMsgQ& fgQ, 
                                          int bridgeInputPort,
                                          int numWeights,
                                          const MpBridgeGain gains[])
{
   MprBridgeSetGainsMsg msg(namedResource, bridgeInputPort, numWeights,
                            gains,
                            MprBridgeSetGainsMsg::GAINS_COLUMN);
   return fgQ.send(msg, sOperationQueueTimeout);
}
OsStatus MpRtpInputAudioConnection::startReceiveRtp(OsMsgQ& messageQueue,
                                                    const UtlString& resourceName,
                                                    const SdpCodecList& sdpCodecList,
                                                    OsSocket& rRtpSocket,
                                                    OsSocket& rRtcpSocket)
{
    OsStatus result = OS_INVALID_ARGUMENT;
    if(sdpCodecList.getCodecCount() > 0)
    {
        // Create a message to contain the startRecieveRtp data
        MprRtpStartReceiveMsg msg(resourceName,
                                  sdpCodecList,
                                  rRtpSocket,
                                  rRtcpSocket);

        // Send the message in the queue.
        result = messageQueue.send(msg);
    }
    return(result);
}
Exemple #8
0
// Sends an MPRM_STOP_TONE message to the named MprToneGen resource.
// When received, the resource stops generating a tone.
// Returns the result of attempting to queue the message to this resource.
OsStatus MprToneGen::stopTone(const UtlString& namedResource,
                              OsMsgQ& fgQ)
{
   MpResourceMsg msg(MpResourceMsg::MPRM_STOP_TONE, namedResource);
   return fgQ.send(msg, sOperationQueueTimeout);
}
Exemple #9
0
OsStatus MpResource::enable(const UtlString& namedResource,
                            OsMsgQ& fgQ)
{
   MpResourceMsg msg(MpResourceMsg::MPRM_RESOURCE_ENABLE, namedResource);
   return fgQ.send(msg, sOperationQueueTimeout);
}
Exemple #10
0
UtlBoolean MprDelay::stopPlay(const UtlString& namedResource, 
                              OsMsgQ& fgQ)
{
   MpResourceMsg msg((MpResourceMsg::MpResourceMsgType)MPRM_DELAY_STOP_PLAY, namedResource);
   return fgQ.send(msg);
}