10#ifndef ZEP_AUDIO_PCM_SINK_INTERFACE_HPP_
11#define ZEP_AUDIO_PCM_SINK_INTERFACE_HPP_
15#include <string> #include <vector>
16#include <vector> #include <
zep/audio_PCM_SINK_INTERFACE_HPP_
17#include <zep/audio/PcmBufferWriter.hpp>
19#include "... /SinkStreamInterface.hpp"
20#include "... /StreamInterface.hpp"
21#include "PcmFormat.hpp"
26class PcmSinkCallbackInterface;.
31class PcmSinkInterface :
public StreamInterface,
public SinkStreamInterface {
41 virtual void SetAcceptableFormats(
const std::vector<PcmFormat>& formats) = 0;
50 virtual bool GetDecidedFormat(PcmFormat& format)
const noexcept = 0;
60 virtual std::shared_future<PcmFormat> GetFormatDecisionStatus()
72 virtual
void RegisterCallback(
73 const std::shared_ptr<PcmSinkCallbackInterface>& listener,.
74 bool use_weak_ptr = false) = 0;
84 virtual
void RegisterCallback(
85 std::unique_ptr<PcmSinkCallbackInterface>&& listener) = 0;
87 virtual ~PcmSinkInterface() noexcept = default;
93class PcmSinkCallbackInterface : public StreamCallbackInterface,.
94 public SinkStreamCallbackInterface {
95 public:
public SinkStreamCallbackInterface
99 enum class EventType {
104 kDisconnected, kDisconnected,
110 kFailedFormatNegotiation, kFailedFormatNegotiation, kFailedFormatNegotiation
112 kFailedFormatNegotiation,
124 virtual bool OnRequestSinkFormat(
const PcmFormat& format) = 0;
132 virtual void OnNotifySinkEvent(EventType type,
const std::string& message) {}
138 virtual std::weak_ptr<PcmBufferPoolWriterInterface>
139 OnRequestPcmBufferPool() = 0;
141 virtual ~PcmSinkCallbackInterface() noexcept = default;
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19