可自定义codec

This commit is contained in:
xiongziliang
2020-05-11 12:06:15 +08:00
parent 7acc2bbbc5
commit 41f1df3acf
2 changed files with 6 additions and 4 deletions

View File

@@ -19,14 +19,15 @@ namespace mediakit{
class RtpDecoder {
public:
RtpDecoder();
RtpDecoder(const char *codec = "MP2P");
virtual ~RtpDecoder();
protected:
void decodeRtp(const void *data, int bytes);
protected:
virtual void onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestamp, int flags) = 0;
private:
void *_rtp_decoder = nullptr;
BufferRaw::Ptr _buffer;
string _codec;
};
}//namespace mediakit