Hi there,
It looks like your app does not set all necessary fields in the MEDIAINFO. Consider the following generic code:
IPM_MEDIA_INFO mi;
int i = 0;
// audio
mi.MediaData.eMediaType = MEDIATYPE_REMOTE_RTP_INFO; // Remote RTP and RTCP info must be set in any case
mi.MediaData.mediaInfo.PortInfo.unPortId = m_remotePortInfo.unPortId;
strcpy(mi.MediaData.mediaInfo.PortInfo.cIPAddress, m_remotePortInfo.cIPAddress);
i++;
mi.MediaData.eMediaType = MEDIATYPE_REMOTE_RTCP_INFO;
mi.MediaData.mediaInfo.PortInfo.unPortId = m_remotePortInfo.unPortId + 1;
strcpy(mi.MediaData[1].mediaInfo.PortInfo.cIPAddress, m_remotePortInfo.cIPAddress);
i++;
if(a_direction == DATA_IP_SENDONLY || a_direction == DATA_IP_TDM_BIDIRECTIONAL) //this is your case - send only. Setting only remote coder
{
// remote port and caps must be set
mi.MediaData.eMediaType = MEDIATYPE_REMOTE_CODER_INFO;
mi.MediaData.mediaInfo.CoderInfo = m_remoteCoderInfo; // detalize your coder info here as in your code above
i++;
}
if(a_direction == DATA_IP_RECEIVEONLY || a_direction == DATA_IP_TDM_BIDIRECTIONAL) // skip this for send-only
{
// local capabilities must be set
mi.MediaData.eMediaType = MEDIATYPE_LOCAL_CODER_INFO;
mi.MediaData.mediaInfo.CoderInfo = m_remoteCoderInfo;
i++;
}
mi.unCount = i; // as you see, in your case the unCount = 3
if(ipm_StartMedia(m_hDevHandle, &mi, a_direction, EV_ASYNC) == -1)
{
// process error here
}
else
//process SUCCESS;
This should work. Please let me know otherwise.