From c9d389ce147a9468b36322ac75cec6f315ea5f83 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 3 Sep 2026 13:56:52 -0400 Subject: [PATCH] MT#65420 add format_supported callback Change-Id: I154f7e27a0d60deced9ee06f688b0a5f76c7de84 --- lib/codeclib.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/codeclib.h b/lib/codeclib.h index 43137859a..b6dcd9742 100644 --- a/lib/codeclib.h +++ b/lib/codeclib.h @@ -114,6 +114,7 @@ typedef void select_decoder_format_f(decoder_t *, const struct rtp_codec_format typedef bool format_parse_f(struct rtp_codec_format *, const str *fmtp); typedef void format_answer_f(struct rtp_payload_type *, const struct rtp_payload_type *); +typedef bool format_supported_f(const struct rtp_payload_type *); typedef const struct { void (*init)(encoder_t *); @@ -210,6 +211,7 @@ struct codec_def_s { format_cmp_f *format_cmp; format_print_f *format_print; format_answer_f *format_answer; + format_supported_f *format_supported; packetizer_t *packetizer; select_encoder_format_f *select_encoder_format; select_decoder_format_f *select_decoder_format; @@ -578,6 +580,8 @@ INLINE bool codec_supported(const struct rtp_payload_type *pt) { return false; if (!pt->codec_def->support_encoding || !pt->codec_def->support_decoding) return false; + if (pt->codec_def->format_supported) + return pt->codec_def->format_supported(pt); return true; }