|
Viam C++ SDK current
|
gRPC client implementation of a AudioIn component.
More...
#include <audio_in_client.hpp>
Inheritance diagram for viam::sdk::impl::AudioInClient:Public Types | |
| using | interface_type = AudioIn |
Public Member Functions | |
| AudioInClient (std::string name, std::shared_ptr< grpc::Channel > channel) | |
| void | get_audio (std::string const &codec, std::function< bool(audio_chunk &&chunk)> const &chunk_handler, double const &duration_seconds, int64_t const &previous_timestamp, const ProtoStruct &extra) override |
| Get a stream of audio from the device until completed or cancelled. | |
| audio_properties | get_properties (const ProtoStruct &extra) override |
| Returns properties of the audio in device (supported codecs, sample rate, number of channels) | |
| ProtoStruct | do_command (const ProtoStruct &command) override |
| std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra) override |
Returns GeometryConfigs associated with the calling AudioIn. | |
| void | get_audio (std::string const &codec, std::function< bool(audio_chunk &&chunk)> const &chunk_handler, double const &duration_seconds, int64_t const &previous_timestamp) |
| Get a stream of audio from the device until completed or cancelled. | |
| virtual void | get_audio (std::string const &codec, std::function< bool(audio_chunk &&chunk)> const &chunk_handler, double const &duration_seconds, int64_t const &previous_timestamp, const ProtoStruct &extra)=0 |
| Get a stream of audio from the device until completed or cancelled. | |
| std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfigs associated with the calling AudioIn. | |
| virtual std::vector< GeometryConfig > | get_geometries (const ProtoStruct &extra)=0 |
Returns GeometryConfigs associated with the calling AudioIn. | |
| audio_properties | get_properties () |
| Returns properties of the audio in device (supported codecs, sample rate, number of channels) | |
| virtual audio_properties | get_properties (const ProtoStruct &extra)=0 |
| Returns properties of the audio in device (supported codecs, sample rate, number of channels) | |
Public Member Functions inherited from viam::sdk::AudioIn | |
| void | get_audio (std::string const &codec, std::function< bool(audio_chunk &&chunk)> const &chunk_handler, double const &duration_seconds, int64_t const &previous_timestamp) |
| Get a stream of audio from the device until completed or cancelled. | |
| audio_properties | get_properties () |
| Returns properties of the audio in device (supported codecs, sample rate, number of channels) | |
| std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfigs associated with the calling AudioIn. | |
| API | api () const override |
Returns the API associated with a particular resource. | |
Public Member Functions inherited from viam::sdk::Component | |
| Name | get_resource_name () const override |
Returns the Name for a particular resource. | |
Public Member Functions inherited from viam::sdk::Resource | |
| Resource (std::string name) | |
| virtual std::string | name () const |
| Return the resource's name. | |
| void | set_log_level (log_level) const |
| Set the log level for log messages originating from this Resource. | |
Additional Inherited Members | |
Protected Member Functions inherited from viam::sdk::AudioIn | |
| AudioIn (std::string name) | |
Protected Member Functions inherited from viam::sdk::Component | |
| Component (std::string name) | |
Protected Member Functions inherited from viam::sdk::Resource | |
| Name | get_resource_name (const std::string &type) const |
Protected Attributes inherited from viam::sdk::Resource | |
| LogSource | logger_ |
gRPC client implementation of a AudioIn component.
|
overridevirtual |
| Command | the command to execute. |
Implements viam::sdk::AudioIn.
|
inline |
Get a stream of audio from the device until completed or cancelled.
| codec | requested codec of the audio data |
| chunk_handler | callback function to call when an audio response is received. This should return true to keep streaming audio and false to indicate that the stream should terminate. The callback function should not be blocking. |
| duration_seconds | duration of audio stream. If not set, stream duration is indefinite. |
| previous_timestamp | timestamp to start the audio stream from for continuity between multiple calls. If not set, will stream data |
|
overridevirtual |
Get a stream of audio from the device until completed or cancelled.
| codec | requested codec of the audio data |
| chunk_handler | callback function to call when an audio response is received. For an infinite stream this should return true to keep streaming audio and false to indicate that the stream should terminate. The callback function should not be blocking. |
| duration_seconds | duration of audio stream. If zero, stream duration is indefinite. |
| previous_timestamp | timestamp to start the audio stream from for continuity between multiple calls. If zero, will stream data |
| extra | Any additional arguments to the method |
Implements viam::sdk::AudioIn.
|
virtual |
Get a stream of audio from the device until completed or cancelled.
| codec | requested codec of the audio data |
| chunk_handler | callback function to call when an audio response is received. For an infinite stream this should return true to keep streaming audio and false to indicate that the stream should terminate. The callback function should not be blocking. |
| duration_seconds | duration of audio stream. If zero, stream duration is indefinite. |
| previous_timestamp | timestamp to start the audio stream from for continuity between multiple calls. If zero, will stream data |
| extra | Any additional arguments to the method |
Implements viam::sdk::AudioIn.
|
inline |
Returns GeometryConfigs associated with the calling AudioIn.
GeometryConfigs associated with the component.
|
overridevirtual |
Returns GeometryConfigs associated with the calling AudioIn.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::AudioIn.
|
virtual |
Returns GeometryConfigs associated with the calling AudioIn.
| extra | Any additional arguments to the method. |
GeometryConfigs associated with the component. Implements viam::sdk::AudioIn.
|
overridevirtual |
Returns properties of the audio in device (supported codecs, sample rate, number of channels)
| extra | Any additional arguments to the method |
Implements viam::sdk::AudioIn.
|
virtual |
Returns properties of the audio in device (supported codecs, sample rate, number of channels)
| extra | Any additional arguments to the method |
Implements viam::sdk::AudioIn.