12#ifndef ROC_PIPELINE_SENDER_LOOP_H_
13#define ROC_PIPELINE_SENDER_LOOP_H_
50 class Task :
public PipelineTask {
52 friend class SenderLoop;
56 bool (SenderLoop::*
func_)(Task&);
145 virtual void pause();
156 virtual uint64_t
tid_imp()
const;
161 bool task_create_slot_(
Task&);
162 bool task_delete_slot_(
Task&);
163 bool task_query_slot_(
Task&);
164 bool task_add_endpoint_(
Task&);
172 const bool auto_duration_;
173 const bool auto_cts_;
Sample specification. Describes sample rate and channels.
Optionally constructed object.
uint64_t ticks_t
Number of ticks.
Pipeline task scheduler interface. PipelineLoop uses this interface to schedule asynchronous work....
virtual uint64_t tid_imp() const =0
Get current thread id.
virtual core::nanoseconds_t timestamp_imp() const =0
Get current time.
PipelineLoop(IPipelineTaskScheduler &scheduler, const PipelineLoopConfig &config, const audio::SampleSpec &sample_spec)
Initialization.
Base class for pipeline tasks.
SenderSlotMetrics * slot_metrics_
Output slot metrics.
size_t * party_count_
Input/output participant count.
address::SocketAddr outbound_address_
Destination address.
address::Protocol proto_
Protocol.
SenderSlotConfig slot_config_
Slot config.
SenderParticipantMetrics * party_metrics_
Output participant metrics.
packet::IWriter * outbound_writer_
Destination packet writer.
bool(SenderLoop::* func_)(Task &)
Task implementation method.
address::Interface iface_
Interface.
packet::IWriter * inbound_writer_
Inbound packet writer.
AddEndpoint(SlotHandle slot, address::Interface iface, address::Protocol proto, const address::SocketAddr &outbound_address, packet::IWriter &outbound_writer)
Set task parameters.
packet::IWriter * get_inbound_writer() const
Get packet writer for inbound packets for the endpoint.
CreateSlot(const SenderSlotConfig &slot_config)
Set task parameters.
SlotHandle get_handle() const
Get created slot handle.
DeleteSlot(SlotHandle slot)
Set task parameters.
QuerySlot(SlotHandle slot, SenderSlotMetrics &slot_metrics, SenderParticipantMetrics *party_metrics, size_t *party_count)
Set task parameters.
Subclasses for specific tasks.
sndio::ISink & sink()
Get sender sink.
SenderLoop(IPipelineTaskScheduler &scheduler, const SenderSinkConfig &sink_config, const rtp::EncodingMap &encoding_map, core::IPool &packet_pool, core::IPool &packet_buffer_pool, core::IPool &frame_buffer_pool, core::IArena &arena)
Initialize.
bool is_valid() const
Check if the pipeline was successfully constructed.
struct SlotHandle * SlotHandle
Opaque slot handle.
RTP encoding map. Thread-safe. Returned encodings are immutable and can be safely used from any threa...
virtual audio::SampleSpec sample_spec() const =0
Get sample specification of the device.
virtual bool has_clock() const =0
Check if the device has own clock.
virtual void pause()=0
Pause device.
virtual bool restart()=0
Restart device.
virtual core::nanoseconds_t latency() const =0
Get latency of the device.
virtual DeviceState state() const =0
Get device state.
virtual DeviceType type() const =0
Get device type.
virtual ISource * to_source()=0
Cast IDevice to ISink.
virtual bool has_latency() const =0
Check if the device supports latency reports.
virtual bool resume()=0
Resume device after pause.
virtual ISink * to_sink()=0
Cast IDevice to ISink.
int64_t nanoseconds_t
Nanoseconds.
Sender and receiver processing pipelines.
Base class for pipelines.
Sender-side metrics specific to one participant (remote receiver).
Parameters of sender sink and sender session.
Parameters of sender slot.
Sender-side metrics of the whole slot.