Improve documentation about LinphonePayloadType objects

This commit is contained in:
François Grisez 2017-04-24 11:38:31 +02:00
parent b1a30f1a43
commit 28b257a873
2 changed files with 10 additions and 0 deletions

View file

@ -196,6 +196,7 @@ LINPHONE_PUBLIC const char *linphone_call_params_get_session_name(const Linphone
* @param[in] cp The call.
* @return The selected payload type. NULL is returned if no audio payload type has been seleced
* by the call. If a payload type is returned, it must be released with linphone_payload_type_unref() after use.
* @warning The returned object is allocated as a floating reference i.e. the reference counter is initialized to 0.
**/
LINPHONE_PUBLIC LinphonePayloadType *linphone_call_params_get_used_audio_payload_type(const LinphoneCallParams *cp);
@ -204,6 +205,7 @@ LINPHONE_PUBLIC LinphonePayloadType *linphone_call_params_get_used_audio_payload
* @param[in] cp The call.
* @return The selected payload type. NULL is returned if no video payload type has been seleced
* by the call. If a payload type is returned, it must be released with linphone_payload_type_unref() after use.
* @warning The returned object is allocated as a floating reference i.e. the reference counter is initialized to 0.
**/
LINPHONE_PUBLIC LinphonePayloadType *linphone_call_params_get_used_video_payload_type(const LinphoneCallParams *cp);
@ -212,6 +214,7 @@ LINPHONE_PUBLIC LinphonePayloadType *linphone_call_params_get_used_video_payload
* @param[in] cp The call.
* @return The selected payload type. NULL is returned if no text payload type has been seleced
* by the call. If a payload type is returned, it must be released with linphone_payload_type_unref() after use.
* @warning The returned object is allocated as a floating reference i.e. the reference counter is initialized to 0.
**/
LINPHONE_PUBLIC LinphonePayloadType *linphone_call_params_get_used_text_payload_type(const LinphoneCallParams *cp);

View file

@ -1582,6 +1582,8 @@ LINPHONE_PUBLIC void linphone_core_set_dns_servers(LinphoneCore *lc, const bctbx
* @param[in] lc The core.
* @return \bctbx_list{LinphonePayloadType} A freshly allocated list of the available payload types. It must be released
* with bctbx_list_free_with_data() calling linphone_payload_type_unref() on each element.
* @warning Each element of the returned list is freshly allocated as floating reference. That means their reference counter
* is initialized to 0.
* @ingroup media_parameters
*/
LINPHONE_PUBLIC bctbx_list_t *linphone_core_get_audio_payload_types(LinphoneCore *lc);
@ -1628,6 +1630,8 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_audio_codec
* @param[in] lc The core.
* @return \bctbx_list{LinphonePayloadType} A freshly allocated list of the available payload types. It must be released
* with bctbx_list_free_with_data() calling linphone_payload_type_unref() on each element.
* @warning Each element of the returned list is freshly allocated as floating reference. That means their reference counter
* is initialized to 0.
* @ingroup media_parameters
*/
LINPHONE_PUBLIC bctbx_list_t *linphone_core_get_video_payload_types(LinphoneCore *lc);
@ -1675,6 +1679,8 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_video_codec
* @param[in] lc The core.
* @return \bctbx_list{LinphonePayloadType} A freshly allocated list of the available payload types. It must be released
* with bctbx_list_free_with_data() calling linphone_payload_type_unref() on each element.
* @warning Each element of the returned list is freshly allocated as floating reference. That means their reference counter
* is initialized to 0.
* @ingroup media_parameters
*/
LINPHONE_PUBLIC bctbx_list_t *linphone_core_get_text_payload_types(LinphoneCore *lc);
@ -1841,6 +1847,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED OrtpPayloadType *linphone_core_find_payload_
* @param channels number of channels, can be #LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
* @return Returns NULL if not found. If a #LinphonePayloadType is returned, it must be released with
* linphone_payload_type_unref() after using it.
* @warning The returned payload type is allocated as a floating reference i.e. the reference counter is initialized to 0.
*/
LINPHONE_PUBLIC LinphonePayloadType *linphone_core_get_payload_type(LinphoneCore *lc, const char *type, int rate, int channels);