目录
1、引言
好的,各位观众老爷,今天我们来分析一下CCodecBufferChannel,众所周知BufferChannelBase是用来管理Buffer回调的,不论是之前的ACodec还会如今的CCodec,都是实现BufferChannelBase进行操作。
话不过多说,我们进入正题:
CCodecBufferChannel目录如下:
frameworks/av/media/codec2/sfplugin
具体的类定义如下:
class CCodecBufferChannel
: public BufferChannelBase, public std::enable_shared_from_this<CCodecBufferChannel> {
public:
//构造函数,传入CCodecCallback的对象,给mCCodecCallback赋值
explicit CCodecBufferChannel(const std::shared_ptr<CCodecCallback> &callback);
virtual ~CCodecBufferChannel();
// BufferChannelBase interface
void setCrypto(const sp<ICrypto> &crypto) override;
void setDescrambler(const sp<IDescrambler> &descrambler) override;
//清流的Buffer
virtual status_t queueInputBuffer(const sp<MediaCodecBuffer> &buffer) override;