Ignore:
Timestamp:
Mar 22, 2011 9:49:23 AM (11 years ago)
Author:
nanang
Message:

Re #1201: Added pjsua API for video devices and codecs management.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjsip/include/pjsua-lib/pjsua.h

    r3463 r3471  
    49354935 
    49364936/***************************************************************************** 
     4937 * Video devices. 
     4938 */ 
     4939 
     4940/** 
     4941 * Enum all video devices installed in the system. 
     4942 * 
     4943 * @param info          Array of info to be initialized. 
     4944 * @param count         On input, specifies max elements in the array. 
     4945 *                      On return, it contains actual number of elements 
     4946 *                      that have been initialized. 
     4947 * 
     4948 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     4949 */ 
     4950PJ_DECL(pj_status_t) pjsua_vid_enum_devs(pjmedia_vid_dev_info info[], 
     4951                                         unsigned *count); 
     4952 
     4953 
     4954/** 
     4955 * Get currently active video devices. If video devices has not been created 
     4956 * (for example when pjsua_start() is not called), it is possible that 
     4957 * the function returns PJ_SUCCESS with -1 as device IDs. 
     4958 * 
     4959 * @param capture_dev   On return it will be filled with device ID of the  
     4960 *                      capture device. 
     4961 * @param render_dev    On return it will be filled with device ID of the  
     4962 *                      device ID of the render device. 
     4963 * 
     4964 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     4965 */ 
     4966PJ_DECL(pj_status_t) pjsua_vid_get_dev(int *capture_dev, int *render_dev); 
     4967 
     4968 
     4969/** 
     4970 * Select video device for the next video sessions. 
     4971 * 
     4972 * @param capture_dev   Device ID of the capture device. 
     4973 * @param render_dev    Device ID of the render device. 
     4974 * 
     4975 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     4976 */ 
     4977PJ_DECL(pj_status_t) pjsua_vid_set_dev(int capture_dev, int render_dev); 
     4978 
     4979 
     4980/** 
     4981 * Configure video device setting to the video device being used. If video  
     4982 * device is currently active, the function will forward the setting to the 
     4983 * video device instance to be applied immediately, if it supports it.  
     4984 * 
     4985 * The setting will be saved for future opening of the video device, if the  
     4986 * "keep" argument is set to non-zero. If the video device is currently 
     4987 * inactive, and the "keep" argument is false, this function will return 
     4988 * error. 
     4989 *  
     4990 * Note that in case the setting is kept for future use, it will be applied 
     4991 * to any devices, even when application has changed the video device to be 
     4992 * used. 
     4993 * 
     4994 * See also #pjmedia_vid_dev_stream_set_cap() for more information about 
     4995 * setting an video device capability. 
     4996 * 
     4997 * @param cap           The video device setting to change. 
     4998 * @param pval          Pointer to value. Please see #pjmedia_vid_dev_cap 
     4999 *                      documentation about the type of value to be  
     5000 *                      supplied for each setting. 
     5001 * @param keep          Specify whether the setting is to be kept for future 
     5002 *                      use. 
     5003 * 
     5004 * @return              PJ_SUCCESS on success or the appropriate error code. 
     5005 */ 
     5006PJ_DECL(pj_status_t) pjsua_vid_set_setting(pjmedia_vid_dev_cap cap, 
     5007                                           const void *pval, 
     5008                                           pj_bool_t keep); 
     5009 
     5010/** 
     5011 * Retrieve a video device setting. If video device is currently active, 
     5012 * the function will forward the request to the video device. If video device 
     5013 * is currently inactive, and if application had previously set the setting 
     5014 * and mark the setting as kept, then that setting will be returned. 
     5015 * Otherwise, this function will return error. 
     5016 * 
     5017 * @param cap           The video device setting to retrieve. 
     5018 * @param pval          Pointer to receive the value.  
     5019 *                      Please see #pjmedia_vid_dev_cap documentation about 
     5020 *                      the type of value to be supplied for each setting. 
     5021 * 
     5022 * @return              PJ_SUCCESS on success or the appropriate error code. 
     5023 */ 
     5024PJ_DECL(pj_status_t) pjsua_vid_get_setting(pjmedia_vid_dev_cap cap, 
     5025                                           void *pval); 
     5026 
     5027 
     5028/***************************************************************************** 
    49375029 * Codecs. 
    49385030 */ 
     
    49905082PJ_DECL(pj_status_t) pjsua_codec_set_param( const pj_str_t *codec_id, 
    49915083                                            const pjmedia_codec_param *param); 
     5084 
     5085/***************************************************************************** 
     5086 * Video codecs. 
     5087 */ 
     5088 
     5089/** 
     5090 * Enum all supported video codecs in the system. 
     5091 * 
     5092 * @param id            Array of ID to be initialized. 
     5093 * @param count         On input, specifies max elements in the array. 
     5094 *                      On return, it contains actual number of elements 
     5095 *                      that have been initialized. 
     5096 * 
     5097 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     5098 */ 
     5099PJ_DECL(pj_status_t) pjsua_vid_enum_codecs( pjsua_codec_info id[], 
     5100                                            unsigned *count ); 
     5101 
     5102 
     5103/** 
     5104 * Change video codec priority. 
     5105 * 
     5106 * @param codec_id      Codec ID, which is a string that uniquely identify 
     5107 *                      the codec (such as "H263/90000"). Please see pjsua 
     5108 *                      manual or pjmedia codec reference for details. 
     5109 * @param priority      Codec priority, 0-255, where zero means to disable 
     5110 *                      the codec. 
     5111 * 
     5112 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     5113 */ 
     5114PJ_DECL(pj_status_t) pjsua_vid_codec_set_priority( const pj_str_t *codec_id, 
     5115                                                   pj_uint8_t priority ); 
     5116 
     5117 
     5118/** 
     5119 * Get video codec parameters. 
     5120 * 
     5121 * @param codec_id      Codec ID. 
     5122 * @param param         Structure to receive video codec parameters. 
     5123 * 
     5124 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     5125 */ 
     5126PJ_DECL(pj_status_t) pjsua_vid_codec_get_param( 
     5127                                        const pj_str_t *codec_id, 
     5128                                        pjmedia_vid_codec_param *param); 
     5129 
     5130 
     5131/** 
     5132 * Set video codec parameters. 
     5133 * 
     5134 * @param codec_id      Codec ID. 
     5135 * @param param         Codec parameter to set. Set to NULL to reset 
     5136 *                      codec parameter to library default settings. 
     5137 * 
     5138 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     5139 */ 
     5140PJ_DECL(pj_status_t) pjsua_vid_codec_set_param(  
     5141                                        const pj_str_t *codec_id, 
     5142                                        const pjmedia_vid_codec_param *param); 
     5143 
    49925144 
    49935145#if DISABLED_FOR_TICKET_1185 
Note: See TracChangeset for help on using the changeset viewer.