1 /* 2 video_definition.h 3 Copyright (C) 2010-2017 Belledonne Communications SARL 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 2 8 of the License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef LINPHONE_VIDEO_DEFINITION_H_ 21 #define LINPHONE_VIDEO_DEFINITION_H_ 22 23 24 #include "linphone/types.h" 25 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 32 /** 33 * @addtogroup media_parameters 34 * @{ 35 */ 36 37 /** 38 * Acquire a reference to the video definition. 39 * @param[in] vdef LinphoneVideoDefinition object. 40 * @return The same LinphoneVideoDefinition object. 41 **/ 42 LINPHONE_PUBLIC LinphoneVideoDefinition * linphone_video_definition_ref(LinphoneVideoDefinition *vdef); 43 44 /** 45 * Release reference to the video definition. 46 * @param[in] vdef LinphoneVideoDefinition object. 47 **/ 48 LINPHONE_PUBLIC void linphone_video_definition_unref(LinphoneVideoDefinition *vdef); 49 50 /** 51 * Retrieve the user pointer associated with the video definition. 52 * @param[in] vdef LinphoneVideoDefinition object. 53 * @return The user pointer associated with the video definition. 54 **/ 55 LINPHONE_PUBLIC void *linphone_video_definition_get_user_data(const LinphoneVideoDefinition *vdef); 56 57 /** 58 * Assign a user pointer to the video definition. 59 * @param[in] vdef LinphoneVideoDefinition object. 60 * @param[in] ud The user pointer to associate with the video definition. 61 **/ 62 LINPHONE_PUBLIC void linphone_video_definition_set_user_data(LinphoneVideoDefinition *vdef, void *ud); 63 64 /** 65 * Clone a video definition. 66 * @param[in] vdef LinphoneVideoDefinition object to be cloned 67 * @return The new clone of the video definition 68 */ 69 LINPHONE_PUBLIC LinphoneVideoDefinition * linphone_video_definition_clone(const LinphoneVideoDefinition *vdef); 70 71 /** 72 * Get the width of the video definition. 73 * @param[in] vdef LinphoneVideoDefinition object 74 * @return The width of the video definition 75 */ 76 LINPHONE_PUBLIC unsigned int linphone_video_definition_get_width(const LinphoneVideoDefinition *vdef); 77 78 /** 79 * Set the width of the video definition. 80 * @param[in] vdef LinphoneVideoDefinition object 81 * @param[in] width The width of the video definition 82 */ 83 LINPHONE_PUBLIC void linphone_video_definition_set_width(LinphoneVideoDefinition *vdef, unsigned int width); 84 85 /** 86 * Get the height of the video definition. 87 * @param[in] vdef LinphoneVideoDefinition object 88 * @return The height of the video definition 89 */ 90 LINPHONE_PUBLIC unsigned int linphone_video_definition_get_height(const LinphoneVideoDefinition *vdef); 91 92 /** 93 * Set the height of the video definition. 94 * @param[in] vdef LinphoneVideoDefinition object 95 * @param[in] height The height of the video definition 96 */ 97 LINPHONE_PUBLIC void linphone_video_definition_set_height(LinphoneVideoDefinition *vdef, unsigned int height); 98 99 /** 100 * Set the width and the height of the video definition. 101 * @param[in] vdef LinphoneVideoDefinition object 102 * @param[in] width The width of the video definition 103 * @param[in] height The height of the video definition 104 */ 105 LINPHONE_PUBLIC void linphone_video_definition_set_definition(LinphoneVideoDefinition *vdef, unsigned int width, unsigned int height); 106 107 /** 108 * Get the name of the video definition. 109 * @param[in] vdef LinphoneVideoDefinition object 110 * @return The name of the video definition 111 */ 112 LINPHONE_PUBLIC const char * linphone_video_definition_get_name(const LinphoneVideoDefinition *vdef); 113 114 /** 115 * Set the name of the video definition. 116 * @param[in] vdef LinphoneVideoDefinition object 117 * @param[in] name The name of the video definition 118 */ 119 LINPHONE_PUBLIC void linphone_video_definition_set_name(LinphoneVideoDefinition *vdef, const char *name); 120 121 /** 122 * Tells whether two LinphoneVideoDefinition objects are equal (the widths and the heights are the same but can be switched). 123 * @param[in] vdef1 LinphoneVideoDefinition object 124 * @param[in] vdef2 LinphoneVideoDefinition object 125 * @return A boolean value telling whether the two LinphoneVideoDefinition objects are equal. 126 */ 127 LINPHONE_PUBLIC bool_t linphone_video_definition_equals(const LinphoneVideoDefinition *vdef1, const LinphoneVideoDefinition *vdef2); 128 129 /** 130 * Tells whether two LinphoneVideoDefinition objects are strictly equal (the widths are the same and the heights are the same). 131 * @param[in] vdef1 LinphoneVideoDefinition object 132 * @param[in] vdef2 LinphoneVideoDefinition object 133 * @return A boolean value telling whether the two LinphoneVideoDefinition objects are strictly equal. 134 */ 135 LINPHONE_PUBLIC bool_t linphone_video_definition_strict_equals(const LinphoneVideoDefinition *vdef1, const LinphoneVideoDefinition *vdef2); 136 137 /** 138 * Tells whether a LinphoneVideoDefinition is undefined. 139 * @param[in] vdef LinphoneVideoDefinition object 140 * @return A boolean value telling whether the LinphoneVideoDefinition is undefined. 141 */ 142 LINPHONE_PUBLIC bool_t linphone_video_definition_is_undefined(const LinphoneVideoDefinition *vdef); 143 144 /** 145 * @} 146 */ 147 148 149 #ifdef __cplusplus 150 } 151 #endif 152 153 #endif /* LINPHONE_VIDEO_DEFINITION_H_ */ 154