diff --git a/include/rtc/description.hpp b/include/rtc/description.hpp index b89838a53..b06014fd9 100644 --- a/include/rtc/description.hpp +++ b/include/rtc/description.hpp @@ -233,13 +233,15 @@ class RTC_CPP_EXPORT Description { Audio(string mid = "audio", Direction dir = Direction::SendOnly); void addAudioCodec(int payloadType, string codec, optional profile = std::nullopt); - void addOpusCodec(int payloadType, optional profile = DEFAULT_OPUS_AUDIO_PROFILE); - void addPCMACodec(int payloadType, optional profile = std::nullopt); - void addPCMUCodec(int payloadType, optional profile = std::nullopt); - void addAacCodec(int payloadType, optional profile = std::nullopt); + void addAACCodec(int payloadType, optional profile = std::nullopt); + + [[deprecated("Use addAACCodec")]] inline void + addAacCodec(int payloadType, optional profile = std::nullopt) { + addAACCodec(payloadType, std::move(profile)); + }; }; class RTC_CPP_EXPORT Video : public Media { diff --git a/src/capi.cpp b/src/capi.cpp index b316422f2..ce0cb77f6 100644 --- a/src/capi.cpp +++ b/src/capi.cpp @@ -1081,7 +1081,7 @@ int rtcAddTrackEx(int pc, const rtcTrackInit *init) { audio->addPCMACodec(pt, profile); break; case RTC_CODEC_AAC: - audio->addAacCodec(pt, profile); + audio->addAACCodec(pt, profile); break; default: break; diff --git a/src/description.cpp b/src/description.cpp index 3f179fc35..f7910e390 100644 --- a/src/description.cpp +++ b/src/description.cpp @@ -1187,7 +1187,7 @@ void Description::Audio::addPCMUCodec(int payloadType, optional profile) addAudioCodec(payloadType, "PCMU", profile); } -void Description::Audio::addAacCodec(int payloadType, optional profile) { +void Description::Audio::addAACCodec(int payloadType, optional profile) { if (profile) { addAudioCodec(payloadType, "MP4A-LATM", profile); } else {