#pragma once

#include <memory>
#include <vector>

#include "core/memory/MemoryPool.h"
#include "message_bus/pipeline/stages/1_framers/IFramer.h"

namespace softbus::message_bus::pipeline::stages::framers
{

/// 将单个 StreamChunk 拷贝为 CompleteFrame（整帧生命周期由新池块持有）。
class PassthroughFramer final : public IFramer
{
public:
    explicit PassthroughFramer(std::shared_ptr<softbus::core::memory::MemoryPool> pool);

    void feed(softbus::message_bus::pipeline::PipelineContext&           chunkIn,
              std::vector<softbus::message_bus::pipeline::PipelineContext>& completeFramesOut) override;

private:
    std::shared_ptr<softbus::core::memory::MemoryPool> m_pool;
};

} // namespace softbus::message_bus::pipeline::stages::framers
