FS-4027 - improve adherence to code conventions
This commit is contained in:
parent
655325ab05
commit
af9a18c63c
|
@ -256,7 +256,7 @@ struct PACKED data_message {
|
|||
#define DEVICE_TO_USER_DATA_RESPONSE_MESSAGE 0x002F
|
||||
/* See struct PACKED data_message */
|
||||
|
||||
#define DEVICE_UPDATECAPABILITIES 0x0030
|
||||
#define UPDATE_CAPABILITIES_MESSAGE 0x0030
|
||||
|
||||
#define MAX_CUSTOM_PICTURES 6
|
||||
#define MAX_LAYOUT_WITH_SAME_SERVICE 5
|
||||
|
@ -270,12 +270,12 @@ struct PACKED data_message {
|
|||
* \brief Picture Format Structure
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t customPictureFormatWidth; /*!< Picture Width */
|
||||
uint32_t customPictureFormatHeight; /*!< Picture Height */
|
||||
uint32_t customPictureFormatpixelAspectRatio; /*!< Picture Pixel Aspect Ratio */
|
||||
uint32_t customPictureFormatpixelclockConversionCode; /*!< Picture Pixel Conversion Code */
|
||||
uint32_t customPictureFormatpixelclockDivisor; /*!< Picture Pixel Divisor */
|
||||
} customPictureFormat_t;
|
||||
uint32_t custom_picture_format_width; /*!< Picture Width */
|
||||
uint32_t custom_picture_format_height; /*!< Picture Height */
|
||||
uint32_t custom_picture_format_pixelAspectRatio; /*!< Picture Pixel Aspect Ratio */
|
||||
uint32_t custom_picture_format_pixelclockConversionCode; /*!< Picture Pixel Conversion Code */
|
||||
uint32_t custom_picture_format_pixelclockDivisor; /*!< Picture Pixel Divisor */
|
||||
} custom_picture_format_t;
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -317,22 +317,22 @@ typedef struct {
|
|||
* \brief Audio Capabilities Structure
|
||||
*/
|
||||
typedef struct {
|
||||
skinny_codecs lel_payloadCapability; /*!< PayLoad Capability */
|
||||
uint32_t lel_maxFramesPerPacket; /*!< Maximum Number of Frames per IP Packet */
|
||||
uint32_t lel_unknown[2]; /*!< this are related to G.723 */
|
||||
skinny_codecs payload_capability; /*!< PayLoad Capability */
|
||||
uint32_t maxFramesPerPacket; /*!< Maximum Number of Frames per IP Packet */
|
||||
uint32_t unknown[2]; /*!< this are related to G.723 */
|
||||
} audioCap_t;
|
||||
|
||||
/*!
|
||||
* \brief Video Capabilities Structure
|
||||
*/
|
||||
typedef struct {
|
||||
skinny_codecs lel_payloadCapability; /*!< PayLoad Capability */
|
||||
uint32_t lel_transmitOreceive; /*!< Transmit of Receive */
|
||||
uint32_t lel_levelPreferenceCount; /*!< Level of Preference Count */
|
||||
skinny_codecs payload_capability; /*!< PayLoad Capability */
|
||||
uint32_t transmitOreceive; /*!< Transmit of Receive */
|
||||
uint32_t levelPreferenceCount; /*!< Level of Preference Count */
|
||||
|
||||
levelPreference_t levelPreference[MAX_LEVEL_PREFERENCE]; /*!< Level Preference */
|
||||
|
||||
// uint32_t lel_codec_options[2]; /*!< Codec Options */
|
||||
// uint32_t codec_options[2]; /*!< Codec Options */
|
||||
|
||||
union {
|
||||
struct {
|
||||
|
@ -350,16 +350,16 @@ typedef struct {
|
|||
*
|
||||
* Here is a list of known parameters per codec
|
||||
// H.261
|
||||
uint32_t lel_temporalSpatialTradeOffCapability;
|
||||
uint32_t lel_stillImageTransmission;
|
||||
uint32_t temporalSpatialTradeOffCapability;
|
||||
uint32_t stillImageTransmission;
|
||||
|
||||
// H.263
|
||||
uint32_t lel_h263_capability_bitfield;
|
||||
uint32_t lel_annexNandWFutureUse;
|
||||
uint32_t h263_capability_bitfield;
|
||||
uint32_t annexNandWFutureUse;
|
||||
|
||||
// Video
|
||||
uint32_t lel_modelNumber;
|
||||
uint32_t lel_bandwidth;
|
||||
uint32_t modelNumber;
|
||||
uint32_t bandwidth;
|
||||
*/
|
||||
} videoCap_t; /*!< Video Capabilities Structure */
|
||||
|
||||
|
@ -367,7 +367,7 @@ typedef struct {
|
|||
* \brief Data Capabilities Structure
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t payloadCapability; /*!< Payload Capability */
|
||||
uint32_t payload_capability; /*!< Payload Capability */
|
||||
uint32_t transmitOrReceive; /*!< Transmit or Receive */
|
||||
uint32_t protocolDependentData; /*!< Protocol Dependent Data */
|
||||
uint32_t maxBitRate; /*!< Maximum BitRate */
|
||||
|
@ -375,13 +375,13 @@ typedef struct {
|
|||
|
||||
|
||||
struct PACKED update_capabilities_message {
|
||||
uint32_t lel_audioCapCount; /*!< Audio Capability Count */
|
||||
uint32_t lel_videoCapCount; /*!< Video Capability Count */
|
||||
uint32_t lel_dataCapCount; /*!< Data Capability Count */
|
||||
uint32_t audio_cap_count; /*!< Audio Capability Count */
|
||||
uint32_t videoCapCount; /*!< Video Capability Count */
|
||||
uint32_t dataCapCount; /*!< Data Capability Count */
|
||||
uint32_t RTPPayloadFormat; /*!< RTP Payload Format */
|
||||
uint32_t customPictureFormatCount; /*!< Custom Picture Format Count */
|
||||
uint32_t custom_picture_formatCount; /*!< Custom Picture Format Count */
|
||||
|
||||
customPictureFormat_t customPictureFormat[MAX_CUSTOM_PICTURES]; /*!< Custom Picture Format */
|
||||
custom_picture_format_t custom_picture_format[MAX_CUSTOM_PICTURES]; /*!< Custom Picture Format */
|
||||
|
||||
uint32_t activeStreamsOnRegistration; /*!< Active Streams on Registration */
|
||||
uint32_t maxBW; /*!< Max BW ?? */
|
||||
|
|
|
@ -2201,18 +2201,18 @@ switch_status_t skinny_handle_updatecapabilities(listener_t *listener, skinny_me
|
|||
|
||||
profile = listener->profile;
|
||||
|
||||
skinny_check_data_length(request, sizeof(request->data.upd_cap.lel_audioCapCount));
|
||||
skinny_check_data_length(request, sizeof(request->data.upd_cap.audio_cap_count));
|
||||
|
||||
n = request->data.upd_cap.lel_audioCapCount;
|
||||
n = request->data.upd_cap.audio_cap_count;
|
||||
if (n > SWITCH_MAX_CODECS) {
|
||||
n = SWITCH_MAX_CODECS;
|
||||
}
|
||||
string_len = -1;
|
||||
|
||||
skinny_check_data_length(request, sizeof(request->data.upd_cap.lel_audioCapCount) + n * sizeof(request->data.upd_cap.audioCaps[0]));
|
||||
skinny_check_data_length(request, sizeof(request->data.upd_cap.audio_cap_count) + n * sizeof(request->data.upd_cap.audioCaps[0]));
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
char *codec = skinny_codec2string(request->data.upd_cap.audioCaps[i].lel_payloadCapability);
|
||||
char *codec = skinny_codec2string(request->data.upd_cap.audioCaps[i].payload_capability);
|
||||
codec_order[i] = codec;
|
||||
string_len += strlen(codec)+1;
|
||||
}
|
||||
|
@ -2354,7 +2354,7 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
|
|||
return skinny_handle_accessory_status_message(listener, request);
|
||||
case XML_ALARM_MESSAGE:
|
||||
return skinny_handle_xml_alarm(listener, request);
|
||||
case DEVICE_UPDATECAPABILITIES:
|
||||
case UPDATE_CAPABILITIES_MESSAGE:
|
||||
return skinny_handle_updatecapabilities(listener, request);
|
||||
case SERVER_REQ_MESSAGE:
|
||||
return skinny_handle_server_req_message(listener, request);
|
||||
|
|
|
@ -61,7 +61,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
|
|||
{REGISTER_AVAILABLE_LINES_MESSAGE, "RegisterAvailableLinesMessage"},
|
||||
{DEVICE_TO_USER_DATA_MESSAGE, "DeviceToUserDataMessage"},
|
||||
{DEVICE_TO_USER_DATA_RESPONSE_MESSAGE, "DeviceToUserDataResponseMessage"},
|
||||
{DEVICE_UPDATECAPABILITIES, "DeviceUpdateCapabilities"},
|
||||
{UPDATE_CAPABILITIES_MESSAGE, "DeviceUpdateCapabilities"},
|
||||
{SERVICE_URL_STAT_REQ_MESSAGE, "ServiceUrlStatReqMessage"},
|
||||
{FEATURE_STAT_REQ_MESSAGE, "FeatureStatReqMessage"},
|
||||
{DEVICE_TO_USER_DATA_VERSION1_MESSAGE, "DeviceToUserDataVersion1Message"},
|
||||
|
|
Loading…
Reference in New Issue