static void handleUnmuteVideoForFirstConnectedCall (CallControlManagerPtr ccmPtr) { //If there is more than 1 call with a mix of audio/video calls //the we may need to look at the cc_sdp_direction_t to figure out //which CONNECTED call is actually a video call and is sending video CC_CallPtr call = getFirstCallInGivenState(ccmPtr, CONNECTED); if (call != NULL) { CSFLogDebugS(logTag, "Unmuting (video) 1st connected call..."); if (!call->unmuteVideo()) { CSFLogDebugS(logTag, "Attempt to unmute (video) failed."); } CC_CallInfoPtr info = call->getCallInfo(); if (info->isVideoMuted()) { CSFLogDebugS(logTag, "UNMUTE FAILED TO BE REFLECTED IN CALL INFO."); } } else { CSFLogDebugS(logTag, "No calls exist that can be unmuted (video)."); } }
void printCallSummary(CC_DevicePtr devicePtr) { if (devicePtr == NULL) { return; } CC_DeviceInfoPtr deviceInfoPtr = devicePtr->getDeviceInfo(); if (deviceInfoPtr == NULL) { return; } vector<CC_CallPtr> calls = deviceInfoPtr->getCalls(); CSFLogDebugS(logTag, " List of all calls "); for (vector<CC_CallPtr>::iterator it = calls.begin(); it != calls.end(); it++) { CC_CallPtr call = *it; if (call==NULL) { continue; } CC_CallInfoPtr callInfoPtr = call->getCallInfo(); if (callInfoPtr==NULL) { continue; } bool audioMute = callInfoPtr->isAudioMuted(); bool videoMute = callInfoPtr->isVideoMuted(); PRINT_OFFSET_1; PRINT_EVENT_INFO_NICELY_USING_GETNAME("CallState", callInfoPtr, getCallState, call_state_getname); PRINT_OFFSET_1; PRINT_EVENT_INFO_NICELY_USING_GETNAME("CallType", callInfoPtr, getCallType, call_type_getname); PRINT_OFFSET_1; PRINT_EVENT_INFO_NICELY_USING_GETNAME("VideoDirection", callInfoPtr, getVideoDirection, sdp_direction_getname); PRINT_OFFSET_1; CSFLogDebugS(logTag, "(AudioMute "); CSFLogDebugS(logTag, "----------"); CSFLogDebug(logTag, " %s )", (audioMute) ? "true" : "false"); PRINT_OFFSET_1; CSFLogDebugS(logTag, "(VideoMute "); CSFLogDebugS(logTag, "----------"); CSFLogDebug(logTag, " %s )", (videoMute) ? "true" : "false"); PRINT_OFFSET_1; printCallPartiesInfo(callInfoPtr); PRINT_OFFSET_1; CSFLogDebugS(logTag, "(CallCaps "); CSFLogDebugS(logTag, "----------"); printCallCapabilities(callInfoPtr, WRAPPED_LINE_ALIGNMENT_OFFSET_2); }//end for (calls) CSFLogDebugS(logTag, "End of List"); }