Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
static int NumberOfCodecs();
static int Codec(int, CodecInst*);
static int Codec(const char*, CodecInst*, int, size_t);
static int Codec(const char*, int, size_t);
absl::optional<CodecInst> SendCodec() const;
bool RegisterReceiveCodec(int, const SdpAudioFormat&);
int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
int UnregisterReceiveCodec(uint8_t);
int32_t ReceiveCodec(CodecInst*);
absl::optional<SdpAudioFormat> ReceiveFormat();
As well as this method on RtpRtcp module:
int32_t RegisterSendPayload(const CodecInst&);
Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
diff --git a/audio/channel_receive.h b/audio/channel_receive.h
index 9027623..6bbf990 100644
--- a/audio/channel_receive.h
+++ b/audio/channel_receive.h
@@ -13,6 +13,7 @@
#include <map>
#include <memory>
+#include <utility>
#include <vector>
#include "absl/types/optional.h"
@@ -79,7 +80,9 @@
virtual void StartPlayout() = 0;
virtual void StopPlayout() = 0;
- virtual bool GetRecCodec(CodecInst* codec) const = 0;
+ // Payload type and format of last received RTP packet, if any.
+ virtual absl::optional<std::pair<int, SdpAudioFormat>>
+ GetReceiveCodec() const = 0;
virtual bool ReceivedRTCPPacket(const uint8_t* data, size_t length) = 0;