Browse Source

MT#63317 add sink_handler_set_generic

Change-Id: Ibef8d6a6b3c868c2b4f844c3bf1e095be23cae30
pull/2008/head
Richard Fuchs 4 months ago
parent
commit
82f5158775
2 changed files with 12 additions and 2 deletions
  1. +9
    -2
      daemon/media_socket.c
  2. +3
    -0
      include/media_socket.h

+ 9
- 2
daemon/media_socket.c View File

@ -2053,7 +2053,7 @@ void unkernelize(struct packet_stream *ps, const char *reason) {
}
// `out_media` can be NULL
// `out_media` can be NULL XXX streamline this to remove this exception
const struct streamhandler *determine_handler(const struct transport_protocol *in_proto,
struct call_media *out_media, bool must_recrypt)
{
@ -2086,8 +2086,15 @@ err:
return &__sh_noop;
}
// sh->sink must be set
void sink_handler_set_generic(struct sink_handler *sh) {
sh->handler = determine_handler(&transport_protocols[PROTO_RTP_AVP], sh->sink->media, true);
}
/* must be called with call->master_lock held in R, and in->lock held */
// `sh` can be null
// `sh` can be null XXX streamline this to remove this exception
const struct streamhandler *determine_sink_handler(struct packet_stream *in, struct sink_handler *sh) {
const struct transport_protocol *in_proto, *out_proto;
bool must_recrypt = false;


+ 3
- 0
include/media_socket.h View File

@ -355,6 +355,9 @@ __attribute__((nonnull(1)))
const struct streamhandler *determine_handler(const struct transport_protocol *in_proto,
struct call_media *out_media, bool must_recrypt);
__attribute__((nonnull(1)))
void sink_handler_set_generic(struct sink_handler *sh);
__attribute__((nonnull(2, 3)))
int media_packet_encrypt(rewrite_func encrypt_func, struct packet_stream *out, struct media_packet *mp);


Loading…
Cancel
Save