diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2012-01-11 05:30:55 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2012-01-11 05:30:55 +0000 |
commit | d3d6518fe7176c4312394686275e11788200fbc1 (patch) | |
tree | e78d956251d8b5c86abd99b75a9111878ea1052a /pjsip/src/pjsua-lib | |
parent | 1df9ab045079e5c39c882b4b4c22356781695343 (diff) |
Fix #1444: always connect video capture port to video tee, even when the capture port has native preview, as a capture port can be used simultaneously by multiple streams (not only used by non-native preview renderer).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3940 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_vid.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_vid.c b/pjsip/src/pjsua-lib/pjsua_vid.c index bff1fa87..61ea052d 100644 --- a/pjsip/src/pjsua-lib/pjsua_vid.c +++ b/pjsip/src/pjsua-lib/pjsua_vid.c @@ -538,6 +538,11 @@ static pj_status_t create_vid_win(pjsua_vid_win_type type, if (status != PJ_SUCCESS) goto on_error; + /* Connect capturer to the video tee */ + status = pjmedia_vid_port_connect(w->vp_cap, w->tee, PJ_FALSE); + if (status != PJ_SUCCESS) + goto on_error; + /* If device supports native preview, enable it */ if (w->is_native) { pjmedia_vid_dev_stream *cap_dev; @@ -580,10 +585,6 @@ static pj_status_t create_vid_win(pjsua_vid_win_type type, if (w->type == PJSUA_WND_TYPE_PREVIEW) { pjmedia_port *rend_port; - status = pjmedia_vid_port_connect(w->vp_cap, w->tee, PJ_FALSE); - if (status != PJ_SUCCESS) - goto on_error; - rend_port = pjmedia_vid_port_get_passive_port(w->vp_rend); status = pjmedia_vid_tee_add_dst_port2(w->tee, 0, rend_port); if (status != PJ_SUCCESS) |