wivrn namespace: move all server classes
This commit is contained in:
@@ -26,8 +26,11 @@
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
using namespace wivrn;
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
struct deleter
|
||||
{
|
||||
void operator()(pw_main_loop * loop)
|
||||
@@ -189,6 +192,7 @@ struct pipewire_device : public audio_device
|
||||
[loop = pw_loop.get()]() { pw_main_loop_run(loop); });
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
void pipewire_device::mic_process(void * self_v)
|
||||
{
|
||||
@@ -315,3 +319,4 @@ std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "audio_setup.h"
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
@@ -27,3 +30,4 @@ std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
const std::string & sink_description,
|
||||
const wivrn::from_headset::headset_info_packet & info,
|
||||
wivrn::wivrn_session & session);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ static const char * sink_name = "WiVRn";
|
||||
static const char * source_pipe = "wivrn-source";
|
||||
static const char * sink_pipe = "wivrn-sink";
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
struct module_entry
|
||||
{
|
||||
uint32_t module;
|
||||
@@ -466,3 +469,4 @@ void unload_module(uintptr_t id)
|
||||
pa_connection cnx("WiVRn");
|
||||
unload_module(cnx, id);
|
||||
}
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "audio_setup.h"
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
std::shared_ptr<audio_device> create_pulse_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
@@ -27,3 +30,4 @@ std::shared_ptr<audio_device> create_pulse_handle(
|
||||
const std::string & sink_description,
|
||||
const wivrn::from_headset::headset_info_packet & info,
|
||||
wivrn::wivrn_session & session);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "audio_pipewire.h"
|
||||
#endif
|
||||
|
||||
std::shared_ptr<audio_device> audio_device::create(
|
||||
std::shared_ptr<wivrn::audio_device> wivrn::audio_device::create(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
namespace wivrn
|
||||
{
|
||||
class wivrn_session;
|
||||
}
|
||||
|
||||
struct audio_device
|
||||
{
|
||||
@@ -46,3 +45,4 @@ struct audio_device
|
||||
const wivrn::from_headset::headset_info_packet & info,
|
||||
wivrn::wivrn_session & session);
|
||||
};
|
||||
} // namespace wivrn
|
||||
|
||||
Reference in New Issue
Block a user