Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
zep::audio::PcmSourceInterface Class Referenceabstract

Audio source function interface with PCM. More...

#include <PcmSourceInterface.hpp>

Collaboration diagram for zep::audio::PcmSourceInterface:
Collaboration graph
[legend]

Public Member Functions

virtual void SetAcceptableFormats (const std::vector< PcmFormat > &formats)=0
 Provide a list of formats that can be sent.
 
virtual bool GetDecidedFormat (PcmFormat &format) const noexcept=0
 Get the determined formats.
 
virtual std::shared_future< PcmFormatGetFormatDecisionStatus () const noexcept=0
 Get shared_future to get the format decision status.
 
virtual std::weak_ptr< PcmBufferPoolWriterInterfaceGetPcmBufferPool ()=0
 Get the write side interface of the PCM buffer pool.
 
virtual void SendStatistics ()=0
 Sending statistics.
 
virtual void RegisterCallback (const std::shared_ptr< PcmSourceCallbackInterface > &listener,. bool use_weak_ptr=false)=0
 Register a callback destination in shared_ptr or weak_ptr.
 
virtual void RegisterCallback (std::unique_ptr< PcmSourceCallbackInterface > &&listener)=0
 Register the callback destination with unique_ptr.
 
virtual void SetAcceptableFormats (const std::vector< PcmFormat > &formats)=0
 送信可能なフォーマット一覧を提示する。
 
virtual bool GetDecidedFormat (PcmFormat &format) const noexcept=0
 決定したフォーマットを取得する。
 
virtual std::shared_future< PcmFormatGetFormatDecisionStatus () const noexcept=0
 フォーマット決定状態を取得するshared_futureを取得する。
 
virtual std::weak_ptr< PcmBufferPoolWriterInterfaceGetPcmBufferPool ()=0
 PCMバッファプールの書き込み側インターフェースを取得する。
 
virtual void SendStatistics ()=0
 統計情報の送信
 
virtual void RegisterCallback (const std::shared_ptr< PcmSourceCallbackInterface > &listener, bool use_weak_ptr=false)=0
 コールバックの送信先をshared_ptrまたはweak_ptrで登録する
 
virtual void RegisterCallback (std::unique_ptr< PcmSourceCallbackInterface > &&listener)=0
 コールバックの送信先をunique_ptrで登録する
 
virtual void SetTimestamp (const std::shared_ptr< TimestampInterface > &timestamp)=0
 Set the timestamp to be used for this stream.
 
virtual void SetTimestamp (const std::shared_ptr< TimestampInterface > &timestamp)=0
 このストリームで用いるタイムスタンプを設定する。
 
virtual bool GetStopSupplyStatus () const noexcept=0
 Get data supply suppression status.
 
virtual bool GetStopSupplyStatus () const noexcept=0
 データ供給抑制状態を取得する。
 

Detailed Description

Audio source function interface with PCM.

PCMによる音声ソース機能インターフェース

Member Function Documentation

◆ GetDecidedFormat() [1/2]

virtual bool zep::audio::PcmSourceInterface::GetDecidedFormat ( PcmFormat format) const
pure virtualnoexcept

Get the determined formats.

Parameters
formatWhere formats are stored.
Return values
trueformat is determined (content of format is valid)
falseformat is undetermined (content of format is invalid)

◆ GetDecidedFormat() [2/2]

virtual bool zep::audio::PcmSourceInterface::GetDecidedFormat ( PcmFormat format) const
pure virtualnoexcept

決定したフォーマットを取得する。

Parameters
formatフォーマットの格納先
Return values
trueフォーマットが決定している(formatの内容が有効)
falseフォーマットは未決定である(formatの内容は無効)

◆ GetFormatDecisionStatus() [1/2]

virtual std::shared_future< PcmFormat > zep::audio::PcmSourceInterface::GetFormatDecisionStatus ( ) const
pure virtualnoexcept

Get shared_future to get the format decision status.

Note
If the format has already been decided, return an object in the ready state.
If the format has already been decided, return an object in the ready state.
Returns
shared_future to which the format is returned when the format is decided. object

◆ GetFormatDecisionStatus() [2/2]

virtual std::shared_future< PcmFormat > zep::audio::PcmSourceInterface::GetFormatDecisionStatus ( ) const
pure virtualnoexcept

フォーマット決定状態を取得するshared_futureを取得する。

Note
既にフォーマット決定済みの場合、準備完了状態のオブジェクトを 返却する。
Returns
フォーマット決定時にそのフォーマットを返却するshared_future オブジェクト

◆ GetPcmBufferPool() [1/2]

virtual std::weak_ptr< PcmBufferPoolWriterInterface > zep::audio::PcmSourceInterface::GetPcmBufferPool ( )
pure virtual

Get the write side interface of the PCM buffer pool.

Note
The obtained pool may be invalid due to format changes, etc. weak_ptr should be locked only when used.

◆ GetPcmBufferPool() [2/2]

virtual std::weak_ptr< PcmBufferPoolWriterInterface > zep::audio::PcmSourceInterface::GetPcmBufferPool ( )
pure virtual

PCMバッファプールの書き込み側インターフェースを取得する。

Note
得られたプールは、フォーマットの変更等で無効になる可能性がある。 weak_ptrは使用時のみlockすること。

◆ GetStopSupplyStatus() [1/2]

virtual bool zep::SourceStreamInterface::GetStopSupplyStatus ( ) const
pure virtualnoexceptinherited

Get data supply suppression status.

Return values
trueSuppression of data supply is requested.
falseSuppression of data supply is not requested.

◆ GetStopSupplyStatus() [2/2]

virtual bool zep::SourceStreamInterface::GetStopSupplyStatus ( ) const
pure virtualnoexceptinherited

データ供給抑制状態を取得する。

Return values
trueデータ供給抑制が要求されている。
falseデータ供給抑制が要求されていない。

◆ RegisterCallback() [1/4]

virtual void zep::audio::PcmSourceInterface::RegisterCallback ( const std::shared_ptr< PcmSourceCallbackInterface > &  listener,
bool  use_weak_ptr = false 
)
pure virtual

コールバックの送信先をshared_ptrまたはweak_ptrで登録する

Note
参照の保持方式としてshared_ptr/weak_ptr/unique_ptrのいずれも 利用できるが、同時に登録できるのは合計1つの参照のみである。
有効なインスタンスを保持していない参照を渡すと、送信先を削除する。
Parameters
listener送信先への参照
use_weak_ptrweak_ptrとして保持する場合にtrueを指定

◆ RegisterCallback() [2/4]

virtual void zep::audio::PcmSourceInterface::RegisterCallback ( const std::shared_ptr< PcmSourceCallbackInterface > &  listener,
. bool  use_weak_ptr = false 
)
pure virtual

Register a callback destination in shared_ptr or weak_ptr.

Note
Either shared_ptr/weak_ptr/unique_ptr can be used as a reference retention method.
Only one reference in total can be registered at the same time.
If a reference that does not hold a valid instance is passed, the destination is deleted.
Parameters
listenerReference to destination
use_weak_ptrSpecify true when holding as weak_ptr

◆ RegisterCallback() [3/4]

virtual void zep::audio::PcmSourceInterface::RegisterCallback ( std::unique_ptr< PcmSourceCallbackInterface > &&  listener)
pure virtual

Register the callback destination with unique_ptr.

Note
Any of shared_ptr/weak_ptr/unique_ptr can be used as a reference retention method.
Only one reference in total can be registered at the same time, although both shared_ptr/weak_ptr/unique_ptr are available.
If a reference that does not hold a valid instance is passed, the destination is deleted.
Parameters
listenerReference to destination

◆ RegisterCallback() [4/4]

virtual void zep::audio::PcmSourceInterface::RegisterCallback ( std::unique_ptr< PcmSourceCallbackInterface > &&  listener)
pure virtual

コールバックの送信先をunique_ptrで登録する

Note
参照の保持方式としてshared_ptr/weak_ptr/unique_ptrのいずれも 利用できるが、同時に登録できるのは合計1つの参照のみである。
有効なインスタンスを保持していない参照を渡すと、送信先を削除する。
Parameters
listener送信先への参照

◆ SendStatistics() [1/2]

virtual void zep::audio::PcmSourceInterface::SendStatistics ( )
pure virtual

Sending statistics.

◆ SendStatistics() [2/2]

virtual void zep::audio::PcmSourceInterface::SendStatistics ( )
pure virtual

統計情報の送信

◆ SetAcceptableFormats() [1/2]

virtual void zep::audio::PcmSourceInterface::SetAcceptableFormats ( const std::vector< PcmFormat > &  formats)
pure virtual

Provide a list of formats that can be sent.

Parameters
formatsArray of formats that can be sent.
Note
The number of channels (num_of_channels) may be adjusted to a value
The number of channels (num_of_channels) may be adjusted to a value less than or equal to the value provided.

◆ SetAcceptableFormats() [2/2]

virtual void zep::audio::PcmSourceInterface::SetAcceptableFormats ( const std::vector< PcmFormat > &  formats)
pure virtual

送信可能なフォーマット一覧を提示する。

Parameters
formats送信可能なフォーマットの配列
Note
チャネル数(num_of_channels)は提示した値以下の値に 調整される場合がある。

◆ SetTimestamp() [1/2]

virtual void zep::StreamInterface::SetTimestamp ( const std::shared_ptr< TimestampInterface > &  timestamp)
pure virtualinherited

Set the timestamp to be used for this stream.

Parameters
timestamptimestamp management object.

◆ SetTimestamp() [2/2]

virtual void zep::StreamInterface::SetTimestamp ( const std::shared_ptr< TimestampInterface > &  timestamp)
pure virtualinherited

このストリームで用いるタイムスタンプを設定する。

Parameters
timestampタイムスタンプ管理オブジェクト

The documentation for this class was generated from the following files: