summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-09-21 09:06:08 +0000
committerBenny Prijono <bennylp@teluu.com>2006-09-21 09:06:08 +0000
commit720911bf3037d52a6ba0298e540f5ab196e14bc7 (patch)
treee5048e108425bc66d430428b3d975bd7c77be4ba
parentfea1c2e2fd2629ec721f82a45046d19eddbda820 (diff)
Fixed capture device enumeration bug in DirectSound, and changed SDP generation to put the IP address instead of hostname in the SDP origin field since hostname may not be setup correctly.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@732 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjmedia/src/pjmedia/dsound.c2
-rw-r--r--pjmedia/src/pjmedia/endpoint.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/pjmedia/src/pjmedia/dsound.c b/pjmedia/src/pjmedia/dsound.c
index 0f9c49a1..cf8e1600 100644
--- a/pjmedia/src/pjmedia/dsound.c
+++ b/pjmedia/src/pjmedia/dsound.c
@@ -641,7 +641,7 @@ PJ_DEF(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory)
return PJ_RETURN_OS_ERROR(hr);
/* Enumerate sound capture devices */
- hr = DirectSoundEnumerate(&DSEnumCallback, (void*)1);
+ hr = DirectSoundCaptureEnumerate(&DSEnumCallback, (void*)1);
if (FAILED(hr))
return PJ_RETURN_OS_ERROR(hr);
diff --git a/pjmedia/src/pjmedia/endpoint.c b/pjmedia/src/pjmedia/endpoint.c
index eb9d8947..6f834ce9 100644
--- a/pjmedia/src/pjmedia/endpoint.c
+++ b/pjmedia/src/pjmedia/endpoint.c
@@ -298,7 +298,8 @@ PJ_DEF(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
sdp->origin.version = sdp->origin.id = tv.sec + 2208988800UL;
sdp->origin.net_type = STR_IN;
sdp->origin.addr_type = STR_IP4;
- sdp->origin.addr = *pj_gethostname();
+ pj_strdup2(pool, &sdp->origin.addr,
+ pj_inet_ntoa(sock_info[0].rtp_addr_name.sin_addr));
sdp->name = STR_SDP_NAME;
/* Since we only support one media stream at present, put the