[gnome-network-displays/cc-tmp: 21/80] chore: uncrustify
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-network-displays/cc-tmp: 21/80] chore: uncrustify
- Date: Fri, 9 Sep 2022 12:03:49 +0000 (UTC)
commit 127208127a095a2f2c154d1ff7aa5765e0320272
Author: Anupam Kumar <kyteinsky gmail com>
Date: Sat Aug 6 17:45:03 2022 +0530
chore: uncrustify
src/cc/cast_channel.pb-c.c | 452 ++++++++++++++++++++++----------------------
src/cc/cast_channel.pb-c.h | 220 +++++++++------------
src/cc/cc-client.c | 50 ++---
src/cc/cc-client.h | 4 +-
src/nd-cc-provider.c | 380 ++++++++++++++++++-------------------
src/nd-cc-sink.h | 6 +-
src/nd-meta-sink.c | 4 +-
src/nd-wfd-mice-provider.c | 1 +
src/nd-wfd-mice-sink.c | 4 +-
src/wfd/wfd-client.c | 28 +--
src/wfd/wfd-media-factory.c | 4 +-
src/wfd/wfd-params.c | 18 +-
src/wfd/wfd-video-codec.c | 8 +-
13 files changed, 552 insertions(+), 627 deletions(-)
---
diff --git a/src/cc/cast_channel.pb-c.c b/src/cc/cast_channel.pb-c.c
index 097bfaf..89247c1 100644
--- a/src/cc/cast_channel.pb-c.c
+++ b/src/cc/cast_channel.pb-c.c
@@ -7,244 +7,271 @@
#endif
#include "cast_channel.pb-c.h"
-void castchannel__cast_message__init
- (Castchannel__CastMessage *message)
+void
+castchannel__cast_message__init
+ (Castchannel__CastMessage *message)
{
static const Castchannel__CastMessage init_value = CASTCHANNEL__CAST_MESSAGE__INIT;
+
*message = init_value;
}
-size_t castchannel__cast_message__get_packed_size
- (const Castchannel__CastMessage *message)
+size_t
+castchannel__cast_message__get_packed_size
+ (const Castchannel__CastMessage *message)
{
- assert(message->base.descriptor == &castchannel__cast_message__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+ assert (message->base.descriptor == &castchannel__cast_message__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage *) (message));
}
-size_t castchannel__cast_message__pack
- (const Castchannel__CastMessage *message,
- uint8_t *out)
+size_t
+castchannel__cast_message__pack
+ (const Castchannel__CastMessage *message,
+ uint8_t *out)
{
- assert(message->base.descriptor == &castchannel__cast_message__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+ assert (message->base.descriptor == &castchannel__cast_message__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage *) message, out);
}
-size_t castchannel__cast_message__pack_to_buffer
- (const Castchannel__CastMessage *message,
- ProtobufCBuffer *buffer)
+size_t
+castchannel__cast_message__pack_to_buffer
+ (const Castchannel__CastMessage *message,
+ ProtobufCBuffer *buffer)
{
- assert(message->base.descriptor == &castchannel__cast_message__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+ assert (message->base.descriptor == &castchannel__cast_message__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage *) message, buffer);
}
Castchannel__CastMessage *
- castchannel__cast_message__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
+castchannel__cast_message__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
{
return (Castchannel__CastMessage *)
- protobuf_c_message_unpack (&castchannel__cast_message__descriptor,
- allocator, len, data);
+ protobuf_c_message_unpack (&castchannel__cast_message__descriptor,
+ allocator, len, data);
}
-void castchannel__cast_message__free_unpacked
- (Castchannel__CastMessage *message,
- ProtobufCAllocator *allocator)
+void
+castchannel__cast_message__free_unpacked
+ (Castchannel__CastMessage *message,
+ ProtobufCAllocator *allocator)
{
if(!message)
return;
- assert(message->base.descriptor == &castchannel__cast_message__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+ assert (message->base.descriptor == &castchannel__cast_message__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage *) message, allocator);
}
-void castchannel__auth_challenge__init
- (Castchannel__AuthChallenge *message)
+void
+castchannel__auth_challenge__init
+ (Castchannel__AuthChallenge *message)
{
static const Castchannel__AuthChallenge init_value = CASTCHANNEL__AUTH_CHALLENGE__INIT;
+
*message = init_value;
}
-size_t castchannel__auth_challenge__get_packed_size
- (const Castchannel__AuthChallenge *message)
+size_t
+castchannel__auth_challenge__get_packed_size
+ (const Castchannel__AuthChallenge *message)
{
- assert(message->base.descriptor == &castchannel__auth_challenge__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+ assert (message->base.descriptor == &castchannel__auth_challenge__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage *) (message));
}
-size_t castchannel__auth_challenge__pack
- (const Castchannel__AuthChallenge *message,
- uint8_t *out)
+size_t
+castchannel__auth_challenge__pack
+ (const Castchannel__AuthChallenge *message,
+ uint8_t *out)
{
- assert(message->base.descriptor == &castchannel__auth_challenge__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+ assert (message->base.descriptor == &castchannel__auth_challenge__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage *) message, out);
}
-size_t castchannel__auth_challenge__pack_to_buffer
- (const Castchannel__AuthChallenge *message,
- ProtobufCBuffer *buffer)
+size_t
+castchannel__auth_challenge__pack_to_buffer
+ (const Castchannel__AuthChallenge *message,
+ ProtobufCBuffer *buffer)
{
- assert(message->base.descriptor == &castchannel__auth_challenge__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+ assert (message->base.descriptor == &castchannel__auth_challenge__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage *) message, buffer);
}
Castchannel__AuthChallenge *
- castchannel__auth_challenge__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
+castchannel__auth_challenge__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
{
return (Castchannel__AuthChallenge *)
- protobuf_c_message_unpack (&castchannel__auth_challenge__descriptor,
- allocator, len, data);
+ protobuf_c_message_unpack (&castchannel__auth_challenge__descriptor,
+ allocator, len, data);
}
-void castchannel__auth_challenge__free_unpacked
- (Castchannel__AuthChallenge *message,
- ProtobufCAllocator *allocator)
+void
+castchannel__auth_challenge__free_unpacked
+ (Castchannel__AuthChallenge *message,
+ ProtobufCAllocator *allocator)
{
if(!message)
return;
- assert(message->base.descriptor == &castchannel__auth_challenge__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+ assert (message->base.descriptor == &castchannel__auth_challenge__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage *) message, allocator);
}
-void castchannel__auth_response__init
- (Castchannel__AuthResponse *message)
+void
+castchannel__auth_response__init
+ (Castchannel__AuthResponse *message)
{
static const Castchannel__AuthResponse init_value = CASTCHANNEL__AUTH_RESPONSE__INIT;
+
*message = init_value;
}
-size_t castchannel__auth_response__get_packed_size
- (const Castchannel__AuthResponse *message)
+size_t
+castchannel__auth_response__get_packed_size
+ (const Castchannel__AuthResponse *message)
{
- assert(message->base.descriptor == &castchannel__auth_response__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+ assert (message->base.descriptor == &castchannel__auth_response__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage *) (message));
}
-size_t castchannel__auth_response__pack
- (const Castchannel__AuthResponse *message,
- uint8_t *out)
+size_t
+castchannel__auth_response__pack
+ (const Castchannel__AuthResponse *message,
+ uint8_t *out)
{
- assert(message->base.descriptor == &castchannel__auth_response__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+ assert (message->base.descriptor == &castchannel__auth_response__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage *) message, out);
}
-size_t castchannel__auth_response__pack_to_buffer
- (const Castchannel__AuthResponse *message,
- ProtobufCBuffer *buffer)
+size_t
+castchannel__auth_response__pack_to_buffer
+ (const Castchannel__AuthResponse *message,
+ ProtobufCBuffer *buffer)
{
- assert(message->base.descriptor == &castchannel__auth_response__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+ assert (message->base.descriptor == &castchannel__auth_response__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage *) message, buffer);
}
Castchannel__AuthResponse *
- castchannel__auth_response__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
+castchannel__auth_response__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
{
return (Castchannel__AuthResponse *)
- protobuf_c_message_unpack (&castchannel__auth_response__descriptor,
- allocator, len, data);
+ protobuf_c_message_unpack (&castchannel__auth_response__descriptor,
+ allocator, len, data);
}
-void castchannel__auth_response__free_unpacked
- (Castchannel__AuthResponse *message,
- ProtobufCAllocator *allocator)
+void
+castchannel__auth_response__free_unpacked
+ (Castchannel__AuthResponse *message,
+ ProtobufCAllocator *allocator)
{
if(!message)
return;
- assert(message->base.descriptor == &castchannel__auth_response__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+ assert (message->base.descriptor == &castchannel__auth_response__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage *) message, allocator);
}
-void castchannel__auth_error__init
- (Castchannel__AuthError *message)
+void
+castchannel__auth_error__init
+ (Castchannel__AuthError *message)
{
static const Castchannel__AuthError init_value = CASTCHANNEL__AUTH_ERROR__INIT;
+
*message = init_value;
}
-size_t castchannel__auth_error__get_packed_size
- (const Castchannel__AuthError *message)
+size_t
+castchannel__auth_error__get_packed_size
+ (const Castchannel__AuthError *message)
{
- assert(message->base.descriptor == &castchannel__auth_error__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+ assert (message->base.descriptor == &castchannel__auth_error__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage *) (message));
}
-size_t castchannel__auth_error__pack
- (const Castchannel__AuthError *message,
- uint8_t *out)
+size_t
+castchannel__auth_error__pack
+ (const Castchannel__AuthError *message,
+ uint8_t *out)
{
- assert(message->base.descriptor == &castchannel__auth_error__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+ assert (message->base.descriptor == &castchannel__auth_error__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage *) message, out);
}
-size_t castchannel__auth_error__pack_to_buffer
- (const Castchannel__AuthError *message,
- ProtobufCBuffer *buffer)
+size_t
+castchannel__auth_error__pack_to_buffer
+ (const Castchannel__AuthError *message,
+ ProtobufCBuffer *buffer)
{
- assert(message->base.descriptor == &castchannel__auth_error__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+ assert (message->base.descriptor == &castchannel__auth_error__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage *) message, buffer);
}
Castchannel__AuthError *
- castchannel__auth_error__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
+castchannel__auth_error__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
{
return (Castchannel__AuthError *)
- protobuf_c_message_unpack (&castchannel__auth_error__descriptor,
- allocator, len, data);
+ protobuf_c_message_unpack (&castchannel__auth_error__descriptor,
+ allocator, len, data);
}
-void castchannel__auth_error__free_unpacked
- (Castchannel__AuthError *message,
- ProtobufCAllocator *allocator)
+void
+castchannel__auth_error__free_unpacked
+ (Castchannel__AuthError *message,
+ ProtobufCAllocator *allocator)
{
if(!message)
return;
- assert(message->base.descriptor == &castchannel__auth_error__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+ assert (message->base.descriptor == &castchannel__auth_error__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage *) message, allocator);
}
-void castchannel__device_auth_message__init
- (Castchannel__DeviceAuthMessage *message)
+void
+castchannel__device_auth_message__init
+ (Castchannel__DeviceAuthMessage *message)
{
static const Castchannel__DeviceAuthMessage init_value = CASTCHANNEL__DEVICE_AUTH_MESSAGE__INIT;
+
*message = init_value;
}
-size_t castchannel__device_auth_message__get_packed_size
- (const Castchannel__DeviceAuthMessage *message)
+size_t
+castchannel__device_auth_message__get_packed_size
+ (const Castchannel__DeviceAuthMessage *message)
{
- assert(message->base.descriptor == &castchannel__device_auth_message__descriptor);
- return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+ assert (message->base.descriptor == &castchannel__device_auth_message__descriptor);
+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage *) (message));
}
-size_t castchannel__device_auth_message__pack
- (const Castchannel__DeviceAuthMessage *message,
- uint8_t *out)
+size_t
+castchannel__device_auth_message__pack
+ (const Castchannel__DeviceAuthMessage *message,
+ uint8_t *out)
{
- assert(message->base.descriptor == &castchannel__device_auth_message__descriptor);
- return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+ assert (message->base.descriptor == &castchannel__device_auth_message__descriptor);
+ return protobuf_c_message_pack ((const ProtobufCMessage *) message, out);
}
-size_t castchannel__device_auth_message__pack_to_buffer
- (const Castchannel__DeviceAuthMessage *message,
- ProtobufCBuffer *buffer)
+size_t
+castchannel__device_auth_message__pack_to_buffer
+ (const Castchannel__DeviceAuthMessage *message,
+ ProtobufCBuffer *buffer)
{
- assert(message->base.descriptor == &castchannel__device_auth_message__descriptor);
- return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+ assert (message->base.descriptor == &castchannel__device_auth_message__descriptor);
+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage *) message, buffer);
}
Castchannel__DeviceAuthMessage *
- castchannel__device_auth_message__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data)
+castchannel__device_auth_message__unpack
+ (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data)
{
return (Castchannel__DeviceAuthMessage *)
- protobuf_c_message_unpack (&castchannel__device_auth_message__descriptor,
- allocator, len, data);
+ protobuf_c_message_unpack (&castchannel__device_auth_message__descriptor,
+ allocator, len, data);
}
-void castchannel__device_auth_message__free_unpacked
- (Castchannel__DeviceAuthMessage *message,
- ProtobufCAllocator *allocator)
+void
+castchannel__device_auth_message__free_unpacked
+ (Castchannel__DeviceAuthMessage *message,
+ ProtobufCAllocator *allocator)
{
if(!message)
return;
- assert(message->base.descriptor == &castchannel__device_auth_message__descriptor);
- protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+ assert (message->base.descriptor == &castchannel__device_auth_message__descriptor);
+ protobuf_c_message_free_unpacked ((ProtobufCMessage *) message, allocator);
}
-static const ProtobufCEnumValue castchannel__cast_message__protocol_version__enum_values_by_number[1] =
-{
+static const ProtobufCEnumValue castchannel__cast_message__protocol_version__enum_values_by_number[1] = {
{ "CASTV2_1_0", "CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0", 0 },
};
static const ProtobufCIntRange castchannel__cast_message__protocol_version__value_ranges[] = {
-{0, 0},{0, 1}
+ {0, 0}, {0, 1}
};
-static const ProtobufCEnumValueIndex castchannel__cast_message__protocol_version__enum_values_by_name[1] =
-{
+static const ProtobufCEnumValueIndex castchannel__cast_message__protocol_version__enum_values_by_name[1] = {
{ "CASTV2_1_0", 0 },
};
-const ProtobufCEnumDescriptor castchannel__cast_message__protocol_version__descriptor =
-{
+const ProtobufCEnumDescriptor castchannel__cast_message__protocol_version__descriptor = {
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"castchannel.CastMessage.ProtocolVersion",
"ProtocolVersion",
@@ -256,23 +283,20 @@ const ProtobufCEnumDescriptor castchannel__cast_message__protocol_version__descr
castchannel__cast_message__protocol_version__enum_values_by_name,
1,
castchannel__cast_message__protocol_version__value_ranges,
- NULL,NULL,NULL,NULL /* reserved[1234] */
+ NULL, NULL, NULL, NULL /* reserved[1234] */
};
-static const ProtobufCEnumValue castchannel__cast_message__payload_type__enum_values_by_number[2] =
-{
+static const ProtobufCEnumValue castchannel__cast_message__payload_type__enum_values_by_number[2] = {
{ "STRING", "CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING", 0 },
{ "BINARY", "CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__BINARY", 1 },
};
static const ProtobufCIntRange castchannel__cast_message__payload_type__value_ranges[] = {
-{0, 0},{0, 2}
+ {0, 0}, {0, 2}
};
-static const ProtobufCEnumValueIndex castchannel__cast_message__payload_type__enum_values_by_name[2] =
-{
+static const ProtobufCEnumValueIndex castchannel__cast_message__payload_type__enum_values_by_name[2] = {
{ "BINARY", 1 },
{ "STRING", 0 },
};
-const ProtobufCEnumDescriptor castchannel__cast_message__payload_type__descriptor =
-{
+const ProtobufCEnumDescriptor castchannel__cast_message__payload_type__descriptor = {
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"castchannel.CastMessage.PayloadType",
"PayloadType",
@@ -284,21 +308,20 @@ const ProtobufCEnumDescriptor castchannel__cast_message__payload_type__descripto
castchannel__cast_message__payload_type__enum_values_by_name,
1,
castchannel__cast_message__payload_type__value_ranges,
- NULL,NULL,NULL,NULL /* reserved[1234] */
+ NULL, NULL, NULL, NULL /* reserved[1234] */
};
-static const ProtobufCFieldDescriptor castchannel__cast_message__field_descriptors[7] =
-{
+static const ProtobufCFieldDescriptor castchannel__cast_message__field_descriptors[7] = {
{
"protocol_version",
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, protocol_version),
+ offsetof (Castchannel__CastMessage, protocol_version),
&castchannel__cast_message__protocol_version__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"source_id",
@@ -306,11 +329,11 @@ static const ProtobufCFieldDescriptor castchannel__cast_message__field_descripto
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, source_id),
+ offsetof (Castchannel__CastMessage, source_id),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"destination_id",
@@ -318,11 +341,11 @@ static const ProtobufCFieldDescriptor castchannel__cast_message__field_descripto
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, destination_id),
+ offsetof (Castchannel__CastMessage, destination_id),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"namespace",
@@ -330,11 +353,11 @@ static const ProtobufCFieldDescriptor castchannel__cast_message__field_descripto
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, namespace_),
+ offsetof (Castchannel__CastMessage, namespace_),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"payload_type",
@@ -342,11 +365,11 @@ static const ProtobufCFieldDescriptor castchannel__cast_message__field_descripto
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, payload_type),
+ offsetof (Castchannel__CastMessage, payload_type),
&castchannel__cast_message__payload_type__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"payload_utf8",
@@ -354,23 +377,23 @@ static const ProtobufCFieldDescriptor castchannel__cast_message__field_descripto
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
- offsetof(Castchannel__CastMessage, payload_utf8),
+ offsetof (Castchannel__CastMessage, payload_utf8),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"payload_binary",
7,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_BYTES,
- offsetof(Castchannel__CastMessage, has_payload_binary),
- offsetof(Castchannel__CastMessage, payload_binary),
+ offsetof (Castchannel__CastMessage, has_payload_binary),
+ offsetof (Castchannel__CastMessage, payload_binary),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
};
static const unsigned castchannel__cast_message__field_indices_by_name[] = {
@@ -382,57 +405,53 @@ static const unsigned castchannel__cast_message__field_indices_by_name[] = {
0, /* field[0] = protocol_version */
1, /* field[1] = source_id */
};
-static const ProtobufCIntRange castchannel__cast_message__number_ranges[1 + 1] =
-{
+static const ProtobufCIntRange castchannel__cast_message__number_ranges[1 + 1] = {
{ 1, 0 },
{ 0, 7 }
};
-const ProtobufCMessageDescriptor castchannel__cast_message__descriptor =
-{
+const ProtobufCMessageDescriptor castchannel__cast_message__descriptor = {
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"castchannel.CastMessage",
"CastMessage",
"Castchannel__CastMessage",
"castchannel",
- sizeof(Castchannel__CastMessage),
+ sizeof (Castchannel__CastMessage),
7,
castchannel__cast_message__field_descriptors,
castchannel__cast_message__field_indices_by_name,
1, castchannel__cast_message__number_ranges,
(ProtobufCMessageInit) castchannel__cast_message__init,
- NULL,NULL,NULL /* reserved[123] */
+ NULL, NULL, NULL /* reserved[123] */
};
#define castchannel__auth_challenge__field_descriptors NULL
#define castchannel__auth_challenge__field_indices_by_name NULL
#define castchannel__auth_challenge__number_ranges NULL
-const ProtobufCMessageDescriptor castchannel__auth_challenge__descriptor =
-{
+const ProtobufCMessageDescriptor castchannel__auth_challenge__descriptor = {
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"castchannel.AuthChallenge",
"AuthChallenge",
"Castchannel__AuthChallenge",
"castchannel",
- sizeof(Castchannel__AuthChallenge),
+ sizeof (Castchannel__AuthChallenge),
0,
castchannel__auth_challenge__field_descriptors,
castchannel__auth_challenge__field_indices_by_name,
0, castchannel__auth_challenge__number_ranges,
(ProtobufCMessageInit) castchannel__auth_challenge__init,
- NULL,NULL,NULL /* reserved[123] */
+ NULL, NULL, NULL /* reserved[123] */
};
-static const ProtobufCFieldDescriptor castchannel__auth_response__field_descriptors[2] =
-{
+static const ProtobufCFieldDescriptor castchannel__auth_response__field_descriptors[2] = {
{
"signature",
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
- offsetof(Castchannel__AuthResponse, signature),
+ offsetof (Castchannel__AuthResponse, signature),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"client_auth_certificate",
@@ -440,52 +459,47 @@ static const ProtobufCFieldDescriptor castchannel__auth_response__field_descript
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
- offsetof(Castchannel__AuthResponse, client_auth_certificate),
+ offsetof (Castchannel__AuthResponse, client_auth_certificate),
NULL,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
};
static const unsigned castchannel__auth_response__field_indices_by_name[] = {
1, /* field[1] = client_auth_certificate */
0, /* field[0] = signature */
};
-static const ProtobufCIntRange castchannel__auth_response__number_ranges[1 + 1] =
-{
+static const ProtobufCIntRange castchannel__auth_response__number_ranges[1 + 1] = {
{ 1, 0 },
{ 0, 2 }
};
-const ProtobufCMessageDescriptor castchannel__auth_response__descriptor =
-{
+const ProtobufCMessageDescriptor castchannel__auth_response__descriptor = {
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"castchannel.AuthResponse",
"AuthResponse",
"Castchannel__AuthResponse",
"castchannel",
- sizeof(Castchannel__AuthResponse),
+ sizeof (Castchannel__AuthResponse),
2,
castchannel__auth_response__field_descriptors,
castchannel__auth_response__field_indices_by_name,
1, castchannel__auth_response__number_ranges,
(ProtobufCMessageInit) castchannel__auth_response__init,
- NULL,NULL,NULL /* reserved[123] */
+ NULL, NULL, NULL /* reserved[123] */
};
-static const ProtobufCEnumValue castchannel__auth_error__error_type__enum_values_by_number[2] =
-{
+static const ProtobufCEnumValue castchannel__auth_error__error_type__enum_values_by_number[2] = {
{ "INTERNAL_ERROR", "CASTCHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR", 0 },
{ "NO_TLS", "CASTCHANNEL__AUTH_ERROR__ERROR_TYPE__NO_TLS", 1 },
};
static const ProtobufCIntRange castchannel__auth_error__error_type__value_ranges[] = {
-{0, 0},{0, 2}
+ {0, 0}, {0, 2}
};
-static const ProtobufCEnumValueIndex castchannel__auth_error__error_type__enum_values_by_name[2] =
-{
+static const ProtobufCEnumValueIndex castchannel__auth_error__error_type__enum_values_by_name[2] = {
{ "INTERNAL_ERROR", 0 },
{ "NO_TLS", 1 },
};
-const ProtobufCEnumDescriptor castchannel__auth_error__error_type__descriptor =
-{
+const ProtobufCEnumDescriptor castchannel__auth_error__error_type__descriptor = {
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"castchannel.AuthError.ErrorType",
"ErrorType",
@@ -497,59 +511,55 @@ const ProtobufCEnumDescriptor castchannel__auth_error__error_type__descriptor =
castchannel__auth_error__error_type__enum_values_by_name,
1,
castchannel__auth_error__error_type__value_ranges,
- NULL,NULL,NULL,NULL /* reserved[1234] */
+ NULL, NULL, NULL, NULL /* reserved[1234] */
};
-static const ProtobufCFieldDescriptor castchannel__auth_error__field_descriptors[1] =
-{
+static const ProtobufCFieldDescriptor castchannel__auth_error__field_descriptors[1] = {
{
"error_type",
1,
PROTOBUF_C_LABEL_REQUIRED,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */
- offsetof(Castchannel__AuthError, error_type),
+ offsetof (Castchannel__AuthError, error_type),
&castchannel__auth_error__error_type__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
};
static const unsigned castchannel__auth_error__field_indices_by_name[] = {
0, /* field[0] = error_type */
};
-static const ProtobufCIntRange castchannel__auth_error__number_ranges[1 + 1] =
-{
+static const ProtobufCIntRange castchannel__auth_error__number_ranges[1 + 1] = {
{ 1, 0 },
{ 0, 1 }
};
-const ProtobufCMessageDescriptor castchannel__auth_error__descriptor =
-{
+const ProtobufCMessageDescriptor castchannel__auth_error__descriptor = {
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"castchannel.AuthError",
"AuthError",
"Castchannel__AuthError",
"castchannel",
- sizeof(Castchannel__AuthError),
+ sizeof (Castchannel__AuthError),
1,
castchannel__auth_error__field_descriptors,
castchannel__auth_error__field_indices_by_name,
1, castchannel__auth_error__number_ranges,
(ProtobufCMessageInit) castchannel__auth_error__init,
- NULL,NULL,NULL /* reserved[123] */
+ NULL, NULL, NULL /* reserved[123] */
};
-static const ProtobufCFieldDescriptor castchannel__device_auth_message__field_descriptors[3] =
-{
+static const ProtobufCFieldDescriptor castchannel__device_auth_message__field_descriptors[3] = {
{
"challenge",
1,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
- offsetof(Castchannel__DeviceAuthMessage, challenge),
+ offsetof (Castchannel__DeviceAuthMessage, challenge),
&castchannel__auth_challenge__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"response",
@@ -557,11 +567,11 @@ static const ProtobufCFieldDescriptor castchannel__device_auth_message__field_de
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
- offsetof(Castchannel__DeviceAuthMessage, response),
+ offsetof (Castchannel__DeviceAuthMessage, response),
&castchannel__auth_response__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
{
"error",
@@ -569,11 +579,11 @@ static const ProtobufCFieldDescriptor castchannel__device_auth_message__field_de
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
- offsetof(Castchannel__DeviceAuthMessage, error),
+ offsetof (Castchannel__DeviceAuthMessage, error),
&castchannel__auth_error__descriptor,
NULL,
0, /* flags */
- 0,NULL,NULL /* reserved1,reserved2, etc */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
},
};
static const unsigned castchannel__device_auth_message__field_indices_by_name[] = {
@@ -581,23 +591,21 @@ static const unsigned castchannel__device_auth_message__field_indices_by_name[]
2, /* field[2] = error */
1, /* field[1] = response */
};
-static const ProtobufCIntRange castchannel__device_auth_message__number_ranges[1 + 1] =
-{
+static const ProtobufCIntRange castchannel__device_auth_message__number_ranges[1 + 1] = {
{ 1, 0 },
{ 0, 3 }
};
-const ProtobufCMessageDescriptor castchannel__device_auth_message__descriptor =
-{
+const ProtobufCMessageDescriptor castchannel__device_auth_message__descriptor = {
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"castchannel.DeviceAuthMessage",
"DeviceAuthMessage",
"Castchannel__DeviceAuthMessage",
"castchannel",
- sizeof(Castchannel__DeviceAuthMessage),
+ sizeof (Castchannel__DeviceAuthMessage),
3,
castchannel__device_auth_message__field_descriptors,
castchannel__device_auth_message__field_indices_by_name,
1, castchannel__device_auth_message__number_ranges,
(ProtobufCMessageInit) castchannel__device_auth_message__init,
- NULL,NULL,NULL /* reserved[123] */
+ NULL, NULL, NULL /* reserved[123] */
};
diff --git a/src/cc/cast_channel.pb-c.h b/src/cc/cast_channel.pb-c.h
index c925886..fcc555e 100644
--- a/src/cc/cast_channel.pb-c.h
+++ b/src/cc/cast_channel.pb-c.h
@@ -15,10 +15,10 @@ PROTOBUF_C__BEGIN_DECLS
#endif
-typedef struct Castchannel__CastMessage Castchannel__CastMessage;
-typedef struct Castchannel__AuthChallenge Castchannel__AuthChallenge;
-typedef struct Castchannel__AuthResponse Castchannel__AuthResponse;
-typedef struct Castchannel__AuthError Castchannel__AuthError;
+typedef struct Castchannel__CastMessage Castchannel__CastMessage;
+typedef struct Castchannel__AuthChallenge Castchannel__AuthChallenge;
+typedef struct Castchannel__AuthResponse Castchannel__AuthResponse;
+typedef struct Castchannel__AuthError Castchannel__AuthError;
typedef struct Castchannel__DeviceAuthMessage Castchannel__DeviceAuthMessage;
@@ -30,7 +30,7 @@ typedef struct Castchannel__DeviceAuthMessage Castchannel__DeviceAuthMessage;
*/
typedef enum _Castchannel__CastMessage__ProtocolVersion {
CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0 = 0
- PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION)
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE
(CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION)
} Castchannel__CastMessage__ProtocolVersion;
/*
* What type of data do we have in this message.
@@ -38,7 +38,7 @@ typedef enum _Castchannel__CastMessage__ProtocolVersion {
typedef enum _Castchannel__CastMessage__PayloadType {
CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING = 0,
CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__BINARY = 1
- PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE)
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE
(CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE)
} Castchannel__CastMessage__PayloadType;
typedef enum _Castchannel__AuthError__ErrorType {
CASTCHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR = 0,
@@ -46,14 +46,14 @@ typedef enum _Castchannel__AuthError__ErrorType {
* The underlying connection is not TLS
*/
CASTCHANNEL__AUTH_ERROR__ERROR_TYPE__NO_TLS = 1
- PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CASTCHANNEL__AUTH_ERROR__ERROR_TYPE)
+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE
(CASTCHANNEL__AUTH_ERROR__ERROR_TYPE)
} Castchannel__AuthError__ErrorType;
/* --- messages --- */
struct Castchannel__CastMessage
{
- ProtobufCMessage base;
+ ProtobufCMessage base;
Castchannel__CastMessage__ProtocolVersion protocol_version;
/*
* source and destination ids identify the origin and destination of the
@@ -75,19 +75,19 @@ struct Castchannel__CastMessage
* and endpoints sharing a channel listen on one or more namespaces. The
* namespace defines the protocol and semantics of the message.
*/
- char *namespace_;
+ char *namespace_;
Castchannel__CastMessage__PayloadType payload_type;
/*
* Depending on payload_type, exactly one of the following optional fields
* will always be set.
*/
- char *payload_utf8;
- protobuf_c_boolean has_payload_binary;
+ char *payload_utf8;
+ protobuf_c_boolean has_payload_binary;
ProtobufCBinaryData payload_binary;
};
#define CASTCHANNEL__CAST_MESSAGE__INIT \
- { PROTOBUF_C_MESSAGE_INIT (&castchannel__cast_message__descriptor) \
- , CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0, NULL, NULL, NULL,
CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING, NULL, 0, {0,NULL} }
+ { PROTOBUF_C_MESSAGE_INIT (&castchannel__cast_message__descriptor) \
+ , CASTCHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0, NULL, NULL, NULL,
CASTCHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING, NULL, 0, {0, NULL} }
/*
@@ -98,28 +98,28 @@ struct Castchannel__AuthChallenge
ProtobufCMessage base;
};
#define CASTCHANNEL__AUTH_CHALLENGE__INIT \
- { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_challenge__descriptor) \
- }
+ { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_challenge__descriptor) \
+ }
struct Castchannel__AuthResponse
{
- ProtobufCMessage base;
+ ProtobufCMessage base;
ProtobufCBinaryData signature;
ProtobufCBinaryData client_auth_certificate;
};
#define CASTCHANNEL__AUTH_RESPONSE__INIT \
- { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_response__descriptor) \
- , {0,NULL}, {0,NULL} }
+ { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_response__descriptor) \
+ , {0, NULL}, {0, NULL} }
struct Castchannel__AuthError
{
- ProtobufCMessage base;
+ ProtobufCMessage base;
Castchannel__AuthError__ErrorType error_type;
};
#define CASTCHANNEL__AUTH_ERROR__INIT \
- { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_error__descriptor) \
+ { PROTOBUF_C_MESSAGE_INIT (&castchannel__auth_error__descriptor) \
, CASTCHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR }
@@ -134,125 +134,85 @@ struct Castchannel__DeviceAuthMessage
* Response fields
*/
Castchannel__AuthResponse *response;
- Castchannel__AuthError *error;
+ Castchannel__AuthError *error;
};
#define CASTCHANNEL__DEVICE_AUTH_MESSAGE__INIT \
- { PROTOBUF_C_MESSAGE_INIT (&castchannel__device_auth_message__descriptor) \
+ { PROTOBUF_C_MESSAGE_INIT (&castchannel__device_auth_message__descriptor) \
, NULL, NULL, NULL }
/* Castchannel__CastMessage methods */
-void castchannel__cast_message__init
- (Castchannel__CastMessage *message);
-size_t castchannel__cast_message__get_packed_size
- (const Castchannel__CastMessage *message);
-size_t castchannel__cast_message__pack
- (const Castchannel__CastMessage *message,
- uint8_t *out);
-size_t castchannel__cast_message__pack_to_buffer
- (const Castchannel__CastMessage *message,
- ProtobufCBuffer *buffer);
-Castchannel__CastMessage *
- castchannel__cast_message__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data);
-void castchannel__cast_message__free_unpacked
- (Castchannel__CastMessage *message,
- ProtobufCAllocator *allocator);
+void castchannel__cast_message__init (Castchannel__CastMessage *message);
+size_t castchannel__cast_message__get_packed_size (const Castchannel__CastMessage *message);
+size_t castchannel__cast_message__pack (const Castchannel__CastMessage *message,
+ uint8_t *out);
+size_t castchannel__cast_message__pack_to_buffer (const Castchannel__CastMessage *message,
+ ProtobufCBuffer *buffer);
+Castchannel__CastMessage *castchannel__cast_message__unpack (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void castchannel__cast_message__free_unpacked (Castchannel__CastMessage *message,
+ ProtobufCAllocator *allocator);
/* Castchannel__AuthChallenge methods */
-void castchannel__auth_challenge__init
- (Castchannel__AuthChallenge *message);
-size_t castchannel__auth_challenge__get_packed_size
- (const Castchannel__AuthChallenge *message);
-size_t castchannel__auth_challenge__pack
- (const Castchannel__AuthChallenge *message,
- uint8_t *out);
-size_t castchannel__auth_challenge__pack_to_buffer
- (const Castchannel__AuthChallenge *message,
- ProtobufCBuffer *buffer);
-Castchannel__AuthChallenge *
- castchannel__auth_challenge__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data);
-void castchannel__auth_challenge__free_unpacked
- (Castchannel__AuthChallenge *message,
- ProtobufCAllocator *allocator);
+void castchannel__auth_challenge__init (Castchannel__AuthChallenge *message);
+size_t castchannel__auth_challenge__get_packed_size (const Castchannel__AuthChallenge *message);
+size_t castchannel__auth_challenge__pack (const Castchannel__AuthChallenge *message,
+ uint8_t *out);
+size_t castchannel__auth_challenge__pack_to_buffer (const Castchannel__AuthChallenge *message,
+ ProtobufCBuffer *buffer);
+Castchannel__AuthChallenge *castchannel__auth_challenge__unpack (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void castchannel__auth_challenge__free_unpacked (Castchannel__AuthChallenge *message,
+ ProtobufCAllocator *allocator);
/* Castchannel__AuthResponse methods */
-void castchannel__auth_response__init
- (Castchannel__AuthResponse *message);
-size_t castchannel__auth_response__get_packed_size
- (const Castchannel__AuthResponse *message);
-size_t castchannel__auth_response__pack
- (const Castchannel__AuthResponse *message,
- uint8_t *out);
-size_t castchannel__auth_response__pack_to_buffer
- (const Castchannel__AuthResponse *message,
- ProtobufCBuffer *buffer);
-Castchannel__AuthResponse *
- castchannel__auth_response__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data);
-void castchannel__auth_response__free_unpacked
- (Castchannel__AuthResponse *message,
- ProtobufCAllocator *allocator);
+void castchannel__auth_response__init (Castchannel__AuthResponse *message);
+size_t castchannel__auth_response__get_packed_size (const Castchannel__AuthResponse *message);
+size_t castchannel__auth_response__pack (const Castchannel__AuthResponse *message,
+ uint8_t *out);
+size_t castchannel__auth_response__pack_to_buffer (const Castchannel__AuthResponse *message,
+ ProtobufCBuffer *buffer);
+Castchannel__AuthResponse *castchannel__auth_response__unpack (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void castchannel__auth_response__free_unpacked (Castchannel__AuthResponse *message,
+ ProtobufCAllocator *allocator);
/* Castchannel__AuthError methods */
-void castchannel__auth_error__init
- (Castchannel__AuthError *message);
-size_t castchannel__auth_error__get_packed_size
- (const Castchannel__AuthError *message);
-size_t castchannel__auth_error__pack
- (const Castchannel__AuthError *message,
- uint8_t *out);
-size_t castchannel__auth_error__pack_to_buffer
- (const Castchannel__AuthError *message,
- ProtobufCBuffer *buffer);
-Castchannel__AuthError *
- castchannel__auth_error__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data);
-void castchannel__auth_error__free_unpacked
- (Castchannel__AuthError *message,
- ProtobufCAllocator *allocator);
+void castchannel__auth_error__init (Castchannel__AuthError *message);
+size_t castchannel__auth_error__get_packed_size (const Castchannel__AuthError *message);
+size_t castchannel__auth_error__pack (const Castchannel__AuthError *message,
+ uint8_t *out);
+size_t castchannel__auth_error__pack_to_buffer (const Castchannel__AuthError *message,
+ ProtobufCBuffer *buffer);
+Castchannel__AuthError *castchannel__auth_error__unpack (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void castchannel__auth_error__free_unpacked (Castchannel__AuthError *message,
+ ProtobufCAllocator *allocator);
/* Castchannel__DeviceAuthMessage methods */
-void castchannel__device_auth_message__init
- (Castchannel__DeviceAuthMessage *message);
-size_t castchannel__device_auth_message__get_packed_size
- (const Castchannel__DeviceAuthMessage *message);
-size_t castchannel__device_auth_message__pack
- (const Castchannel__DeviceAuthMessage *message,
- uint8_t *out);
-size_t castchannel__device_auth_message__pack_to_buffer
- (const Castchannel__DeviceAuthMessage *message,
- ProtobufCBuffer *buffer);
-Castchannel__DeviceAuthMessage *
- castchannel__device_auth_message__unpack
- (ProtobufCAllocator *allocator,
- size_t len,
- const uint8_t *data);
-void castchannel__device_auth_message__free_unpacked
- (Castchannel__DeviceAuthMessage *message,
- ProtobufCAllocator *allocator);
+void castchannel__device_auth_message__init (Castchannel__DeviceAuthMessage *message);
+size_t castchannel__device_auth_message__get_packed_size (const Castchannel__DeviceAuthMessage *message);
+size_t castchannel__device_auth_message__pack (const Castchannel__DeviceAuthMessage *message,
+ uint8_t *out);
+size_t castchannel__device_auth_message__pack_to_buffer (const Castchannel__DeviceAuthMessage *message,
+ ProtobufCBuffer *buffer);
+Castchannel__DeviceAuthMessage *castchannel__device_auth_message__unpack (ProtobufCAllocator *allocator,
+ size_t len,
+ const uint8_t *data);
+void castchannel__device_auth_message__free_unpacked (Castchannel__DeviceAuthMessage *message,
+ ProtobufCAllocator *allocator);
/* --- per-message closures --- */
-typedef void (*Castchannel__CastMessage_Closure)
- (const Castchannel__CastMessage *message,
- void *closure_data);
-typedef void (*Castchannel__AuthChallenge_Closure)
- (const Castchannel__AuthChallenge *message,
- void *closure_data);
-typedef void (*Castchannel__AuthResponse_Closure)
- (const Castchannel__AuthResponse *message,
- void *closure_data);
-typedef void (*Castchannel__AuthError_Closure)
- (const Castchannel__AuthError *message,
- void *closure_data);
-typedef void (*Castchannel__DeviceAuthMessage_Closure)
- (const Castchannel__DeviceAuthMessage *message,
- void *closure_data);
+typedef void (*Castchannel__CastMessage_Closure)(const Castchannel__CastMessage *message,
+ void *closure_data);
+typedef void (*Castchannel__AuthChallenge_Closure)(const Castchannel__AuthChallenge *message,
+ void *closure_data);
+typedef void (*Castchannel__AuthResponse_Closure)(const Castchannel__AuthResponse *message,
+ void *closure_data);
+typedef void (*Castchannel__AuthError_Closure)(const Castchannel__AuthError *message,
+ void *closure_data);
+typedef void (*Castchannel__DeviceAuthMessage_Closure)(const Castchannel__DeviceAuthMessage *message,
+ void *closure_data);
/* --- services --- */
@@ -260,12 +220,12 @@ typedef void (*Castchannel__DeviceAuthMessage_Closure)
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor castchannel__cast_message__descriptor;
-extern const ProtobufCEnumDescriptor castchannel__cast_message__protocol_version__descriptor;
-extern const ProtobufCEnumDescriptor castchannel__cast_message__payload_type__descriptor;
+extern const ProtobufCEnumDescriptor castchannel__cast_message__protocol_version__descriptor;
+extern const ProtobufCEnumDescriptor castchannel__cast_message__payload_type__descriptor;
extern const ProtobufCMessageDescriptor castchannel__auth_challenge__descriptor;
extern const ProtobufCMessageDescriptor castchannel__auth_response__descriptor;
extern const ProtobufCMessageDescriptor castchannel__auth_error__descriptor;
-extern const ProtobufCEnumDescriptor castchannel__auth_error__error_type__descriptor;
+extern const ProtobufCEnumDescriptor castchannel__auth_error__error_type__descriptor;
extern const ProtobufCMessageDescriptor castchannel__device_auth_message__descriptor;
PROTOBUF_C__END_DECLS
diff --git a/src/cc/cc-client.c b/src/cc/cc-client.c
index c01075f..06465c6 100644
--- a/src/cc/cc-client.c
+++ b/src/cc/cc-client.c
@@ -24,16 +24,16 @@ typedef enum {
struct _CCClient
{
- GstRTSPClient parent_instance;
+ GstRTSPClient parent_instance;
CCConnectionType connection_type;
- guint keep_alive_source_id;
+ guint keep_alive_source_id;
CCClientInitState init_state;
- WfdMedia *media;
- WfdParams *params;
+ WfdMedia *media;
+ WfdParams *params;
- WfdMediaQuirks media_quirks;
+ WfdMediaQuirks media_quirks;
};
G_DEFINE_TYPE (CCClient, cc_client, GST_TYPE_RTSP_CLIENT)
@@ -142,9 +142,7 @@ cc_client_select_codec_and_resolution (CCClient *self, WfdH264ProfileFlags profi
#if 0
/* The native resolution reported by some devices is just useless */
if (codec->native)
- {
- self->params->selected_resolution = wfd_resolution_copy (codec->native);
- }
+ self->params->selected_resolution = wfd_resolution_copy (codec->native);
else
{
/* Find a good resolution. */
@@ -155,9 +153,7 @@ cc_client_select_codec_and_resolution (CCClient *self, WfdH264ProfileFlags profi
resolutions = g_list_sort (resolutions, compare_resolutions);
last = g_list_last (resolutions);
if (last)
- {
- self->params->selected_resolution = wfd_resolution_copy ((WfdResolution *) last->data);
- }
+ self->params->selected_resolution = wfd_resolution_copy ((WfdResolution *) last->data);
else
{
#endif
@@ -191,8 +187,8 @@ cc_client_select_codec_and_resolution (CCClient *self, WfdH264ProfileFlags profi
gboolean
cc_client_configure_client_media (GstRTSPClient * client,
- GstRTSPMedia * media, GstRTSPStream * stream,
- GstRTSPContext * ctx)
+ GstRTSPMedia * media, GstRTSPStream * stream,
+ GstRTSPContext * ctx)
{
CCClient *self = CC_CLIENT (client);
@@ -289,8 +285,8 @@ cc_client_idle_set_params (gpointer user_data)
GstRTSPFilterResult
cc_client_touch_session_filter_func (GstRTSPClient *client,
- GstRTSPSession *sess,
- gpointer user_data)
+ GstRTSPSession *sess,
+ gpointer user_data)
{
gst_rtsp_session_touch (sess);
@@ -366,15 +362,13 @@ cc_client_make_path_from_uri (GstRTSPClient * client, const GstRTSPUrl * uri)
return g_strdup (uri->abspath);
}
else
- {
- return GST_RTSP_CLIENT_CLASS (cc_client_parent_class)->make_path_from_uri (client, uri);
- }
+ return GST_RTSP_CLIENT_CLASS (cc_client_parent_class)->make_path_from_uri (client, uri);
}
GstRTSPFilterResult
cc_client_timeout_session_filter_func (GstRTSPClient *client,
- GstRTSPSession *sess,
- gpointer user_data)
+ GstRTSPSession *sess,
+ gpointer user_data)
{
GstRTSPMessage msg = { 0 };
@@ -456,9 +450,7 @@ cc_client_params_set (GstRTSPClient *client, GstRTSPContext *ctx)
{
/* Force a key unit event. */
if (self->media_quirks & WFD_QUIRK_NO_IDR)
- {
- g_debug ("Cannot force key frame as the pipeline doesn't support it!");
- }
+ g_debug ("Cannot force key frame as the pipeline doesn't support it!");
else if (self->media)
{
GstRTSPStream *stream;
@@ -476,14 +468,10 @@ cc_client_params_set (GstRTSPClient *client, GstRTSPContext *ctx)
gst_pad_send_event (srcpad, g_steal_pointer (&event));
}
else
- {
- g_debug ("Cannot force key frame currently, no media!");
- }
+ g_debug ("Cannot force key frame currently, no media!");
}
else
- {
- g_debug ("Ignoring unknown parameter %s", option);
- }
+ g_debug ("Ignoring unknown parameter %s", option);
}
return GST_RTSP_OK;
@@ -539,9 +527,7 @@ cc_client_pre_options_request (GstRTSPClient *client, GstRTSPContext *ctx)
self->init_state = INIT_STATE_DONE;
}
else
- {
- g_idle_add (cc_client_idle_cc_query_params, g_object_ref (client));
- }
+ g_idle_add (cc_client_idle_cc_query_params, g_object_ref (client));
}
return GST_RTSP_STS_OK;
diff --git a/src/cc/cc-client.h b/src/cc/cc-client.h
index 5a4c291..3384ca1 100644
--- a/src/cc/cc-client.h
+++ b/src/cc/cc-client.h
@@ -14,8 +14,8 @@ G_DECLARE_FINAL_TYPE (CCClient, cc_client, CC, CLIENT, GstRTSPClient)
CCClient * cc_client_new (void);
void cc_client_query_support (CCClient *self);
-void cc_client_trigger_method (CCClient *self,
- const gchar *method);
+void cc_client_trigger_method (CCClient *self,
+ const gchar *method);
G_END_DECLS
diff --git a/src/nd-cc-provider.c b/src/nd-cc-provider.c
index ad34118..d3f0dac 100644
--- a/src/nd-cc-provider.c
+++ b/src/nd-cc-provider.c
@@ -26,10 +26,10 @@
struct _NdCCProvider
{
- GObject parent_instance;
+ GObject parent_instance;
- GPtrArray *sinks;
- GaClient *avahi_client;
+ GPtrArray *sinks;
+ GaClient *avahi_client;
GSocketClient *signalling_client;
// GSocketService *signalling_server;
@@ -37,8 +37,7 @@ struct _NdCCProvider
gboolean discover;
};
-enum
-{
+enum {
PROP_CLIENT = 1,
PROP_DISCOVER,
@@ -46,81 +45,82 @@ enum
PROP_LAST = PROP_DISCOVER,
};
-static void nd_cc_provider_provider_iface_init(NdProviderIface *iface);
-static GList *nd_cc_provider_provider_get_sinks(NdProvider *provider);
+static void nd_cc_provider_provider_iface_init (NdProviderIface *iface);
+static GList *nd_cc_provider_provider_get_sinks (NdProvider *provider);
-G_DEFINE_TYPE_EXTENDED(NdCCProvider, nd_cc_provider, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE(ND_TYPE_PROVIDER,
- nd_cc_provider_provider_iface_init);)
+G_DEFINE_TYPE_EXTENDED (NdCCProvider, nd_cc_provider, G_TYPE_OBJECT, 0,
+ G_IMPLEMENT_INTERFACE (ND_TYPE_PROVIDER,
+ nd_cc_provider_provider_iface_init);
+ )
static GParamSpec *props[PROP_LAST] = {
- NULL,
+ NULL,
};
static void
-nd_cc_provider_get_property(GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+nd_cc_provider_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- NdCCProvider *provider = ND_CC_PROVIDER(object);
+ NdCCProvider *provider = ND_CC_PROVIDER (object);
switch (prop_id)
- {
- case PROP_CLIENT:
- g_assert(provider->avahi_client == NULL);
- g_value_set_object(value, provider->avahi_client);
- break;
-
- case PROP_DISCOVER:
- g_value_set_boolean(value, provider->discover);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
- break;
- }
+ {
+ case PROP_CLIENT:
+ g_assert (provider->avahi_client == NULL);
+ g_value_set_object (value, provider->avahi_client);
+ break;
+
+ case PROP_DISCOVER:
+ g_value_set_boolean (value, provider->discover);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
}
static void
-nd_cc_provider_set_property(GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+nd_cc_provider_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- NdCCProvider *provider = ND_CC_PROVIDER(object);
+ NdCCProvider *provider = ND_CC_PROVIDER (object);
switch (prop_id)
- {
- case PROP_CLIENT:
- /* Construct only */
- provider->avahi_client = g_value_dup_object(value);
- break;
-
- case PROP_DISCOVER:
- provider->discover = g_value_get_boolean(value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
- break;
- }
+ {
+ case PROP_CLIENT:
+ /* Construct only */
+ provider->avahi_client = g_value_dup_object (value);
+ break;
+
+ case PROP_DISCOVER:
+ provider->discover = g_value_get_boolean (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
}
static void
-nd_cc_provider_finalize(GObject *object)
+nd_cc_provider_finalize (GObject *object)
{
- NdCCProvider *provider = ND_CC_PROVIDER(object);
+ NdCCProvider *provider = ND_CC_PROVIDER (object);
GError *error;
- g_clear_pointer(&provider->sinks, g_ptr_array_unref);
+ g_clear_pointer (&provider->sinks, g_ptr_array_unref);
if (provider->signalling_client)
- {
- if (!g_socket_close((GSocket *)provider->signalling_client, &error))
- g_warning("NdCCProvider: Error closing signalling client socket: %s", error->message);
- g_object_unref(provider->signalling_client);
- }
+ {
+ if (!g_socket_close ((GSocket *) provider->signalling_client, &error))
+ g_warning ("NdCCProvider: Error closing signalling client socket: %s", error->message);
+ g_object_unref (provider->signalling_client);
+ }
// if (provider->signalling_server)
// {
@@ -129,141 +129,141 @@ nd_cc_provider_finalize(GObject *object)
// g_object_unref(provider->signalling_server);
// }
- G_OBJECT_CLASS(nd_cc_provider_parent_class)->finalize(object);
+ G_OBJECT_CLASS (nd_cc_provider_parent_class)->finalize (object);
}
static void
-nd_cc_provider_class_init(NdCCProviderClass *klass)
+nd_cc_provider_class_init (NdCCProviderClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = nd_cc_provider_get_property;
object_class->set_property = nd_cc_provider_set_property;
object_class->finalize = nd_cc_provider_finalize;
props[PROP_CLIENT] =
- g_param_spec_object("client", "Client",
- "The AvahiClient used to find sinks.",
- GA_TYPE_CLIENT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+ g_param_spec_object ("client", "Client",
+ "The AvahiClient used to find sinks.",
+ GA_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
- g_object_class_install_properties(object_class, PROP_LAST, props);
+ g_object_class_install_properties (object_class, PROP_LAST, props);
- g_object_class_override_property(object_class, PROP_DISCOVER, "discover");
+ g_object_class_override_property (object_class, PROP_DISCOVER, "discover");
}
static void
-resolver_found_cb(GaServiceResolver *resolver,
- AvahiIfIndex iface,
- GaProtocol proto,
- gchar *name,
- gchar *type,
- gchar *domain,
- gchar *hostname,
- AvahiAddress *addr,
- gint port,
- AvahiStringList *txt,
- GaLookupResultFlags flags,
- NdCCProvider *provider)
+resolver_found_cb (GaServiceResolver *resolver,
+ AvahiIfIndex iface,
+ GaProtocol proto,
+ gchar *name,
+ gchar *type,
+ gchar *domain,
+ gchar *hostname,
+ AvahiAddress *addr,
+ gint port,
+ AvahiStringList *txt,
+ GaLookupResultFlags flags,
+ NdCCProvider *provider)
{
NdCCSink *sink = NULL;
gchar address[AVAHI_ADDRESS_STR_MAX];
- g_debug("NdCCProvider: Found sink %s at %s:%d on interface %i", name, hostname, port, iface);
+ g_debug ("NdCCProvider: Found sink %s at %s:%d on interface %i", name, hostname, port, iface);
- if (avahi_address_snprint(address, sizeof(address), addr) == NULL)
- g_warning("NdCCProvider: Failed to convert AvahiAddress to string");
+ if (avahi_address_snprint (address, sizeof (address), addr) == NULL)
+ g_warning ("NdCCProvider: Failed to convert AvahiAddress to string");
- g_debug("NdCCProvider: Resolved %s to %s", hostname, address);
+ g_debug ("NdCCProvider: Resolved %s to %s", hostname, address);
- sink = nd_cc_sink_new(provider->signalling_client, name, address);
+ sink = nd_cc_sink_new (provider->signalling_client, name, address);
- g_object_unref(resolver);
+ g_object_unref (resolver);
- g_ptr_array_add(provider->sinks, sink);
- g_signal_emit_by_name(provider, "sink-added", sink);
+ g_ptr_array_add (provider->sinks, sink);
+ g_signal_emit_by_name (provider, "sink-added", sink);
}
static void
-resolver_failure_cb(GaServiceResolver *resolver,
- GError *error,
- NdCCProvider *provider)
+resolver_failure_cb (GaServiceResolver *resolver,
+ GError *error,
+ NdCCProvider *provider)
{
- g_warning("NdCCProvider: Failed to resolve Avahi service: %s", error->message);
- g_object_unref(resolver);
+ g_warning ("NdCCProvider: Failed to resolve Avahi service: %s", error->message);
+ g_object_unref (resolver);
}
static void
-service_added_cb(GaServiceBrowser *browser,
- AvahiIfIndex iface,
- GaProtocol proto,
- gchar *name,
- gchar *type,
- gchar *domain,
- GaLookupResultFlags flags,
- NdCCProvider *provider)
+service_added_cb (GaServiceBrowser *browser,
+ AvahiIfIndex iface,
+ GaProtocol proto,
+ gchar *name,
+ gchar *type,
+ gchar *domain,
+ GaLookupResultFlags flags,
+ NdCCProvider *provider)
{
GaServiceResolver *resolver;
GError *error = NULL;
- resolver = ga_service_resolver_new(iface,
- proto,
- name,
- type,
- domain,
- GA_PROTOCOL_INET,
- GA_LOOKUP_NO_FLAGS);
-
- g_signal_connect(resolver,
- "found",
- (GCallback)resolver_found_cb,
- provider);
-
- g_signal_connect(resolver,
- "failure",
- (GCallback)resolver_failure_cb,
- provider);
-
- if (!ga_service_resolver_attach(resolver,
- provider->avahi_client,
- &error))
- {
- g_warning("NdCCProvider: Failed to attach Avahi resolver: %s", error->message);
- g_error_free(error);
- }
+ resolver = ga_service_resolver_new (iface,
+ proto,
+ name,
+ type,
+ domain,
+ GA_PROTOCOL_INET,
+ GA_LOOKUP_NO_FLAGS);
+
+ g_signal_connect (resolver,
+ "found",
+ (GCallback) resolver_found_cb,
+ provider);
+
+ g_signal_connect (resolver,
+ "failure",
+ (GCallback) resolver_failure_cb,
+ provider);
+
+ if (!ga_service_resolver_attach (resolver,
+ provider->avahi_client,
+ &error))
+ {
+ g_warning ("NdCCProvider: Failed to attach Avahi resolver: %s", error->message);
+ g_error_free (error);
+ }
}
static void
-service_removed_cb(GaServiceBrowser *browser,
- AvahiIfIndex iface,
- GaProtocol proto,
- gchar *name,
- gchar *type,
- gchar *domain,
- GaLookupResultFlags flags,
- NdCCProvider *provider)
+service_removed_cb (GaServiceBrowser *browser,
+ AvahiIfIndex iface,
+ GaProtocol proto,
+ gchar *name,
+ gchar *type,
+ gchar *domain,
+ GaLookupResultFlags flags,
+ NdCCProvider *provider)
{
- g_debug("NdCCProvider: mDNS service \"%s\" removed from interface %i", name, iface);
+ g_debug ("NdCCProvider: mDNS service \"%s\" removed from interface %i", name, iface);
for (gint i = 0; i < provider->sinks->len; i++)
- {
- g_autoptr(NdCCSink) sink = g_object_ref(g_ptr_array_index(provider->sinks, i));
-
- NdSinkState state = nd_cc_sink_get_state(sink);
- if (state == ND_SINK_STATE_WAIT_STREAMING ||
- state == ND_SINK_STATE_STREAMING)
- continue;
-
- gchar *remote_name = NULL;
- g_object_get(sink, "name", &remote_name, NULL);
- if (remote_name == name)
{
- g_debug("NdCCProvider: Removing sink");
- g_ptr_array_remove_index(provider->sinks, i);
- g_signal_emit_by_name(provider, "sink-removed", sink);
- break;
+ g_autoptr(NdCCSink) sink = g_object_ref (g_ptr_array_index (provider->sinks, i));
+
+ NdSinkState state = nd_cc_sink_get_state (sink);
+ if (state == ND_SINK_STATE_WAIT_STREAMING ||
+ state == ND_SINK_STATE_STREAMING)
+ continue;
+
+ gchar *remote_name = NULL;
+ g_object_get (sink, "name", &remote_name, NULL);
+ if (remote_name == name)
+ {
+ g_debug ("NdCCProvider: Removing sink");
+ g_ptr_array_remove_index (provider->sinks, i);
+ g_signal_emit_by_name (provider, "sink-removed", sink);
+ break;
+ }
}
- }
}
// // TODO: msg receiving callback
@@ -295,14 +295,14 @@ service_removed_cb(GaServiceBrowser *browser,
// TODO: is GThreadedSocketService required?
static void
-nd_cc_provider_init(NdCCProvider *provider)
+nd_cc_provider_init (NdCCProvider *provider)
{
// g_autoptr(GError) error = NULL;
// GSocketService *server;
provider->discover = TRUE;
- provider->sinks = g_ptr_array_new_with_free_func(g_object_unref);
- provider->signalling_client = g_socket_client_new();
+ provider->sinks = g_ptr_array_new_with_free_func (g_object_unref);
+ provider->signalling_client = g_socket_client_new ();
// server = g_socket_service_new();
// g_socket_listener_add_inet_port((GSocketListener *)server,
@@ -328,39 +328,39 @@ nd_cc_provider_init(NdCCProvider *provider)
}
/******************************************************************
- * NdProvider interface implementation
- ******************************************************************/
+* NdProvider interface implementation
+******************************************************************/
static void
-nd_cc_provider_provider_iface_init(NdProviderIface *iface)
+nd_cc_provider_provider_iface_init (NdProviderIface *iface)
{
iface->get_sinks = nd_cc_provider_provider_get_sinks;
}
static GList *
-nd_cc_provider_provider_get_sinks(NdProvider *provider)
+nd_cc_provider_provider_get_sinks (NdProvider *provider)
{
- NdCCProvider *cc_provider = ND_CC_PROVIDER(provider);
+ NdCCProvider *cc_provider = ND_CC_PROVIDER (provider);
GList *res = NULL;
for (gint i = 0; i < cc_provider->sinks->len; i++)
- res = g_list_prepend(res, g_ptr_array_index(cc_provider->sinks, i));
+ res = g_list_prepend (res, g_ptr_array_index (cc_provider->sinks, i));
return res;
}
/******************************************************************
- * NdCCProvider public functions
- ******************************************************************/
+* NdCCProvider public functions
+******************************************************************/
GaClient *
-nd_cc_provider_get_client(NdCCProvider *provider)
+nd_cc_provider_get_client (NdCCProvider *provider)
{
return provider->avahi_client;
}
GSocketClient *
-nd_cc_provider_get_signalling_client(NdCCProvider *provider)
+nd_cc_provider_get_signalling_client (NdCCProvider *provider)
{
return provider->signalling_client;
}
@@ -372,43 +372,43 @@ nd_cc_provider_get_signalling_client(NdCCProvider *provider)
// }
NdCCProvider *
-nd_cc_provider_new(GaClient *client)
+nd_cc_provider_new (GaClient *client)
{
- return g_object_new(ND_TYPE_CC_PROVIDER,
- "client", client,
- NULL);
+ return g_object_new (ND_TYPE_CC_PROVIDER,
+ "client", client,
+ NULL);
}
gboolean
-nd_cc_provider_browse(NdCCProvider *provider, GError *error)
+nd_cc_provider_browse (NdCCProvider *provider, GError *error)
{
GaServiceBrowser *avahi_browser;
- avahi_browser = ga_service_browser_new("_googlecast._tcp");
+ avahi_browser = ga_service_browser_new ("_googlecast._tcp");
if (provider->avahi_client == NULL)
- {
- g_warning("NdCCProvider: No Avahi client found");
- return FALSE;
- }
-
- g_signal_connect(avahi_browser,
- "new-service",
- (GCallback)service_added_cb,
- provider);
-
- g_signal_connect(avahi_browser,
- "removed-service",
- (GCallback)service_removed_cb,
- provider);
-
- if (!ga_service_browser_attach(avahi_browser,
- provider->avahi_client,
- &error))
- {
- g_warning("NdCCProvider: Failed to attach Avahi Service Browser: %s", error->message);
- return FALSE;
- }
+ {
+ g_warning ("NdCCProvider: No Avahi client found");
+ return FALSE;
+ }
+
+ g_signal_connect (avahi_browser,
+ "new-service",
+ (GCallback) service_added_cb,
+ provider);
+
+ g_signal_connect (avahi_browser,
+ "removed-service",
+ (GCallback) service_removed_cb,
+ provider);
+
+ if (!ga_service_browser_attach (avahi_browser,
+ provider->avahi_client,
+ &error))
+ {
+ g_warning ("NdCCProvider: Failed to attach Avahi Service Browser: %s", error->message);
+ return FALSE;
+ }
return TRUE;
}
diff --git a/src/nd-cc-sink.h b/src/nd-cc-sink.h
index 5f3a0fd..1c59914 100644
--- a/src/nd-cc-sink.h
+++ b/src/nd-cc-sink.h
@@ -27,9 +27,9 @@ G_BEGIN_DECLS
#define ND_TYPE_CC_SINK (nd_cc_sink_get_type ())
G_DECLARE_FINAL_TYPE (NdCCSink, nd_cc_sink, ND, CC_SINK, GObject)
-NdCCSink * nd_cc_sink_new (GSocketClient *client,
- gchar *name,
- gchar *remote_address);
+NdCCSink * nd_cc_sink_new (GSocketClient * client,
+ gchar * name,
+ gchar * remote_address);
NdSinkState nd_cc_sink_get_state (NdCCSink *sink);
diff --git a/src/nd-meta-sink.c b/src/nd-meta-sink.c
index b413d59..22a0b26 100644
--- a/src/nd-meta-sink.c
+++ b/src/nd-meta-sink.c
@@ -104,9 +104,7 @@ nd_meta_sink_update (NdMetaSink *meta_sink)
g_debug ("MetaSink: Priority sink updated. Priority: %i", best_priority);
}
else
- {
- g_debug ("MetaSink: No usable sink is left, object has become invalid.");
- }
+ g_debug ("MetaSink: No usable sink is left, object has become invalid.");
/* Notify the pass-through properties */
g_object_notify (G_OBJECT (meta_sink), "display-name");
diff --git a/src/nd-wfd-mice-provider.c b/src/nd-wfd-mice-provider.c
index 1b68d46..8732f04 100644
--- a/src/nd-wfd-mice-provider.c
+++ b/src/nd-wfd-mice-provider.c
@@ -109,6 +109,7 @@ static void
nd_wfd_mice_provider_finalize (GObject *object)
{
NdWFDMiceProvider *provider = ND_WFD_MICE_PROVIDER (object);
+
g_clear_pointer (&provider->sinks, g_ptr_array_unref);
g_clear_object (&provider->avahi_client);
g_clear_object (&provider->signalling_server);
diff --git a/src/nd-wfd-mice-sink.c b/src/nd-wfd-mice-sink.c
index d91f6fd..b36b3fc 100644
--- a/src/nd-wfd-mice-sink.c
+++ b/src/nd-wfd-mice-sink.c
@@ -533,8 +533,8 @@ nd_wfd_mice_sink_sink_stop_stream (NdSink *sink)
******************************************************************/
NdWFDMiceSink *
-nd_wfd_mice_sink_new (gchar *name,
- gchar *remote_address)
+nd_wfd_mice_sink_new (gchar *name,
+ gchar *remote_address)
{
return g_object_new (ND_TYPE_WFD_MICE_SINK,
"name", name,
diff --git a/src/wfd/wfd-client.c b/src/wfd/wfd-client.c
index 5ef36c0..4a87ab8 100644
--- a/src/wfd/wfd-client.c
+++ b/src/wfd/wfd-client.c
@@ -141,9 +141,7 @@ wfd_client_select_codec_and_resolution (WfdClient *self, WfdH264ProfileFlags pro
#if 0
/* The native resolution reported by some devices is just useless */
if (codec->native)
- {
- self->params->selected_resolution = wfd_resolution_copy (codec->native);
- }
+ self->params->selected_resolution = wfd_resolution_copy (codec->native);
else
{
/* Find a good resolution. */
@@ -154,9 +152,7 @@ wfd_client_select_codec_and_resolution (WfdClient *self, WfdH264ProfileFlags pro
resolutions = g_list_sort (resolutions, compare_resolutions);
last = g_list_last (resolutions);
if (last)
- {
- self->params->selected_resolution = wfd_resolution_copy ((WfdResolution *) last->data);
- }
+ self->params->selected_resolution = wfd_resolution_copy ((WfdResolution *) last->data);
else
{
#endif
@@ -364,9 +360,7 @@ wfd_client_make_path_from_uri (GstRTSPClient * client, const GstRTSPUrl * uri)
return g_strdup (uri->abspath);
}
else
- {
- return GST_RTSP_CLIENT_CLASS (wfd_client_parent_class)->make_path_from_uri (client, uri);
- }
+ return GST_RTSP_CLIENT_CLASS (wfd_client_parent_class)->make_path_from_uri (client, uri);
}
GstRTSPFilterResult
@@ -452,9 +446,7 @@ wfd_client_params_set (GstRTSPClient *client, GstRTSPContext *ctx)
{
/* Force a key unit event. */
if (self->media_quirks & WFD_QUIRK_NO_IDR)
- {
- g_debug ("Cannot force key frame as the pipeline doesn't support it!");
- }
+ g_debug ("Cannot force key frame as the pipeline doesn't support it!");
else if (self->media)
{
GstRTSPStream *stream;
@@ -472,14 +464,10 @@ wfd_client_params_set (GstRTSPClient *client, GstRTSPContext *ctx)
gst_pad_send_event (srcpad, g_steal_pointer (&event));
}
else
- {
- g_debug ("Cannot force key frame currently, no media!");
- }
+ g_debug ("Cannot force key frame currently, no media!");
}
else
- {
- g_debug ("Ignoring unknown parameter %s", option);
- }
+ g_debug ("Ignoring unknown parameter %s", option);
}
return GST_RTSP_OK;
@@ -535,9 +523,7 @@ wfd_client_pre_options_request (GstRTSPClient *client, GstRTSPContext *ctx)
self->init_state = INIT_STATE_DONE;
}
else
- {
- g_idle_add (wfd_client_idle_wfd_query_params, g_object_ref (client));
- }
+ g_idle_add (wfd_client_idle_wfd_query_params, g_object_ref (client));
}
return GST_RTSP_STS_OK;
diff --git a/src/wfd/wfd-media-factory.c b/src/wfd/wfd-media-factory.c
index 956ad56..fa25e40 100644
--- a/src/wfd/wfd-media-factory.c
+++ b/src/wfd/wfd-media-factory.c
@@ -578,9 +578,7 @@ wfd_configure_media_element (GstBin *bin, WfdParams *params)
}
if (profile == WFD_H264_PROFILE_HIGH)
- {
- caps_codecfilter = gst_caps_from_string ("video/x-h264,stream-format=byte-stream,profile=high");
- }
+ caps_codecfilter = gst_caps_from_string ("video/x-h264,stream-format=byte-stream,profile=high");
else
{
/* Permit both constrained-baseline and baseline. Would constrained-baseline be sufficient? */
diff --git a/src/wfd/wfd-params.c b/src/wfd/wfd-params.c
index f9d748c..0d0e990 100644
--- a/src/wfd/wfd-params.c
+++ b/src/wfd/wfd-params.c
@@ -267,9 +267,7 @@ wfd_params_from_sink (WfdParams *self, const guint8 *body, gsize body_size)
g_ptr_array_add (self->video_codecs, g_steal_pointer (&codec));
}
else
- {
- g_warning ("WfdParams: Could not parse codec descriptor: %s", *codec_descriptor);
- }
+ g_warning ("WfdParams: Could not parse codec descriptor: %s", *codec_descriptor);
}
}
else if (g_str_equal (option, "wfd_audio_codecs"))
@@ -299,9 +297,7 @@ wfd_params_from_sink (WfdParams *self, const guint8 *body, gsize body_size)
g_ptr_array_add (self->audio_codecs, g_steal_pointer (&codec));
}
else
- {
- g_warning ("WfdParams: Could not parse codec descriptor: %s", *codec_descriptor);
- }
+ g_warning ("WfdParams: Could not parse codec descriptor: %s", *codec_descriptor);
}
}
else if (g_str_equal (option, "wfd_display_edid"))
@@ -342,10 +338,8 @@ wfd_params_from_sink (WfdParams *self, const guint8 *body, gsize body_size)
}
}
else if (g_str_equal (option, "wfd_idr_request_capability"))
- {
- /* Assume IDR request capable if it is the string one */
- self->idr_request_capability = g_str_equal (value, "1");
- }
+ /* Assume IDR request capable if it is the string one */
+ self->idr_request_capability = g_str_equal (value, "1");
else if (g_str_equal (option, "microsoft_cursor"))
{
g_auto(GStrv) split_value = NULL;
@@ -375,8 +369,6 @@ wfd_params_from_sink (WfdParams *self, const guint8 *body, gsize body_size)
g_warning ("WfdParams: microsoft_cursor extension has odd values: \"%s\"", value);
}
else
- {
- g_debug ("WfdParams: Not handling option %s", option);
- }
+ g_debug ("WfdParams: Not handling option %s", option);
}
}
diff --git a/src/wfd/wfd-video-codec.c b/src/wfd/wfd-video-codec.c
index b7147cd..3f6d5b3 100644
--- a/src/wfd/wfd-video-codec.c
+++ b/src/wfd/wfd-video-codec.c
@@ -112,9 +112,7 @@ resolution_table_lookup (gint table, guint offset)
length = G_N_ELEMENTS (vesa_resolutions);
}
else
- {
- g_return_val_if_reached (NULL);
- }
+ g_return_val_if_reached (NULL);
if (offset < length)
return &resolutions[offset];
@@ -144,9 +142,7 @@ sup_for_resolution (gint table, const WfdResolution *resolution)
length = G_N_ELEMENTS (vesa_resolutions);
}
else
- {
- g_return_val_if_reached (0);
- }
+ g_return_val_if_reached (0);
for (gint i = 0; i < length; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]