Browse Source

MT#55283 convert bit field to bool

Change-Id: If2acf3bacadaf83ebc3a02c7c1d71aaa6a90258b
pull/1918/head
Richard Fuchs 9 months ago
parent
commit
48e971398c
4 changed files with 12 additions and 11 deletions
  1. +2
    -2
      daemon/call.c
  2. +4
    -4
      daemon/codec.c
  3. +1
    -1
      daemon/redis.c
  4. +5
    -4
      include/media_socket.h

+ 2
- 2
daemon/call.c View File

@ -3112,7 +3112,7 @@ int monologue_offer_answer(struct call_monologue *monologues[2], sdp_streams_q *
struct media_subscription * ms = call_get_media_subscription(receiver_media->media_subscribers_ht, sender_media);
if (ms)
ms->attrs.transcoding = 0;
ms->attrs.transcoding = false;
__media_init_from_flags(sender_media, receiver_media, sp, flags);
@ -3690,7 +3690,7 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, sdp_ng_flags *flag
rev_ms = call_get_media_subscription(src_media->media_subscribers_ht, dst_media);
if (rev_ms)
rev_ms->attrs.transcoding = 0;
rev_ms->attrs.transcoding = false;
__media_init_from_flags(dst_media, NULL, sp, flags);


+ 4
- 4
daemon/codec.c View File

@ -1079,7 +1079,7 @@ void __codec_handlers_update(struct call_media *receiver, struct call_media *sin
STR_FMT_M(&other_monologue->tag), sink->index);
if (a.reset_transcoding && ms)
ms->attrs.transcoding = 0;
ms->attrs.transcoding = false;
MEDIA_CLEAR(receiver, GENERATOR);
MEDIA_CLEAR(sink, GENERATOR);
@ -1093,7 +1093,7 @@ void __codec_handlers_update(struct call_media *receiver, struct call_media *sin
if (proto_is(receiver->protocol, PROTO_UDPTL)) {
if (codec_handler_udptl_update(receiver, sink, a.flags)) {
if (a.reset_transcoding && ms)
ms->attrs.transcoding = 1;
ms->attrs.transcoding = true;
return;
}
}
@ -1109,7 +1109,7 @@ void __codec_handlers_update(struct call_media *receiver, struct call_media *sin
if (proto_is_not_rtp(sink->protocol)) {
if (codec_handler_non_rtp_update(receiver, sink, a.flags, a.sp)) {
if (a.reset_transcoding && ms)
ms->attrs.transcoding = 1;
ms->attrs.transcoding = true;
return;
}
}
@ -1483,7 +1483,7 @@ next:
if (is_transcoding) {
if (a.reset_transcoding && ms)
ms->attrs.transcoding = 1;
ms->attrs.transcoding = true;
for (__auto_type l = receiver->codecs.codec_prefs.head; l; ) {
rtp_payload_type *pt = l->data;


+ 1
- 1
daemon/redis.c View File

@ -1865,7 +1865,7 @@ static int json_link_streams(call_t *c, struct redis_list *streams,
struct media_subscription *ms = __find_media_subscriber(media, sink);
if (ms && ms->attrs.egress)
continue;
struct sink_attrs attrs = { .rtcp_only = (ms && ms->attrs.rtcp_only) ? 1 : 0 };
struct sink_attrs attrs = { .rtcp_only = !!(ms && ms->attrs.rtcp_only) };
__add_sink_handler(&ps->rtp_sinks, sink, &attrs);
}
g_queue_clear(&q);


+ 5
- 4
include/media_socket.h View File

@ -238,13 +238,14 @@ struct stream_fd {
};
struct sink_attrs {
// cannot be bit fields because G_STRUCT_OFFSET is used on them
bool block_media;
bool silence_media;
unsigned int offer_answer:1; // bidirectional, exclusive
unsigned int rtcp_only:1;
unsigned int transcoding:1;
unsigned int egress:1;
bool offer_answer:1; // bidirectional, exclusive
bool rtcp_only:1;
bool transcoding:1;
bool egress:1;
};
/**


Loading…
Cancel
Save