move stuff in common, clang-format, update copyright
This commit is contained in:
@@ -1,22 +1,38 @@
|
||||
// Copyright 2022, Guillaume Meunier
|
||||
// Copyright 2022, Patrick Nicolas
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wivrn_packets.h"
|
||||
#include "wivrn_connection.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xrt/xrt_system.h"
|
||||
#include <atomic>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <fstream>
|
||||
|
||||
class wivrn_hmd;
|
||||
class wivrn_controller;
|
||||
|
||||
namespace xrt::drivers::wivrn {
|
||||
namespace xrt::drivers::wivrn
|
||||
{
|
||||
|
||||
struct clock_offset
|
||||
{
|
||||
@@ -45,36 +61,29 @@ class wivrn_session : public std::enable_shared_from_this<wivrn_session>
|
||||
|
||||
std::ofstream feedback_csv;
|
||||
|
||||
wivrn_session(TCP&& tcp, in6_addr &address);
|
||||
wivrn_session(TCP && tcp, in6_addr & address);
|
||||
|
||||
public:
|
||||
static xrt_system_devices *
|
||||
create_session(TCP&& tcp);
|
||||
create_session(TCP && tcp);
|
||||
|
||||
clock_offset
|
||||
get_offset();
|
||||
|
||||
void
|
||||
operator()(from_headset::headset_info_packet &&);
|
||||
void
|
||||
operator()(from_headset::tracking &&);
|
||||
void
|
||||
operator()(from_headset::inputs &&);
|
||||
void
|
||||
operator()(from_headset::timesync_response &&);
|
||||
void
|
||||
operator()(from_headset::feedback &&);
|
||||
void operator()(from_headset::headset_info_packet &&);
|
||||
void operator()(from_headset::tracking &&);
|
||||
void operator()(from_headset::inputs &&);
|
||||
void operator()(from_headset::timesync_response &&);
|
||||
void operator()(from_headset::feedback &&);
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
send_stream(const T &packet)
|
||||
void send_stream(const T & packet)
|
||||
{
|
||||
connection.send_stream(packet);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
send_control(const T &packet)
|
||||
void send_control(const T & packet)
|
||||
{
|
||||
connection.send_control(packet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user