예제 #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);
}
예제 #2
0
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);
}
예제 #3
0
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);
}
예제 #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);
}
예제 #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);
}
예제 #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);
}
예제 #9
0
OsStatus MpResource::enable(const UtlString& namedResource,
                            OsMsgQ& fgQ)
{
   MpResourceMsg msg(MpResourceMsg::MPRM_RESOURCE_ENABLE, namedResource);
   return fgQ.send(msg, sOperationQueueTimeout);
}
예제 #10
0
UtlBoolean MprDelay::stopPlay(const UtlString& namedResource, 
                              OsMsgQ& fgQ)
{
   MpResourceMsg msg((MpResourceMsg::MpResourceMsgType)MPRM_DELAY_STOP_PLAY, namedResource);
   return fgQ.send(msg);
}