|
Hermes 0.7.0
Linux game streaming host
|
Public Member Functions | |
| virtual int | set_sink (const std::string &sink)=0 |
| virtual std::unique_ptr< mic_t > | microphone (const std::uint8_t *mapping, int channels, std::uint32_t sample_rate, std::uint32_t frame_size)=0 |
| virtual std::unique_ptr< mic_t > | microphone_from (const std::string &sink, const std::uint8_t *mapping, int channels, std::uint32_t sample_rate, std::uint32_t frame_size) |
| Record a named sink's monitor, whatever the current sink is. | |
| virtual bool | is_sink_available (const std::string &sink)=0 |
| Check if the audio sink is available in the system. | |
| virtual std::vector< std::string > | streams_playing_elsewhere (const std::string &sink) |
Applications playing to a sink other than sink. | |
| virtual std::optional< sink_t > | sink_info ()=0 |
| virtual bool | create_session_sink (const std::string &name, const std::uint8_t *mapping, int channels) |
| Create a sink that belongs to one isolated session alone. | |
| virtual void | remove_session_sink (const std::string &name) |
| Remove a sink created by create_session_sink(). Removing one that is already gone is not an error. | |
|
inlinevirtual |
Create a sink that belongs to one isolated session alone.
The sinks behind sink_info() are the server's: there is one set of them, and capture reaches them by making one of them the host's default, which is what puts everything the host plays into the stream. That is right for a session that is the host's desktop and wrong for a session that is somebody else's - it hands one client the host's audio and every other client's along with it.
A session sink is named for the session, is never made anyone's default, and is captured by name. Nothing is asked to move: the session's own applications are pointed at it when they start.
Reimplemented in platf::pa::server_t.
|
pure virtual |
Check if the audio sink is available in the system.
| sink | Sink to be checked. |
Implemented in platf::pa::server_t.
|
inlinevirtual |
Record a named sink's monitor, whatever the current sink is.
microphone() picks its source from state the whole process shares - the configured sink, the last one swapped to, the default - which is right while there is one session and wrong once there are several. A session sink is not negotiable: the session it belongs to must be recorded from it and from nothing else.
The default below is never reached in practice, because a session sink is only ever named after create_session_sink() agreed to make one, and a platform without virtual sinks refuses that.
Reimplemented in platf::pa::server_t.
|
inlinevirtual |
Remove a sink created by create_session_sink(). Removing one that is already gone is not an error.
Reimplemented in platf::pa::server_t.
|
inlinevirtual |
Applications playing to a sink other than sink.
A stream follows the default sink unless something chose an output for it: the user in the desktop's sound settings, or the sound server restoring that choice the next time the application plays. Such a stream does not move when Hermes makes its sink the default, so the client never hears it.
Reimplemented in platf::pa::server_t.