Quantcast
Channel: Dialogic PowerMedia HMP GlobalCall and R4 API - Recent Threads
Viewing all articles
Browse latest Browse all 1151

RE: Streaming audio-only conference call to web

$
0
0

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.MediaDataIdea.eMediaType = MEDIATYPE_REMOTE_RTP_INFO;    // Remote RTP and RTCP info must be set in any case
    mi.MediaDataIdea.mediaInfo.PortInfo.unPortId = m_remotePortInfo.unPortId;
    strcpy(mi.MediaDataIdea.mediaInfo.PortInfo.cIPAddress, m_remotePortInfo.cIPAddress);
    i++;
    mi.MediaDataIdea.eMediaType = MEDIATYPE_REMOTE_RTCP_INFO;
    mi.MediaDataIdea.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.MediaDataIdea.eMediaType = MEDIATYPE_REMOTE_CODER_INFO;
        mi.MediaDataIdea.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.MediaDataIdea.eMediaType = MEDIATYPE_LOCAL_CODER_INFO;
        mi.MediaDataIdea.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.


Viewing all articles
Browse latest Browse all 1151

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>