?? cmctrlmpoint.c
typedef enum
{
sbeNumber = 1,
terminalNumberAssign,
terminalJoinedConference,
terminalLeftConference,
seenByAtLeastOneOther,
cancelSeenByAtLeastOneOther,
seenByAll,
cancelSeenByAll,
terminalYouAreSeeing,
requestForFloor,
withdrawChairToken,
floorRequested,
terminalYouAreSeeingInSubPictureNumber,
videoIndicateCompose
} ctrlConfIndiType;
int conferenceIndication(H245Control* ctrl, int message)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)cmiGetByControl((HCONTROL)ctrl));
HPVT hVal = ((cmElem *)hApp)->hVal;
int childId=pvtChild(hVal,message);
switch(pvtGetSyntaxIndex(hVal,childId))
{
case sbeNumber :conferenceMessage (ctrl,0,childId,h245ciSbeNumber); break;
case terminalNumberAssign :
{
int tmp;
pvtGetChildValue(hVal,childId,__h245(mcuNumber),&tmp,NULL);
ctrl->myTerminalLabel.mcuNumber=(RvUint8)tmp;
pvtGetChildValue(hVal,childId,__h245(terminalNumber),&tmp,NULL);
ctrl->myTerminalLabel.terminalNumber=(RvUint8)tmp;
}
break;
case terminalJoinedConference :conferenceMessage (ctrl,0,childId,h245ciTerminalJoinedConference); break;
case terminalLeftConference :conferenceMessage (ctrl,0,childId,h245ciTerminalLeftConference); break;
case seenByAtLeastOneOther :conferenceMessage (ctrl,0,childId,h245ciSeenByAtLeastOneOther); break;
case cancelSeenByAtLeastOneOther :conferenceMessage (ctrl,0,childId,h245ciCancelSeenByAtLeastOneOther); break;
case seenByAll :conferenceMessage (ctrl,0,childId,h245ciSeenByAll); break;
case cancelSeenByAll :conferenceMessage (ctrl,0,childId,h245ciCancelSeenByAll); break;
case terminalYouAreSeeing :conferenceMessage (ctrl,0,childId,h245ciTerminalYouAreSeeing); break;
case requestForFloor :conferenceMessage (ctrl,0,childId,h245ciRequestForFloor); break;
case withdrawChairToken :conferenceMessage (ctrl,0,childId,h245ciWithdrawChairToken); break;
case floorRequested :conferenceMessage (ctrl,0,childId,h245ciFloorRequested); break;
case terminalYouAreSeeingInSubPictureNumber :conferenceMessage (ctrl,0,childId,h245ciTerminalYouAreSeeingInSubPictureNumber); break;
case videoIndicateCompose :conferenceMessage (ctrl,0,childId,h245ciVideoIndicateCompose); break;
}
return RV_TRUE;
}
/* This enumeration is used as the CHOICE values of the ConferenceCommand
type in the H.245 ASN.1. The order of this enumeration should not be different
than that of the choices in this type and should begin from 1. */
typedef enum
{
broadcastMyLogicalChannel = 1,
cancelBroadcastMyLogicalChannel,
makeTerminalBroadcaster,
cancelMakeTerminalBroadcaster,
sendThisSource,
cancelSendThisSource,
dropConference,
substituteConferenceIDCommand
} ctrlConfCommType;
int conferenceCommand(H245Control* ctrl, int message)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)cmiGetByControl((HCONTROL)ctrl));
HPVT hVal = ((cmElem *)hApp)->hVal;
int childId=pvtChild(hVal,message);
switch(pvtGetSyntaxIndex(hVal,childId))
{
case broadcastMyLogicalChannel : conferenceMessage (ctrl,0,childId,h245ccBroadcastMyLogicalChannel); break;
case cancelBroadcastMyLogicalChannel : conferenceMessage (ctrl,0,childId,h245ccCancelBroadcastMyLogicalChannel); break;
case makeTerminalBroadcaster : conferenceMessage (ctrl,0,childId,h245ccMakeTerminalBroadcaster); break;
case cancelMakeTerminalBroadcaster : conferenceMessage (ctrl,0,childId,h245ccCancelMakeTerminalBroadcaster); break;
case sendThisSource : conferenceMessage (ctrl,0,childId,h245ccSendThisSource); break;
case cancelSendThisSource : conferenceMessage (ctrl,0,childId,h245ccCancelSendThisSource); break;
case dropConference : conferenceMessage (ctrl,0,childId,h245ccDropConference); break;
case substituteConferenceIDCommand : conferenceMessage (ctrl,0,childId,h245ccSubstituteConferenceIDCommand); break;
}
return RV_TRUE;
}
/* This enumeration is used as the CHOICE values of the MiscellaneousCommand
type in the H.245 ASN.1. The order of this enumeration should not be different
than that of the choices in this type and should begin from 1. */
typedef enum
{
equaliseDelay = 1,
zeroDelay,
multipointModeCommand,
cancelMultipointModeCommand,
videoFreezePicture,
videoFastUpdatePicture,
videoFastUpdateGOB,
videoTemporalSpatialTradeOff,
videoSendSyncEveryGOB,
videoSendSyncEveryGOBCancel,
videoFastUpdateMB,
maxH223MUXPDUsize,
encryptionUpdate,
encryptionUpdateRequest,
switchReceiveMediaOff,
switchReceiveMediaOn,
progressiveRefinementStart,
progressiveRefinementAbortOne,
progressiveRefinementAbortContinuous,
videoBadMBs,
lostPicture,
lostPartialPicture,
recoveryReferencePicture
} ctrlMiscCommType;
int miscellaneousCommand(H245Control* ctrl, int lcn, int message)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)cmiGetByControl((HCONTROL)ctrl));
HPVT hVal = ((cmElem *)hApp)->hVal;
int childId=pvtChild(hVal,message);
switch(pvtGetSyntaxIndex(hVal,childId))
{
case equaliseDelay : conferenceMessage (ctrl,lcn,childId,h245mcEqualiseDelay); break;
case zeroDelay : conferenceMessage (ctrl,lcn,childId,h245mcZeroDelay); break;
case maxH223MUXPDUsize : conferenceMessage (ctrl,lcn,childId,h245mcMaxH223MUXPDUsize); break;
case encryptionUpdate : conferenceMessage (ctrl,lcn,childId,h245mcEncryptionUpdate); break;
case encryptionUpdateRequest : conferenceMessage (ctrl,lcn,childId,h245mcEncryptionUpdateRequest); break;
case progressiveRefinementStart : conferenceMessage (ctrl,lcn,childId,h245mcProgressiveRefinementStart); break;
case progressiveRefinementAbortOne : conferenceMessage (ctrl,lcn,childId,h245mcProgressiveRefinementAbortOne); break;
case progressiveRefinementAbortContinuous : conferenceMessage (ctrl,lcn,childId,h245mcProgressiveRefinementAbortContinuous); break;
case videoBadMBs : conferenceMessage (ctrl,lcn,childId,h245mcVideoBadMBs); break;
case lostPicture : conferenceMessage (ctrl,lcn,childId,h245mcLostPicture); break;
case lostPartialPicture : conferenceMessage (ctrl,lcn,childId,h245mcLostPartialPicture); break;
case recoveryReferencePicture : conferenceMessage (ctrl,lcn,childId,h245mcRecoveryReferencePicture); break;
}
return RV_TRUE;
}
/* This enumeration is used as the CHOICE values of the indication
type in the H.245 ASN.1. The order of this enumeration should not be different
than that of the choices in this type and should begin from 1. */
typedef enum
{
nonStandard = 1,
functionNotUnderstood,
masterSlaveDeterminationRelease,
terminalCapabilitySetRelease,
openLogicalChannelConfirmInd,
requestChannelCloseReleaseInd,
multiplexEntrySendRelease,
requestMultiplexEntryRelease,
requestModeRelease,
miscellaneousIndicationInd,
jitterIndication,
h223SkewIndication,
newATMVCIndication,
userInput,
h2250MaximumSkewIndication,
mcLocationInd,
conferenceInd,
vendorIdentification,
functionNotSupported,
multilinkIndication,
logicalChannelRateRelease,
flowControlIndication
} ctrlIndiType;
int indication(H245Control* ctrl, int lcn, int message)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)cmiGetByControl((HCONTROL)ctrl));
HPVT hVal = ((cmElem *)hApp)->hVal;
int childId=pvtChild(hVal,message);
switch(pvtGetSyntaxIndex(hVal,childId))
{
case jitterIndication : conferenceMessage (ctrl,lcn,childId,h245iJitterIndication); break;
case h223SkewIndication : conferenceMessage (ctrl,lcn,childId,h245iH223SkewIndication); break;
case functionNotSupported : conferenceMessage (ctrl,lcn,childId,h245iFunctionNotSupported); break;
case flowControlIndication : conferenceMessage (ctrl,lcn,childId,h245iFlowControlIndication); break;
}
return RV_TRUE;
}
/* This enumeration is used as the CHOICE values of the miscellaneousIndication
type in the H.245 ASN.1. The order of this enumeration should not be different
than that of the choices in this type and should begin from 1. */
typedef enum
{
logicalChannelActiveInd = 1,
logicalChannelInactiveInd,
multipointConferenceInd,
cancelMultipointConferenceInd,
multipointZeroComm,
cancelMultipointZeroComm,
multipointSecondaryStatus,
cancelMultipointSecondaryStatus,
videoIndicateReadyToActivate,
videoTemporalSpatialTradeOffInd,
videoNotDecodedMBs,
transportCapability
} ctrlMiscIndiType;
int miscellaneousIndication(H245Control* ctrl, int lcn, int message)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)cmiGetByControl((HCONTROL)ctrl));
HPVT hVal = ((cmElem *)hApp)->hVal;
int childId=pvtChild(hVal,message);
switch(pvtGetSyntaxIndex(hVal,childId))
{
case multipointZeroComm : conferenceMessage (ctrl,lcn,childId,h245miMultipointZeroComm); break;
case cancelMultipointZeroComm : conferenceMessage (ctrl,lcn,childId,h245miCancelMultipointZeroComm); break;
case multipointSecondaryStatus : conferenceMessage (ctrl,lcn,childId,h245miMultipointSecondaryStatus); break;
case cancelMultipointSecondaryStatus : conferenceMessage (ctrl,lcn,childId,h245miCancelMultipointSecondaryStatus); break;
case videoIndicateReadyToActivate : conferenceMessage (ctrl,lcn,childId,h245miVideoIndicateReadyToActivate); break;
case videoNotDecodedMBs : conferenceMessage (ctrl,lcn,childId,h245miVideoNotDecodedMBs); break;
}
return RV_TRUE;
}
RVAPI int RVCALLCONV
cmCallSetTerminalLabel(
/* Set the remote endpoint terminal label. */
IN HCALL hsCall,
IN cmTerminalLabel* terminalLabel
)
{
HAPP hApp=(HAPP)emaGetInstance((EMAElement)hsCall);
HPVT hVal = ((cmElem *)hApp)->hVal;
H245Control* ctrl=(H245Control*)cmiGetControl(hsCall);
int ret=0;
int nodeId,message, res = RV_ERROR_UNKNOWN;
int iMCU, iTerminal;
if (!hsCall || !hApp) return RV_ERROR_UNKNOWN;
if (!terminalLabel) return RV_ERROR_UNKNOWN;
if (terminalLabel->mcuNumber>192) return RV_ERROR_UNKNOWN;
if (terminalLabel->terminalNumber>192) return RV_ERROR_UNKNOWN;
cmiAPIEnter(hApp, "cmCallSetTerminalLabel: hsCall=0x%p label=(%d, %d)",
hsCall, terminalLabel->mcuNumber, terminalLabel->terminalNumber);
if (emaLock((EMAElement)hsCall))
{
if (cmCallMasterSlaveStatus(hsCall) == cmMSMaster)
{
/* master only operation */
message=pvtAddRoot(hVal,((cmElem*)hApp)->synProtH245,0,NULL);
__pvtBuildByFieldIds(nodeId,hVal,message, {_h245(indication) _h245(conferenceIndication)
_h245(terminalNumberAssign) LAST_TOKEN}, 0, NULL);
iMCU = terminalLabel->mcuNumber;
iTerminal = terminalLabel->terminalNumber;
pvtAdd(hVal,nodeId,__h245(mcuNumber),iMCU,NULL,NULL);
pvtAdd(hVal,nodeId,__h245(terminalNumber),iTerminal,NULL,NULL);
res = sendMessageH245((HCONTROL)ctrl, message);
pvtDelete(hVal,message);
}
else
res = RV_ERROR_UNKNOWN;
emaUnlock((EMAElement)hsCall);
}
cmiAPIExit(hApp, "cmCallSetTerminalLabel: [%d]", ret);
return ret;
}
RVAPI int RVCALLCONV /* RV_ERROR_UNKNOWN if terminal label is not defined for this terminal */
cmCallGetTerminalLabel(
/* Get the local endpoint terminal label. */
IN HCALL hsCall,
OUT cmTerminalLabel* terminalLabel /* user allocated */
)
{
int ret=0;
HAPP hApp=(HAPP)emaGetInstance((EMAElement)hsCall);
H245Control* ctrl=(H245Control*)cmiGetControl(hsCall);
if (!hsCall || !hApp) return RV_ERROR_UNKNOWN;
if (!terminalLabel) return RV_ERROR_UNKNOWN;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -