diff options
-rw-r--r-- | pjmedia/include/pjmedia-videodev/videodev.h | 5 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/vid_port.h | 12 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/vid_port.c | 3 |
3 files changed, 15 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia-videodev/videodev.h b/pjmedia/include/pjmedia-videodev/videodev.h index 235d2a3e..9238e0e3 100644 --- a/pjmedia/include/pjmedia-videodev/videodev.h +++ b/pjmedia/include/pjmedia-videodev/videodev.h @@ -676,7 +676,10 @@ pjmedia_vid_dev_default_param(pj_pool_t *pool, * if the device ID in the \a param specifies default device, it may be * replaced with the actual device ID upon return. * - * @param param Sound device parameters to be used for the stream. + * @param param On input, it specifies the video device parameters + * to be used for the stream. On output, this will be + * set to the actual video device parameters used to + * open the stream. * @param cb Pointer to structure containing video stream * callbacks. * @param user_data Arbitrary user data, which will be given back in the diff --git a/pjmedia/include/pjmedia/vid_port.h b/pjmedia/include/pjmedia/vid_port.h index 3de28346..0d5e3d84 100644 --- a/pjmedia/include/pjmedia/vid_port.h +++ b/pjmedia/include/pjmedia/vid_port.h @@ -78,17 +78,23 @@ typedef struct pjmedia_vid_port pjmedia_vid_port; PJ_DECL(void) pjmedia_vid_port_param_default(pjmedia_vid_port_param *prm); /** - * Create a video port with the specified parameter. + * Create a video port with the specified parameter. Video port may open + * the video stream with different parameter than the requested values in + * the \a prm.vidparam argument. Application can check the the values in + * the \a prm.vidparam argument to see if they have changed. * * @param pool Pool to allocate memory from. - * @param prm The video port parameter. + * @param prm On input, it specifies the video port parameters + * to be used. On output, prm.vidparam will be set to + * the actual video device parameters used to open the + * stream. * @param p_vp Pointer to receive the result. * * @return PJ_SUCCESS if video port has been created * successfully, or the appropriate error code. */ PJ_DECL(pj_status_t) pjmedia_vid_port_create(pj_pool_t *pool, - const pjmedia_vid_port_param *prm, + pjmedia_vid_port_param *prm, pjmedia_vid_port **p_vp); /** diff --git a/pjmedia/src/pjmedia/vid_port.c b/pjmedia/src/pjmedia/vid_port.c index 6eee6a7c..304d2b02 100644 --- a/pjmedia/src/pjmedia/vid_port.c +++ b/pjmedia/src/pjmedia/vid_port.c @@ -184,7 +184,7 @@ static pj_status_t create_converter(pjmedia_vid_port *vp) } PJ_DEF(pj_status_t) pjmedia_vid_port_create( pj_pool_t *pool, - const pjmedia_vid_port_param *prm, + pjmedia_vid_port_param *prm, pjmedia_vid_port **p_vid_port) { pjmedia_vid_port *vp; @@ -365,6 +365,7 @@ PJ_DEF(pj_status_t) pjmedia_vid_port_create( pj_pool_t *pool, goto on_error; } + prm->vidparam = vparam; *p_vid_port = vp; return PJ_SUCCESS; |