id int64 0 755k | file_name stringlengths 3 109 | file_path stringlengths 13 185 | content stringlengths 31 9.38M | size int64 31 9.38M | language stringclasses 1
value | extension stringclasses 11
values | total_lines int64 1 340k | avg_line_length float64 2.18 149k | max_line_length int64 7 2.22M | alphanum_fraction float64 0 1 | repo_name stringlengths 6 65 | repo_stars int64 100 47.3k | repo_forks int64 0 12k | repo_open_issues int64 0 3.4k | repo_license stringclasses 9
values | repo_extraction_date stringclasses 92
values | exact_duplicates_redpajama bool 2
classes | near_duplicates_redpajama bool 2
classes | exact_duplicates_githubcode bool 2
classes | exact_duplicates_stackv2 bool 1
class | exact_duplicates_stackv1 bool 2
classes | near_duplicates_githubcode bool 2
classes | near_duplicates_stackv1 bool 2
classes | near_duplicates_stackv2 bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,994 | publish.cpp | LizardByte_Sunshine/src/platform/linux/publish.cpp | /**
* @file src/platform/linux/publish.cpp
* @brief Definitions for publishing services on Linux.
* @note Adapted from https://www.avahi.org/doxygen/html/client-publish-service_8c-example.html
*/
#include <thread>
#include "misc.h"
#include "src/logging.h"
#include "src/network.h"
#include "src/nvhttp.h"
#include ... | 15,504 | C++ | .cpp | 367 | 36.904632 | 185 | 0.645997 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,995 | kmsgrab.cpp | LizardByte_Sunshine/src/platform/linux/kmsgrab.cpp | /**
* @file src/platform/linux/kmsgrab.cpp
* @brief Definitions for KMS screen capture.
*/
#include <drm_fourcc.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/dma-buf.h>
#include <sys/capability.h>
#include <sys/mman.h>
#include <unistd.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <filesystem... | 59,637 | C++ | .cpp | 1,434 | 32.041841 | 180 | 0.564825 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,996 | vaapi.cpp | LizardByte_Sunshine/src/platform/linux/vaapi.cpp | /**
* @file src/platform/linux/vaapi.cpp
* @brief Definitions for VA-API hardware accelerated capture.
*/
#include <sstream>
#include <string>
#include <fcntl.h>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/pixdesc.h>
#include <va/va.h>
#include <va/va_drm.h>
#if !VA_CHECK_VERSION(1, 9, 0)
// v... | 19,933 | C++ | .cpp | 544 | 30.137868 | 144 | 0.627238 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,997 | audio.cpp | LizardByte_Sunshine/src/platform/linux/audio.cpp | /**
* @file src/platform/linux/audio.cpp
* @brief Definitions for audio control on Linux.
*/
#include <bitset>
#include <sstream>
#include <thread>
#include <boost/regex.hpp>
#include <pulse/error.h>
#include <pulse/pulseaudio.h>
#include <pulse/simple.h>
#include "src/platform/common.h"
#include "src/config.h"
... | 15,903 | C++ | .cpp | 419 | 29.379475 | 135 | 0.5726 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,998 | wayland.cpp | LizardByte_Sunshine/src/platform/linux/wayland.cpp | /**
* @file src/platform/linux/wayland.cpp
* @brief Definitions for Wayland capture.
*/
#include <poll.h>
#include <wayland-client.h>
#include <wayland-util.h>
#include <cstdlib>
#include "graphics.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/round_robin.h"
#include "src/utility.h"
#i... | 9,594 | C++ | .cpp | 275 | 29.934545 | 139 | 0.64552 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,999 | cuda.cpp | LizardByte_Sunshine/src/platform/linux/cuda.cpp | /**
* @file src/platform/linux/cuda.cpp
* @brief Definitions for CUDA encoding.
*/
#include <bitset>
#include <fcntl.h>
#include <filesystem>
#include <thread>
#include <NvFBC.h>
#include <ffnvcodec/dynlink_loader.h>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/hwcontext_cuda.h>
#include <libav... | 30,804 | C++ | .cpp | 826 | 29.583535 | 194 | 0.601862 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,000 | graphics.cpp | LizardByte_Sunshine/src/platform/linux/graphics.cpp | /**
* @file src/platform/linux/graphics.cpp
* @brief Definitions for graphics related functions.
*/
#include "graphics.h"
#include "src/file_handler.h"
#include "src/logging.h"
#include "src/video.h"
#include <fcntl.h>
extern "C" {
#include <libavutil/pixdesc.h>
}
// I want to have as little build dependencies as... | 30,626 | C++ | .cpp | 803 | 32.369863 | 159 | 0.632276 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,001 | misc.cpp | LizardByte_Sunshine/src/platform/linux/misc.cpp | /**
* @file src/platform/linux/misc.cpp
* @brief Miscellaneous definitions for Linux.
*/
// Required for in6_pktinfo with glibc headers
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
// standard includes
#include <fstream>
#include <iostream>
// lib includes
#include <arpa/inet.h>
#include <boost/asio/ip/addr... | 32,388 | C++ | .cpp | 868 | 31.095622 | 189 | 0.62013 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,002 | x11grab.cpp | LizardByte_Sunshine/src/platform/linux/x11grab.cpp | /**
* @file src/platform/linux/x11grab.cpp
* @brief Definitions for x11 capture.
*/
#include "src/platform/common.h"
#include <fstream>
#include <thread>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/Xrandr.h>
#include <sys/ipc.h>
#inclu... | 26,664 | C++ | .cpp | 746 | 28.548257 | 182 | 0.582469 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,003 | legacy_input.cpp | LizardByte_Sunshine/src/platform/linux/input/legacy_input.cpp | /**
* @file src/platform/linux/input/legacy_input.cpp
* @brief Implementation of input handling, prior to migration to inputtino
* @todo Remove this file after the next stable release
*/
#include <fcntl.h>
#include <linux/uinput.h>
#include <poll.h>
extern "C" {
#include <libevdev/libevdev-uinput.h>
#include <libe... | 87,111 | C++ | .cpp | 2,161 | 33.803332 | 177 | 0.617956 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,004 | inputtino_keyboard.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino_keyboard.cpp | /**
* @file src/platform/linux/input/inputtino_keyboard.cpp
* @brief Definitions for inputtino keyboard input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility... | 5,022 | C++ | .cpp | 109 | 40.917431 | 103 | 0.577025 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,005 | inputtino_mouse.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino_mouse.cpp | /**
* @file src/platform/linux/input/inputtino_mouse.cpp
* @brief Definitions for inputtino mouse input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
#... | 2,287 | C++ | .cpp | 82 | 22.317073 | 105 | 0.6041 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,006 | inputtino_gamepad.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino_gamepad.cpp | /**
* @file src/platform/linux/input/inputtino_gamepad.cpp
* @brief Definitions for inputtino gamepad input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h... | 12,252 | C++ | .cpp | 278 | 37.366906 | 222 | 0.644119 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,007 | inputtino.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino.cpp | /**
* @file src/platform/linux/input/inputtino.cpp
* @brief Definitions for the inputtino Linux input handling.
*/
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/platform/common.h"
#include "src/utility.h"
#include "inputtino_common.h"
#include "inputtino_gamepa... | 4,116 | C++ | .cpp | 126 | 28.984127 | 125 | 0.671713 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,008 | inputtino_touch.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino_touch.cpp | /**
* @file src/platform/linux/input/inputtino_touch.cpp
* @brief Definitions for inputtino touch input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
#... | 1,624 | C++ | .cpp | 49 | 26.285714 | 114 | 0.616316 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,009 | inputtino_pen.cpp | LizardByte_Sunshine/src/platform/linux/input/inputtino_pen.cpp | /**
* @file src/platform/linux/input/inputtino_pen.cpp
* @brief Definitions for inputtino pen input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
#incl... | 2,477 | C++ | .cpp | 65 | 31.769231 | 102 | 0.630724 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,010 | publish.cpp | LizardByte_Sunshine/src/platform/macos/publish.cpp | /**
* @file src/platform/macos/publish.cpp
* @brief Definitions for publishing services on macOS.
*/
#include <dns_sd.h>
#include <thread>
#include "src/logging.h"
#include "src/network.h"
#include "src/nvhttp.h"
#include "src/platform/common.h"
using namespace std::literals;
namespace platf::publish {
namespac... | 4,699 | C++ | .cpp | 118 | 33.135593 | 100 | 0.63694 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,011 | input.cpp | LizardByte_Sunshine/src/platform/macos/input.cpp | /**
* @file src/platform/macos/input.cpp
* @brief Definitions for macOS input handling.
*/
#include "src/input.h"
#import <Carbon/Carbon.h>
#include <chrono>
#include <mach/mach.h>
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
#include <ApplicationServices/ApplicationServices.... | 26,381 | C++ | .cpp | 538 | 44.626394 | 185 | 0.49123 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,012 | nv12_zero_device.cpp | LizardByte_Sunshine/src/platform/macos/nv12_zero_device.cpp | /**
* @file src/platform/macos/nv12_zero_device.cpp
* @brief Definitions for NV12 zero copy device on macOS.
*/
#include <utility>
#include "src/platform/macos/av_img_t.h"
#include "src/platform/macos/nv12_zero_device.h"
#include "src/video.h"
extern "C" {
#include "libavutil/imgutils.h"
}
namespace platf {
v... | 2,247 | C++ | .cpp | 56 | 35.232143 | 133 | 0.691244 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,013 | publish.cpp | LizardByte_Sunshine/src/platform/windows/publish.cpp | /**
* @file src/platform/windows/publish.cpp
* @brief Definitions for Windows mDNS service registration.
*/
#include <winsock2.h>
#include <windows.h>
#include <windns.h>
#include <winerror.h>
#include "misc.h"
#include "src/config.h"
#include "src/logging.h"
#include "src/network.h"
#include "src/nvhttp.h"
#incl... | 6,658 | C++ | .cpp | 183 | 32.043716 | 122 | 0.706797 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,014 | display_base.cpp | LizardByte_Sunshine/src/platform/windows/display_base.cpp | /**
* @file src/platform/windows/display_base.cpp
* @brief Definitions for the Windows display base code.
*/
#include <cmath>
#include <initguid.h>
#include <thread>
#include <boost/algorithm/string/join.hpp>
#include <boost/process/v1.hpp>
// We have to include boost/process/v1.hpp before display.h due to WinSock... | 46,304 | C++ | .cpp | 1,027 | 37.925024 | 157 | 0.646477 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,015 | input.cpp | LizardByte_Sunshine/src/platform/windows/input.cpp | /**
* @file src/platform/windows/input.cpp
* @brief Definitions for input handling on Windows.
*/
#define WINVER 0x0A00
#include <windows.h>
#include <cmath>
#include <thread>
#include <ViGEm/Client.h>
#include "keylayout.h"
#include "misc.h"
#include "src/config.h"
#include "src/globals.h"
#include "src/logging.... | 62,084 | C++ | .cpp | 1,519 | 34.685319 | 166 | 0.655472 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,016 | display_ram.cpp | LizardByte_Sunshine/src/platform/windows/display_ram.cpp | /**
* @file src/platform/windows/display_ram.cpp
* @brief Definitions for handling ram.
*/
#include "display.h"
#include "misc.h"
#include "src/logging.h"
namespace platf {
using namespace std::literals;
}
namespace platf::dxgi {
struct img_t: public ::platf::img_t {
~img_t() override {
delete[] dat... | 13,321 | C++ | .cpp | 322 | 34.92236 | 176 | 0.618613 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,017 | audio.cpp | LizardByte_Sunshine/src/platform/windows/audio.cpp | /**
* @file src/platform/windows/audio.cpp
* @brief Definitions for Windows audio capture.
*/
#define INITGUID
#include <audioclient.h>
#include <mmdeviceapi.h>
#include <roapi.h>
#include <synchapi.h>
#include <newdev.h>
#include <avrt.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/c... | 39,007 | C++ | .cpp | 965 | 32.655959 | 155 | 0.631512 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,018 | misc.cpp | LizardByte_Sunshine/src/platform/windows/misc.cpp | /**
* @file src/platform/windows/misc.cpp
* @brief Miscellaneous definitions for Windows.
*/
#include <csignal>
#include <filesystem>
#include <iomanip>
#include <set>
#include <sstream>
#include <boost/algorithm/string.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/process/v1.hpp>
#include <boost/progra... | 70,386 | C++ | .cpp | 1,634 | 36.729498 | 189 | 0.659798 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,019 | display_wgc.cpp | LizardByte_Sunshine/src/platform/windows/display_wgc.cpp | /**
* @file src/platform/windows/display_wgc.cpp
* @brief Definitions for WinRT Windows.Graphics.Capture API
*/
#include <dxgi1_2.h>
#include "display.h"
#include "misc.h"
#include "src/logging.h"
// Gross hack to work around MINGW-packages#22160
#define ____FIReference_1_boolean_INTERFACE_DEFINED__
... | 13,075 | C++ | .cpp | 295 | 38.125424 | 216 | 0.666247 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,020 | display_vram.cpp | LizardByte_Sunshine/src/platform/windows/display_vram.cpp | /**
* @file src/platform/windows/display_vram.cpp
* @brief Definitions for handling video ram.
*/
#include <cmath>
#include <d3dcompiler.h>
#include <directxmath.h>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/hwcontext_d3d11va.h>
}
#include "display.h"
#include "misc.h"
#include "src/config.h... | 75,856 | C++ | .cpp | 1,665 | 38.086486 | 177 | 0.634967 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,021 | driver_settings.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/driver_settings.cpp | /**
* @file src/platform/windows/nvprefs/driver_settings.cpp
* @brief Definitions for nvidia driver settings.
*/
// local includes
#include "driver_settings.h"
#include "nvprefs_common.h"
namespace {
const auto sunshine_application_profile_name = L"SunshineStream";
const auto sunshine_application_path = L"suns... | 10,645 | C++ | .cpp | 258 | 34.666667 | 148 | 0.67583 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,022 | nvapi_opensource_wrapper.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp | /**
* @file src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp
* @brief Definitions for the NVAPI wrapper.
*/
// standard library headers
#include <map>
// local includes
#include "driver_settings.h"
#include "nvprefs_common.h"
// special nvapi header that should be the last include
#include <nvapi_interfac... | 4,557 | C++ | .cpp | 108 | 39.731481 | 150 | 0.791176 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,023 | nvprefs_interface.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/nvprefs_interface.cpp | /**
* @file src/platform/windows/nvprefs/nvprefs_interface.cpp
* @brief Definitions for nvidia preferences interface.
*/
// standard includes
#include <cassert>
// local includes
#include "driver_settings.h"
#include "nvprefs_interface.h"
#include "undo_file.h"
namespace {
const auto sunshine_program_data_folde... | 7,043 | C++ | .cpp | 194 | 30.21134 | 122 | 0.655709 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,024 | undo_data.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/undo_data.cpp | /**
* @file src/platform/windows/nvprefs/undo_data.cpp
* @brief Definitions for undoing changes to nvidia preferences.
*/
// external includes
#include <nlohmann/json.hpp>
// local includes
#include "nvprefs_common.h"
#include "undo_data.h"
using json = nlohmann::json;
// Separate namespace for ADL, otherwise we ... | 3,115 | C++ | .cpp | 106 | 24.584906 | 93 | 0.638824 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,025 | nvprefs_common.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/nvprefs_common.cpp | /**
* @file src/platform/windows/nvprefs/nvprefs_common.cpp
* @brief Definitions for common nvidia preferences.
*/
// local includes
#include "nvprefs_common.h"
#include "src/logging.h"
// read user override preferences from global sunshine config
#include "src/config.h"
namespace nvprefs {
void
info_message(... | 1,000 | C++ | .cpp | 34 | 26.264706 | 81 | 0.705637 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,026 | undo_file.cpp | LizardByte_Sunshine/src/platform/windows/nvprefs/undo_file.cpp | /**
* @file src/platform/windows/nvprefs/undo_file.cpp
* @brief Definitions for the nvidia undo file.
*/
// local includes
#include "undo_file.h"
namespace {
using namespace nvprefs;
DWORD
relax_permissions(HANDLE file_handle) {
PACL old_dacl = nullptr;
safe_hlocal<PSECURITY_DESCRIPTOR> sd;
DWO... | 4,655 | C++ | .cpp | 129 | 30.937984 | 149 | 0.663628 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,027 | tests_events.h | LizardByte_Sunshine/tests/tests_events.h | /**
* @file tests/tests_events.h
* @brief Declarations for SunshineEventListener.
*/
#pragma once
#include "tests_common.h"
struct SunshineEventListener: testing::EmptyTestEventListener {
SunshineEventListener() {
sink = boost::make_shared<sink_t>();
sink_buffer = boost::make_shared<std::stringstream>();
... | 2,392 | C++ | .h | 58 | 34.517241 | 101 | 0.604651 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,028 | tests_environment.h | LizardByte_Sunshine/tests/tests_environment.h | /**
* @file tests/tests_environment.h
* @brief Declarations for SunshineEnvironment.
*/
#pragma once
#include "tests_common.h"
struct SunshineEnvironment: testing::Environment {
void
SetUp() override {
mail::man = std::make_shared<safe::mail_raw_t>();
deinit_log = logging::init(0, "test_sunshine.log");
... | 454 | C++ | .h | 19 | 21 | 55 | 0.678241 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,029 | tests_log_checker.h | LizardByte_Sunshine/tests/tests_log_checker.h | /**
* @file tests/tests_log_checker.h
* @brief Utility functions to check log file contents.
*/
#pragma once
#include <algorithm>
#include <fstream>
#include <regex>
#include <string>
#include <src/logging.h>
namespace log_checker {
/**
* @brief Remove the timestamp prefix from a log line.
* @param line ... | 3,963 | C++ | .h | 117 | 29.059829 | 109 | 0.644201 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,030 | tests_common.h | LizardByte_Sunshine/tests/tests_common.h | /**
* @file tests/tests_common.h
* @brief Common declarations.
*/
#pragma once
#include <gtest/gtest.h>
#include <src/globals.h>
#include <src/logging.h>
#include <src/platform/common.h>
struct PlatformTestSuite: testing::Test {
static void
SetUpTestSuite() {
ASSERT_FALSE(platf_deinit);
BOOST_LOG(tests... | 658 | C++ | .h | 26 | 22.423077 | 62 | 0.707006 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,031 | stream.h | LizardByte_Sunshine/src/stream.h | /**
* @file src/stream.h
* @brief Declarations for the streaming protocols.
*/
#pragma once
#include <utility>
#include <boost/asio.hpp>
#include "audio.h"
#include "crypto.h"
#include "video.h"
namespace stream {
constexpr auto VIDEO_STREAM_PORT = 9;
constexpr auto CONTROL_PORT = 10;
constexpr auto AUDIO_S... | 1,247 | C++ | .h | 46 | 23.065217 | 75 | 0.689597 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,032 | crypto.h | LizardByte_Sunshine/src/crypto.h | /**
* @file src/crypto.h
* @brief Declarations for cryptography functions.
*/
#pragma once
#include <array>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <openssl/x509.h>
#include "utility.h"
namespace crypto {
struct creds_t {
std::string x509;
std::string pkey;
... | 5,525 | C++ | .h | 147 | 32.442177 | 133 | 0.661366 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,033 | upnp.h | LizardByte_Sunshine/src/upnp.h | /**
* @file src/upnp.h
* @brief Declarations for UPnP port mapping.
*/
#pragma once
#include <miniupnpc/miniupnpc.h>
#include "platform/common.h"
/**
* @brief UPnP port mapping.
*/
namespace upnp {
constexpr auto INET6_ADDRESS_STRLEN = 46;
constexpr auto IPv4 = 0;
constexpr auto IPv6 = 1;
constexpr auto... | 1,186 | C++ | .h | 37 | 29.027027 | 123 | 0.69965 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,034 | video.h | LizardByte_Sunshine/src/video.h | /**
* @file src/video.h
* @brief Declarations for video.
*/
#pragma once
#include "input.h"
#include "platform/common.h"
#include "thread_safe.h"
#include "video_colorspace.h"
extern "C" {
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
}
struct AVPacket;
namespace video {
/* Encoding configura... | 10,711 | C++ | .h | 297 | 30.643098 | 135 | 0.665507 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,035 | audio.h | LizardByte_Sunshine/src/audio.h | /**
* @file src/audio.h
* @brief Declarations for audio capture and encoding.
*/
#pragma once
#include "thread_safe.h"
#include "utility.h"
#include <bitset>
namespace audio {
enum stream_config_e : int {
STEREO, ///< Stereo
HIGH_STEREO, ///< High stereo
SURROUND51, ///< Surround 5.1
HIGH_SUR... | 1,446 | C++ | .h | 51 | 24.215686 | 66 | 0.666908 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,037 | sync.h | LizardByte_Sunshine/src/sync.h | /**
* @file src/sync.h
* @brief Declarations for synchronization utilities.
*/
#pragma once
#include <array>
#include <mutex>
#include <utility>
namespace sync_util {
template <class T, class M = std::mutex>
class sync_t {
public:
using value_t = T;
using mutex_t = M;
std::lock_guard<mutex_t>
... | 1,540 | C++ | .h | 73 | 15.671233 | 53 | 0.547603 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,038 | globals.h | LizardByte_Sunshine/src/globals.h | /**
* @file globals.h
* @brief Declarations for globally accessible variables and functions.
*/
#pragma once
#include "entry_handler.h"
#include "thread_pool.h"
/**
* @brief A thread pool for processing tasks.
*/
extern thread_pool_util::ThreadPool task_pool;
/**
* @brief A boolean flag to indicate whether the... | 1,252 | C++ | .h | 49 | 23.183673 | 76 | 0.699916 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,039 | video_colorspace.h | LizardByte_Sunshine/src/video_colorspace.h | /**
* @file src/video_colorspace.h
* @brief Declarations for colorspace functions.
*/
#pragma once
extern "C" {
#include <libavutil/pixfmt.h>
}
namespace video {
enum class colorspace_e {
rec601, ///< Rec. 601
rec709, ///< Rec. 709
bt2020sdr, ///< Rec. 2020 SDR
bt2020, ///< R... | 2,199 | C++ | .h | 60 | 31.766667 | 108 | 0.6938 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,040 | nvhttp.h | LizardByte_Sunshine/src/nvhttp.h | /**
* @file src/nvhttp.h
* @brief Declarations for the nvhttp (GameStream) server.
*/
// macros
#pragma once
// standard includes
#include <string>
// lib includes
#include <boost/property_tree/ptree.hpp>
// local includes
#include "thread_safe.h"
/**
* @brief Contains all the functions and variables related to... | 2,038 | C++ | .h | 79 | 22.506329 | 93 | 0.669065 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,041 | thread_pool.h | LizardByte_Sunshine/src/thread_pool.h | /**
* @file src/thread_pool.h
* @brief Declarations for the thread pool system.
*/
#pragma once
#include "task_pool.h"
#include <thread>
namespace thread_pool_util {
/**
* Allow threads to execute unhindered while keeping full control over the threads.
*/
class ThreadPool: public task_pool_util::TaskPool... | 2,705 | C++ | .h | 105 | 19.152381 | 114 | 0.547786 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,042 | stat_trackers.h | LizardByte_Sunshine/src/stat_trackers.h | /**
* @file src/stat_trackers.h
* @brief Declarations for streaming statistic tracking.
*/
#pragma once
#include <chrono>
#include <functional>
#include <limits>
#include <boost/format.hpp>
namespace stat_trackers {
boost::format
one_digit_after_decimal();
boost::format
two_digits_afte... | 1,511 | C++ | .h | 46 | 26.826087 | 124 | 0.625606 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,043 | system_tray.h | LizardByte_Sunshine/src/system_tray.h | /**
* @file src/system_tray.h
* @brief Declarations for the system tray icon and notification system.
*/
#pragma once
/**
* @brief Handles the system tray icon and notification system.
*/
namespace system_tray {
/**
* @brief Callback for opening the UI from the system tray.
* @param item The tray menu ite... | 2,665 | C++ | .h | 88 | 26.863636 | 132 | 0.703198 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,047 | entry_handler.h | LizardByte_Sunshine/src/entry_handler.h | /**
* @file entry_handler.h
* @brief Declarations for entry handling functions.
*/
#pragma once
// standard includes
#include <atomic>
#include <string_view>
// local includes
#include "thread_pool.h"
#include "thread_safe.h"
/**
* @brief Launch the Web UI.
* @examples
* launch_ui();
* @examples_end
*/
void
... | 3,190 | C++ | .h | 139 | 20.115108 | 87 | 0.681608 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,048 | confighttp.h | LizardByte_Sunshine/src/confighttp.h | /**
* @file src/confighttp.h
* @brief Declarations for the Web UI Config HTTP server.
*/
#pragma once
#include <functional>
#include <string>
#include "thread_safe.h"
#define WEB_DIR SUNSHINE_ASSETS_DIR "/web/"
namespace confighttp {
constexpr auto PORT_HTTPS = 1;
void
start();
} // namespace confighttp
... | 819 | C++ | .h | 32 | 23.21875 | 57 | 0.597187 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,049 | file_handler.h | LizardByte_Sunshine/src/file_handler.h | /**
* @file file_handler.h
* @brief Declarations for file handling functions.
*/
#pragma once
#include <string>
/**
* @brief Responsible for file handling functions.
*/
namespace file_handler {
/**
* @brief Get the parent directory of a file or directory.
* @param path The path of the file or directory.
... | 1,447 | C++ | .h | 52 | 24.5 | 68 | 0.663309 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,050 | cbs.h | LizardByte_Sunshine/src/cbs.h | /**
* @file src/cbs.h
* @brief Declarations for FFmpeg Coded Bitstream API.
*/
#pragma once
#include "utility.h"
struct AVPacket;
struct AVCodecContext;
namespace cbs {
struct nal_t {
util::buffer_t<std::uint8_t> _new;
util::buffer_t<std::uint8_t> old;
};
struct hevc_t {
nal_t vps;
nal_t s... | 922 | C++ | .h | 33 | 24.757576 | 94 | 0.694665 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,051 | rswrapper.h | LizardByte_Sunshine/src/rswrapper.h | /**
* @file src/rswrapper.h
* @brief Wrappers for nanors vectorization
* @details This is a drop-in replacement for nanors rs.h
*/
#pragma once
#include <stdint.h>
typedef struct _reed_solomon reed_solomon;
typedef reed_solomon *(*reed_solomon_new_t)(int data_shards, int parity_shards);
typedef void (*reed_solom... | 1,199 | C++ | .h | 26 | 44.615385 | 112 | 0.783205 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,052 | rtsp.h | LizardByte_Sunshine/src/rtsp.h | /**
* @file src/rtsp.h
* @brief Declarations for RTSP streaming.
*/
#pragma once
#include <atomic>
#include "crypto.h"
#include "thread_safe.h"
namespace rtsp_stream {
constexpr auto RTSP_SETUP_PORT = 21;
struct launch_session_t {
uint32_t id;
crypto::aes_t gcm_key;
crypto::aes_t iv;
std::s... | 1,272 | C++ | .h | 53 | 20.188679 | 73 | 0.685477 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,053 | httpcommon.h | LizardByte_Sunshine/src/httpcommon.h | /**
* @file src/httpcommon.h
* @brief Declarations for common HTTP.
*/
#pragma once
#include "network.h"
#include "thread_safe.h"
namespace http {
int
init();
int
create_creds(const std::string &pkey, const std::string &cert);
int
save_user_creds(
const std::string &file,
const std::string &us... | 724 | C++ | .h | 29 | 22 | 65 | 0.702467 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,055 | logging.h | LizardByte_Sunshine/src/logging.h | /**
* @file src/logging.h
* @brief Declarations for logging related functions.
*/
#pragma once
// lib includes
#include <boost/log/common.hpp>
#include <boost/log/sinks.hpp>
using text_sink = boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend>;
extern boost::log::sources::severity_logger... | 6,347 | C++ | .h | 201 | 26.975124 | 163 | 0.642857 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,056 | thread_safe.h | LizardByte_Sunshine/src/thread_safe.h | /**
* @file src/thread_safe.h
* @brief Declarations for thread-safe data structures.
*/
#pragma once
#include <array>
#include <atomic>
#include <condition_variable>
#include <functional>
#include <map>
#include <mutex>
#include <vector>
#include "utility.h"
namespace safe {
template <class T>
class event_t {... | 11,977 | C++ | .h | 443 | 20.625282 | 99 | 0.549649 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,058 | input.h | LizardByte_Sunshine/src/input.h | /**
* @file src/input.h
* @brief Declarations for gamepad, keyboard, and mouse input handling.
*/
#pragma once
#include <functional>
#include "platform/common.h"
#include "thread_safe.h"
namespace input {
struct input_t;
void
print(void *input);
void
reset(std::shared_ptr<input_t> &input);
void
pas... | 1,340 | C++ | .h | 42 | 28.452381 | 122 | 0.692068 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,059 | network.h | LizardByte_Sunshine/src/network.h | /**
* @file src/network.h
* @brief Declarations for networking related functions.
*/
#pragma once
#include <tuple>
#include <utility>
#include <boost/asio.hpp>
#include <enet/enet.h>
#include "utility.h"
namespace net {
void
free_host(ENetHost *host);
/**
* @brief Map a specified port based on the bas... | 3,257 | C++ | .h | 97 | 30.092784 | 85 | 0.702642 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,060 | task_pool.h | LizardByte_Sunshine/src/task_pool.h | /**
* @file src/task_pool.h
* @brief Declarations for the task pool system.
*/
#pragma once
#include <chrono>
#include <deque>
#include <functional>
#include <future>
#include <mutex>
#include <optional>
#include <type_traits>
#include <utility>
#include <vector>
#include "move_by_copy.h"
#include "utility.h"
name... | 6,711 | C++ | .h | 201 | 27.079602 | 145 | 0.579625 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,061 | config.h | LizardByte_Sunshine/src/config.h | /**
* @file src/config.h
* @brief Declarations for the configuration of Sunshine.
*/
#pragma once
#include <bitset>
#include <chrono>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>
#include "nvenc/nvenc_config.h"
namespace config {
struct video_t {
// ffmpeg params
int ... | 4,954 | C++ | .h | 162 | 25.512346 | 128 | 0.665124 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,062 | nvenc_d3d11_on_cuda.h | LizardByte_Sunshine/src/nvenc/nvenc_d3d11_on_cuda.h | /**
* @file src/nvenc/nvenc_d3d11_on_cuda.h
* @brief Declarations for CUDA NVENC encoder with Direct3D11 input surfaces.
*/
#pragma once
#ifdef _WIN32
#include "nvenc_d3d11.h"
#include <ffnvcodec/dynlink_cuda.h>
namespace nvenc {
/**
* @brief Interop Direct3D11 on CUDA NVENC encoder.
*... | 2,626 | C++ | .h | 77 | 27.415584 | 83 | 0.688172 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,063 | nvenc_d3d11.h | LizardByte_Sunshine/src/nvenc/nvenc_d3d11.h | /**
* @file src/nvenc/nvenc_d3d11.h
* @brief Declarations for abstract Direct3D11 NVENC encoder.
*/
#pragma once
#ifdef _WIN32
#include <comdef.h>
#include <d3d11.h>
#include "nvenc_base.h"
namespace nvenc {
_COM_SMARTPTR_TYPEDEF(ID3D11Device, IID_ID3D11Device);
_COM_SMARTPTR_TYPEDEF(ID3... | 1,084 | C++ | .h | 37 | 24.243243 | 81 | 0.680623 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,064 | nvenc_utils.h | LizardByte_Sunshine/src/nvenc/nvenc_utils.h | /**
* @file src/nvenc/nvenc_utils.h
* @brief Declarations for NVENC utilities.
*/
#pragma once
#ifdef _WIN32
#include <dxgiformat.h>
#endif
#include "nvenc_colorspace.h"
#include "src/platform/common.h"
#include "src/video_colorspace.h"
#include <ffnvcodec/nvEncodeAPI.h>
namespace nvenc {
... | 662 | C++ | .h | 22 | 26.5 | 102 | 0.750804 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,065 | nvenc_base.h | LizardByte_Sunshine/src/nvenc/nvenc_base.h | /**
* @file src/nvenc/nvenc_base.h
* @brief Declarations for abstract platform-agnostic base of standalone NVENC encoder.
*/
#pragma once
#include "nvenc_colorspace.h"
#include "nvenc_config.h"
#include "nvenc_encoded_frame.h"
#include "src/logging.h"
#include "src/video.h"
#include <ffnvcodec/nvEnco... | 6,466 | C++ | .h | 137 | 39.627737 | 160 | 0.655787 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,066 | nvenc_colorspace.h | LizardByte_Sunshine/src/nvenc/nvenc_colorspace.h | /**
* @file src/nvenc/nvenc_colorspace.h
* @brief Declarations for NVENC YUV colorspace.
*/
#pragma once
#include <ffnvcodec/nvEncodeAPI.h>
namespace nvenc {
/**
* @brief YUV colorspace and color range.
*/
struct nvenc_colorspace_t {
NV_ENC_VUI_COLOR_PRIMARIES primaries;
NV_ENC_VU... | 456 | C++ | .h | 17 | 22.529412 | 57 | 0.696056 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,067 | nvenc_config.h | LizardByte_Sunshine/src/nvenc/nvenc_config.h | /**
* @file src/nvenc/nvenc_config.h
* @brief Declarations for NVENC encoder configuration.
*/
#pragma once
namespace nvenc {
enum class nvenc_two_pass {
disabled, ///< Single pass, the fastest and no extra vram
quarter_resolution, ///< Larger motion vectors being caught, faster and uses less... | 1,869 | C++ | .h | 39 | 42.153846 | 124 | 0.709212 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,068 | nvenc_d3d11_native.h | LizardByte_Sunshine/src/nvenc/nvenc_d3d11_native.h | /**
* @file src/nvenc/nvenc_d3d11_native.h
* @brief Declarations for native Direct3D11 NVENC encoder.
*/
#pragma once
#ifdef _WIN32
#include <comdef.h>
#include <d3d11.h>
#include "nvenc_d3d11.h"
namespace nvenc {
/**
* @brief Native Direct3D11 NVENC encoder.
*/
class nvenc_d3d11... | 794 | C++ | .h | 30 | 21.566667 | 62 | 0.680481 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,069 | nvenc_encoded_frame.h | LizardByte_Sunshine/src/nvenc/nvenc_encoded_frame.h | /**
* @file src/nvenc/nvenc_encoded_frame.h
* @brief Declarations for NVENC encoded frame.
*/
#pragma once
#include <cstdint>
#include <vector>
namespace nvenc {
/**
* @brief Encoded frame.
*/
struct nvenc_encoded_frame {
std::vector<uint8_t> data;
uint64_t frame_index = 0;
... | 418 | C++ | .h | 18 | 19.055556 | 48 | 0.65051 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,070 | common.h | LizardByte_Sunshine/src/platform/common.h | /**
* @file src/platform/common.h
* @brief Declarations for common platform specific utilities.
*/
#pragma once
#include <bitset>
#include <filesystem>
#include <functional>
#include <mutex>
#include <string>
#include <boost/core/noncopyable.hpp>
#ifndef _WIN32
#include <boost/asio.hpp>
#include <boost/process... | 25,457 | C++ | .h | 774 | 28.257106 | 220 | 0.673753 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,071 | wayland.h | LizardByte_Sunshine/src/platform/linux/wayland.h | /**
* @file src/platform/linux/wayland.h
* @brief Declarations for Wayland capture.
*/
#pragma once
#include <bitset>
#ifdef SUNSHINE_BUILD_WAYLAND
#include <wlr-export-dmabuf-unstable-v1.h>
#include <xdg-output-unstable-v1.h>
#endif
#include "graphics.h"
/**
* The classes defined in this macro block should... | 6,212 | C++ | .h | 209 | 24.789474 | 105 | 0.654662 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,072 | graphics.h | LizardByte_Sunshine/src/platform/linux/graphics.h | /**
* @file src/platform/linux/graphics.h
* @brief Declarations for graphics related functions.
*/
#pragma once
#include <optional>
#include <string_view>
#include <glad/egl.h>
#include <glad/gl.h>
#include "misc.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/utility.h"
#include "src/v... | 8,578 | C++ | .h | 285 | 25.308772 | 106 | 0.648062 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,073 | cuda.h | LizardByte_Sunshine/src/platform/linux/cuda.h | /**
* @file src/platform/linux/cuda.h
* @brief Definitions for CUDA implementation.
*/
#pragma once
#if defined(SUNSHINE_BUILD_CUDA)
#include "src/video_colorspace.h"
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>
namespace platf {
class avcodec_encode_... | 3,464 | C++ | .h | 108 | 28.101852 | 175 | 0.69284 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,074 | misc.h | LizardByte_Sunshine/src/platform/linux/misc.h | /**
* @file src/platform/linux/misc.h
* @brief Miscellaneous declarations for Linux.
*/
#pragma once
#include <unistd.h>
#include <vector>
#include "src/utility.h"
KITTY_USING_MOVE_T(file_t, int, -1, {
if (el >= 0) {
close(el);
}
});
enum class window_system_e {
NONE, ///< No window system
X11, ///... | 634 | C++ | .h | 26 | 22.038462 | 104 | 0.67 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,075 | x11grab.h | LizardByte_Sunshine/src/platform/linux/x11grab.h | /**
* @file src/platform/linux/x11grab.h
* @brief Declarations for x11 capture.
*/
#pragma once
#include <optional>
#include "src/platform/common.h"
#include "src/utility.h"
// X11 Display
extern "C" struct _XDisplay;
namespace egl {
class cursor_t;
}
namespace platf::x11 {
struct cursor_ctx_raw_t;
void
... | 976 | C++ | .h | 40 | 20.975 | 71 | 0.684324 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,076 | vaapi.h | LizardByte_Sunshine/src/platform/linux/vaapi.h | /**
* @file src/platform/linux/vaapi.h
* @brief Declarations for VA-API hardware accelerated capture.
*/
#pragma once
#include "misc.h"
#include "src/platform/common.h"
namespace egl {
struct surface_descriptor_t;
}
namespace va {
/**
* Width --> Width of the image
* Height --> Height of the image
* o... | 1,091 | C++ | .h | 28 | 36.321429 | 106 | 0.729245 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,077 | inputtino_touch.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_touch.h | /**
* @file src/platform/linux/input/inputtino_touch.h
* @brief Declarations for inputtino touch input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/platform/common.h"
#include "inputtino_common.h"
using namespace std::literals;
... | 450 | C++ | .h | 15 | 28.2 | 94 | 0.769767 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,078 | inputtino_keyboard.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_keyboard.h | /**
* @file src/platform/linux/input/inputtino_keyboard.h
* @brief Declarations for inputtino keyboard input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "inputtino_common.h"
using namespace std::literals;
namespace platf::keyboard {... | 494 | C++ | .h | 16 | 28.875 | 74 | 0.761099 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,079 | inputtino_mouse.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_mouse.h | /**
* @file src/platform/linux/input/inputtino_mouse.h
* @brief Declarations for inputtino mouse input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/platform/common.h"
#include "inputtino_common.h"
using namespace std::literals;
... | 752 | C++ | .h | 25 | 27.6 | 79 | 0.739191 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,080 | inputtino_pen.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_pen.h | /**
* @file src/platform/linux/input/inputtino_pen.h
* @brief Declarations for inputtino pen input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/platform/common.h"
#include "inputtino_common.h"
using namespace std::literals;
nam... | 440 | C++ | .h | 15 | 27.533333 | 90 | 0.764286 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,081 | inputtino_gamepad.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_gamepad.h | /**
* @file src/platform/linux/input/inputtino_gamepad.h
* @brief Declarations for inputtino gamepad input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/platform/common.h"
#include "inputtino_common.h"
using namespace std::litera... | 1,099 | C++ | .h | 32 | 31.46875 | 118 | 0.741935 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,082 | inputtino_common.h | LizardByte_Sunshine/src/platform/linux/input/inputtino_common.h | /**
* @file src/platform/linux/input/inputtino_common.h
* @brief Declarations for inputtino common input handling.
*/
#pragma once
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
#include "src/config.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "sr... | 3,160 | C++ | .h | 87 | 30.103448 | 124 | 0.644001 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,083 | av_img_t.h | LizardByte_Sunshine/src/platform/macos/av_img_t.h | /**
* @file src/platform/macos/av_img_t.h
* @brief Declarations for AV image types on macOS.
*/
#pragma once
#include "src/platform/common.h"
#include <CoreMedia/CoreMedia.h>
#include <CoreVideo/CoreVideo.h>
namespace platf {
struct av_sample_buf_t {
CMSampleBufferRef buf;
explicit av_sample_buf_t(CMSa... | 1,570 | C++ | .h | 54 | 23.944444 | 73 | 0.650931 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,084 | av_video.h | LizardByte_Sunshine/src/platform/macos/av_video.h | /**
* @file src/platform/macos/av_video.h
* @brief Declarations for video capture on macOS.
*/
#pragma once
#import <AVFoundation/AVFoundation.h>
#import <AppKit/AppKit.h>
struct CaptureSession {
AVCaptureVideoDataOutput *output;
NSCondition *captureStopped;
};
@interface AVVideo: NSObject <AVCaptureVideoData... | 1,381 | C++ | .h | 29 | 46 | 106 | 0.823266 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,085 | misc.h | LizardByte_Sunshine/src/platform/macos/misc.h | /**
* @file src/platform/macos/misc.h
* @brief Miscellaneous declarations for macOS platform.
*/
#pragma once
#include <vector>
#include <CoreGraphics/CoreGraphics.h>
namespace platf {
bool
is_screen_capture_allowed();
}
namespace dyn {
typedef void (*apiproc)();
int
load(void *handle, const std::vect... | 468 | C++ | .h | 18 | 23.722222 | 104 | 0.718468 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,086 | nv12_zero_device.h | LizardByte_Sunshine/src/platform/macos/nv12_zero_device.h | /**
* @file src/platform/macos/nv12_zero_device.h
* @brief Declarations for NV12 zero copy device on macOS.
*/
#pragma once
#include "src/platform/common.h"
struct AVFrame;
namespace platf {
void
free_frame(AVFrame *frame);
class nv12_zero_device: public avcodec_encode_device_t {
// display holds a poi... | 1,213 | C++ | .h | 30 | 36.633333 | 116 | 0.73339 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,087 | av_audio.h | LizardByte_Sunshine/src/platform/macos/av_audio.h | /**
* @file src/platform/macos/av_audio.h
* @brief Declarations for audio capture on macOS.
*/
#pragma once
#import <AVFoundation/AVFoundation.h>
#include "third-party/TPCircularBuffer/TPCircularBuffer.h"
#define kBufferLength 4096
@interface AVAudio: NSObject <AVCaptureAudioDataOutputSampleBufferDelegate> {
@pu... | 793 | C++ | .h | 19 | 40.052632 | 132 | 0.826371 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,088 | keylayout.h | LizardByte_Sunshine/src/platform/windows/keylayout.h | /**
* @file src/platform/windows/keylayout.h
* @brief Keyboard layout mapping for scancode translation
*/
#pragma once
#include <array>
#include <cstdint>
namespace platf {
// Virtual Key to Scan Code mapping for the US English layout (00000409).
// GameStream uses this as the canonical key layout for scancode... | 5,241 | C++ | .h | 269 | 14.628253 | 103 | 0.35835 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,089 | misc.h | LizardByte_Sunshine/src/platform/windows/misc.h | /**
* @file src/platform/windows/misc.h
* @brief Miscellaneous declarations for Windows.
*/
#pragma once
#include <chrono>
#include <string_view>
#include <windows.h>
#include <winnt.h>
namespace platf {
void
print_status(const std::string_view &prefix, HRESULT status);
HDESK
syncThreadDesktop();
int64_... | 898 | C++ | .h | 33 | 24.363636 | 82 | 0.714785 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,090 | display.h | LizardByte_Sunshine/src/platform/windows/display.h | /**
* @file src/platform/windows/display.h
* @brief Declarations for the Windows display backend.
*/
#pragma once
#include <d3d11.h>
#include <d3d11_4.h>
#include <d3dcommon.h>
#include <dwmapi.h>
#include <dxgi.h>
#include <dxgi1_6.h>
#include <Unknwn.h>
#include <winrt/Windows.Graphics.Capture.h>
#include "src/... | 15,081 | C++ | .h | 363 | 36.358127 | 166 | 0.714793 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,091 | PolicyConfig.h | LizardByte_Sunshine/src/platform/windows/PolicyConfig.h | /**
* @file src/platform/windows/PolicyConfig.h
* @brief Undocumented COM-interface IPolicyConfig.
* @details Use for setting default audio render endpoint.
* @author EreTIk
* @see https://kitere.github.io/
*/
#pragma once
#include <mmdeviceapi.h>
#ifdef __MINGW32__
#undef DEFINE_GUID
#ifdef __cplusplus
... | 2,717 | C++ | .h | 86 | 28.325581 | 168 | 0.697016 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,092 | undo_file.h | LizardByte_Sunshine/src/platform/windows/nvprefs/undo_file.h | /**
* @file src/platform/windows/nvprefs/undo_file.h
* @brief Declarations for the nvidia undo file.
*/
#pragma once
// standard library headers
#include <filesystem>
// local includes
#include "nvprefs_common.h"
#include "undo_data.h"
namespace nvprefs {
class undo_file_t {
public:
static std::optional<... | 748 | C++ | .h | 28 | 23.25 | 77 | 0.705634 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,093 | nvprefs_interface.h | LizardByte_Sunshine/src/platform/windows/nvprefs/nvprefs_interface.h | /**
* @file src/platform/windows/nvprefs/nvprefs_interface.h
* @brief Declarations for nvidia preferences interface.
*/
#pragma once
// standard library headers
#include <memory>
namespace nvprefs {
class nvprefs_interface {
public:
nvprefs_interface();
~nvprefs_interface();
bool
load();
... | 650 | C++ | .h | 31 | 16.903226 | 57 | 0.686985 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,094 | driver_settings.h | LizardByte_Sunshine/src/platform/windows/nvprefs/driver_settings.h | /**
* @file src/platform/windows/nvprefs/driver_settings.h
* @brief Declarations for nvidia driver settings.
*/
#pragma once
// nvapi headers
// disable clang-format header reordering
// as <NvApiDriverSettings.h> needs types from <nvapi.h>
// clang-format off
#include <nvapi.h>
#include <NvApiDriverSettings.h>
// ... | 888 | C++ | .h | 36 | 21.222222 | 75 | 0.715137 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,095 | nvprefs_common.h | LizardByte_Sunshine/src/platform/windows/nvprefs/nvprefs_common.h | /**
* @file src/platform/windows/nvprefs/nvprefs_common.h
* @brief Declarations for common nvidia preferences.
*/
#pragma once
// sunshine utility header for generic smart pointers
#include "src/utility.h"
// winapi headers
// disable clang-format header reordering
// clang-format off
#include <windows.h>
#include... | 1,320 | C++ | .h | 46 | 25.326087 | 84 | 0.709524 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,096 | undo_data.h | LizardByte_Sunshine/src/platform/windows/nvprefs/undo_data.h | /**
* @file src/platform/windows/nvprefs/undo_data.h
* @brief Declarations for undoing changes to nvidia preferences.
*/
#pragma once
// standard library headers
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
namespace nvprefs {
class undo_data_t {
public:
struct data_t {
... | 869 | C++ | .h | 34 | 21.382353 | 81 | 0.68568 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
4,098 | egl.h | LizardByte_Sunshine/third-party/glad/include/glad/egl.h | /**
* Loader generated by glad 2.0.0-beta on Tue Jun 1 10:22:05 2021
*
* Generator: C/C++
* Specification: egl
* Extensions: 0
*
* APIs:
* - egl=1.5
*
* Options:
* - ALIAS = False
* - DEBUG = False
* - HEADER_ONLY = False
* - LOADER = True
* - MX = True
* - MX_GLOBAL = False
* - ON_DEMAND = Fa... | 22,559 | C++ | .h | 506 | 42.482213 | 176 | 0.824287 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | true | false | false | false | false | false | false |
4,099 | eglplatform.h | LizardByte_Sunshine/third-party/glad/include/EGL/eglplatform.h | #ifndef __eglplatform_h_
#define __eglplatform_h_
/*
** Copyright 2007-2020 The Khronos Group Inc.
** SPDX-License-Identifier: Apache-2.0
*/
/* Platform-specific types and definitions for egl.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modificati... | 4,954 | C++ | .h | 126 | 37.531746 | 118 | 0.799499 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | true | false | false | false | false | false | false |
4,101 | NvFBC.h | LizardByte_Sunshine/third-party/nvfbc/NvFBC.h | /*!
* \file
*
* This file contains the interface constants, structure definitions and
* function prototypes defining the NvFBC API for Linux.
*
* Copyright (c) 2013-2020, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software... | 65,817 | C++ | .h | 1,914 | 31.584117 | 148 | 0.722458 | LizardByte/Sunshine | 18,156 | 876 | 103 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.