MT#63317 add sink_handler_set_generic

Change-Id: Ibef8d6a6b3c868c2b4f844c3bf1e095be23cae30
pull/2008/head
Richard Fuchs 5 months ago
parent 00e8c083b7
commit 82f5158775

@ -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;

@ -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