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,880 | ratelimit_manager.h | typesense_typesense/include/ratelimit_manager.h | #pragma once
#include <string>
#include <vector>
#include <tuple>
#include <unordered_map>
#include <mutex>
#include <shared_mutex>
#include <json.hpp>
#include <magic_enum.hpp>
#include "lru/lru.hpp"
#include "option.h"
#include "store.h"
// Action enum for rate limit rules
enum class RateLimitAction {
allow,... | 10,685 | C++ | .h | 224 | 40.754464 | 298 | 0.679722 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,881 | join.h | typesense_typesense/include/join.h | #pragma once
#include "option.h"
#include "json.hpp"
#include "tsl/htrie_map.h"
#include "field.h"
#include "tsl/htrie_set.h"
#include "filter_result_iterator.h"
struct reference_info_t {
std::string collection;
std::string field;
bool is_async;
std::string referenced_field_name;
reference_info_... | 3,695 | C++ | .h | 58 | 45.482759 | 139 | 0.568904 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,882 | japanese_localizer.h | typesense_typesense/include/japanese_localizer.h | #pragma once
#include <string>
#include <mutex>
class JapaneseLocalizer {
private:
JapaneseLocalizer();
~JapaneseLocalizer() = default;
static void write_data_file(const std::string& base64_data, const std::string& file_name);
std::mutex m;
public:
static JapaneseLocalizer & get_instance() {
... | 462 | C++ | .h | 17 | 22.823529 | 94 | 0.704128 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,883 | query_analytics.h | typesense_typesense/include/query_analytics.h | #pragma once
#include <string>
#include <vector>
#include <tsl/htrie_map.h>
#include <json.hpp>
#include <atomic>
#include <shared_mutex>
class QueryAnalytics {
public:
struct QWithTimestamp {
std::string query;
uint64_t timestamp;
QWithTimestamp(const std::string& query, uint64_t timesta... | 1,494 | C++ | .h | 39 | 33.512821 | 108 | 0.703343 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,884 | text_embedder_tokenizer.h | typesense_typesense/include/text_embedder_tokenizer.h | #pragma
#include <vector>
#include <unordered_map>
#include <sentencepiece_processor.h>
#include <tokenizer/bert_tokenizer.hpp>
#include <clip_tokenizer.h>
#include <core/session/onnxruntime_cxx_api.h>
#include <mutex>
enum class TokenizerType {
bert,
distilbert,
xlm_roberta,
clip
};
struct encoded_... | 2,740 | C++ | .h | 77 | 29.675325 | 88 | 0.679985 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,885 | conversation_manager.h | typesense_typesense/include/conversation_manager.h | #pragma once
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <shared_mutex>
#include <mutex>
#include <json.hpp>
#include "option.h"
#include "store.h"
#include "sole.hpp"
#include "collection_manager.h"
#include "conversation_model_manager.h"
class ConversationManager {
public:
... | 2,189 | C++ | .h | 48 | 38.583333 | 138 | 0.698778 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,886 | core_api_utils.h | typesense_typesense/include/core_api_utils.h | #pragma once
#include <cstdlib>
#include <vector>
#include "collection.h"
#include "http_data.h"
struct deletion_state_t: public req_state_t {
Collection* collection;
std::vector<std::pair<size_t, uint32_t*>> index_ids; // ids_len -> ids
std::vector<size_t> offsets;
size_t num_removed;
~deletion... | 1,231 | C++ | .h | 36 | 29.555556 | 99 | 0.679293 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,887 | stemmer_manager.h | typesense_typesense/include/stemmer_manager.h | #pragma once
#include <unordered_map>
#include <string>
#include <vector>
#include <memory>
#include <mutex>
#include <libstemmer.h>
#include "lru/lru.hpp"
class Stemmer {
private:
sb_stemmer * stemmer = nullptr;
LRU::Cache<std::string, std::string> cache;
std::mutex mutex;
public:
... | 1,224 | C++ | .h | 38 | 25.815789 | 75 | 0.647208 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,888 | text_embedder.h | typesense_typesense/include/text_embedder.h | #pragma once
#include <sentencepiece_processor.h>
#include <core/session/onnxruntime_cxx_api.h>
#include <tokenizer/bert_tokenizer.hpp>
#include <vector>
#include "option.h"
#include "text_embedder_tokenizer.h"
#include "text_embedder_remote.h"
class TextEmbedder {
public:
// Constructor for local or pub... | 2,276 | C++ | .h | 49 | 37.836735 | 149 | 0.643082 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,889 | thread_local_vars.h | typesense_typesense/include/thread_local_vars.h | #include <chrono>
extern thread_local int64_t write_log_index;
// These are used for circuit breaking search requests
// NOTE: if you fork off main search thread, care must be taken to initialize these from parent thread values
extern thread_local uint64_t search_begin_us;
extern thread_local uint64_t search_stop_us;... | 360 | C++ | .h | 7 | 50.285714 | 109 | 0.809659 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,890 | collection_manager.h | typesense_typesense/include/collection_manager.h | #pragma once
#include <iostream>
#include <string>
#include <sparsepp.h>
#include "store.h"
#include "field.h"
#include "collection.h"
#include "auth_manager.h"
#include "threadpool.h"
#include "batched_indexer.h"
template<typename ResourceType>
struct locked_resource_view_t {
locked_resource_view_t(std::shared_m... | 9,630 | C++ | .h | 159 | 47.949686 | 149 | 0.62476 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,891 | archive_utils.h | typesense_typesense/include/archive_utils.h | #pragma once
#include <string>
#include <vector>
#include <archive.h>
#include <archive_entry.h>
#include <fcntl.h>
#include <sys/stat.h>
class ArchiveUtils {
public:
static constexpr const char* TAR_GZ_EXTENSION = ".tar.gz";
static bool extract_tar_gz_from_file(const std::string& archive_path, const std::str... | 862 | C++ | .h | 20 | 40.15 | 116 | 0.740167 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,892 | analytics_manager.h | typesense_typesense/include/analytics_manager.h | #pragma once
#include "query_analytics.h"
#include "option.h"
#include "raft_server.h"
#include <vector>
#include <string>
#include <unordered_map>
#include <shared_mutex>
#include "lru/lru.hpp"
struct event_type_collection {
std::string event_type;
std::string destination_collection;
std::vector<std::stri... | 7,473 | C++ | .h | 174 | 35.689655 | 134 | 0.653405 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,893 | http_proxy.h | typesense_typesense/include/http_proxy.h | #pragma once
#include <unordered_map>
#include <string>
#include "http_client.h"
#include "lru/lru.hpp"
struct http_proxy_res_t {
std::string body;
std::map<std::string, std::string> headers;
long status_code;
bool operator==(const http_proxy_res_t& other) const {
return body == other.body &... | 1,637 | C++ | .h | 40 | 33.2 | 169 | 0.621537 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,894 | collection.h | typesense_typesense/include/collection.h | #pragma once
#include <string>
#include <vector>
#include <string>
#include <unordered_map>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <shared_mutex>
#include "art.h"
#include "index.h"
#include "number.h"
#include "store.h"
#include "topster.h"
#include "json.hpp"
#include "field.h"
#in... | 39,933 | C++ | .h | 568 | 50.072183 | 171 | 0.554761 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,896 | typesense_server_utils.h | typesense_typesense/include/typesense_server_utils.h | #pragma once
#include "logger.h"
#include <string>
#include <iostream>
#include <cmdline.h>
#include "tsconfig.h"
#include "store.h"
#include "collection_manager.h"
#include <csignal>
#include <sys/types.h>
#include <sys/stat.h>
#include "http_server.h"
extern HttpServer* server;
void catch_interrupt(int sig);
bool... | 633 | C++ | .h | 19 | 31.157895 | 75 | 0.749588 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,897 | num_tree.h | typesense_typesense/include/num_tree.h | #pragma once
#include <map>
#include "sparsepp.h"
#include "sorted_array.h"
#include "array_utils.h"
#include "ids_t.h"
#include "filter.h"
class num_tree_t {
private:
std::map<int64_t, void*> int64map;
[[nodiscard]] bool range_inclusive_contains(const int64_t& start, const int64_t& end, const uint32_t& id) ... | 3,684 | C++ | .h | 74 | 40.378378 | 120 | 0.61962 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,898 | posting_list.h | typesense_typesense/include/posting_list.h | #pragma once
#include <map>
#include <unordered_map>
#include "sorted_array.h"
#include "array.h"
#include "match_score.h"
#include "thread_local_vars.h"
typedef uint32_t last_id_t;
class filter_result_iterator_t;
struct result_iter_state_t {
const uint32_t* excluded_result_ids = nullptr;
const size_t exclud... | 11,285 | C++ | .h | 223 | 38.704036 | 149 | 0.586659 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,899 | stopwords_manager.h | typesense_typesense/include/stopwords_manager.h | #pragma once
#include "sparsepp.h"
#include "option.h"
#include "json.hpp"
#include "shared_mutex"
#include "mutex"
#include "store.h"
struct stopword_struct_t {
std::string id;
spp::sparse_hash_set<std::string> stopwords;
std::string locale;
nlohmann::json to_json() const {
nlohmann::json do... | 1,523 | C++ | .h | 47 | 26.914894 | 103 | 0.663693 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,900 | housekeeper.h | typesense_typesense/include/housekeeper.h | #pragma once
#include <mutex>
#include <atomic>
#include <condition_variable>
#include "http_data.h"
class HouseKeeper {
private:
mutable std::mutex mutex;
std::condition_variable cv;
std::atomic<bool> quit = false;
std::atomic<uint32_t> remove_expired_keys_interval_s = 3600;
std::atomic<uint32_t>... | 1,526 | C++ | .h | 44 | 29.090909 | 97 | 0.662329 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,901 | threadpool.h | typesense_typesense/include/threadpool.h | // https://github.com/jhasse/ThreadPool
#pragma once
#include <functional>
#include <future>
#include <queue>
#include "logger.h"
class ThreadPool {
public:
explicit ThreadPool(size_t);
template<class F, class... Args>
decltype(auto) enqueue(F&& f, Args&&... args);
void log_exhaustion();
void shu... | 3,152 | C++ | .h | 93 | 23.139785 | 114 | 0.508207 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,903 | array.h | typesense_typesense/include/array.h | #pragma once
#include <stdio.h>
#include <cstdlib>
#include <for.h>
#include <cstring>
#include <limits>
#include <iostream>
#include "array_base.h"
class array: public array_base {
private:
uint32_t inline unsorted_append_size_required(uint32_t value, uint32_t new_length) {
uint32_t m = std::min(min, val... | 890 | C++ | .h | 25 | 31.56 | 91 | 0.694282 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,904 | conversation_model.h | typesense_typesense/include/conversation_model.h | #pragma once
#include <string>
#include <condition_variable>
#include <mutex>
#include <json.hpp>
#include "option.h"
struct async_conversation_t {
std::string response;
std::mutex mutex;
std::condition_variable cv;
};
class ConversationModel {
public:
virtual ~ConversationModel() {};
... | 6,815 | C++ | .h | 96 | 63.458333 | 349 | 0.709178 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,906 | facet_index.h | typesense_typesense/include/facet_index.h | #pragma once
#include "ids_t.h"
#include "tsl/htrie_map.h"
#include <unordered_set>
#include <posting_list.h>
#include <num_tree.h>
#include <list>
#include <field.h>
struct facet_value_id_t {
std::string facet_value;
uint32_t facet_id = UINT32_MAX;
bool operator==(const facet_value_id_t& other) const {
... | 6,101 | C++ | .h | 136 | 35.110294 | 106 | 0.601764 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,907 | ids_t.h | typesense_typesense/include/ids_t.h | #pragma once
#include <cstdint>
#include <vector>
#include "id_list.h"
#include "threadpool.h"
#define IS_COMPACT_IDS(x) (((uintptr_t)(x) & 1))
#define SET_COMPACT_IDS(x) ((void*)((uintptr_t)(x) | 1))
#define RAW_IDS_PTR(x) ((void*)((uintptr_t)(x) & ~1))
#define COMPACT_IDS_PTR(x) ((compact_id_list_t*)((uintptr_t)(x)... | 5,449 | C++ | .h | 118 | 37.838983 | 111 | 0.614497 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,908 | file_utils.h | typesense_typesense/include/file_utils.h | #pragma once
bool directory_exists(const std::string & dir_path);
bool create_directory(const std::string& dir_path);
bool file_exists(const std::string & file_path);
// tries to hard link first
bool copy_dir(const std::string& from_path, const std::string& to_path);
bool mv_dir(const std::string& from_path, const... | 535 | C++ | .h | 10 | 51.8 | 75 | 0.750965 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,909 | stackprinter.h | typesense_typesense/include/stackprinter.h | #include <string>
#include <unistd.h>
#include <execinfo.h>
#include <regex>
// Currently used only for Mac. Using backward.hpp for Linux.
class StackPrinter {
public:
static std::string getexepath() {
char result[PATH_MAX];
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
re... | 2,546 | C++ | .h | 69 | 26.42029 | 99 | 0.490459 | typesense/typesense | 20,571 | 633 | 548 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,917 | main.cpp | trojan-gfw_trojan/src/main.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 6,669 | C++ | .cpp | 170 | 31.352941 | 133 | 0.595381 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,918 | clientsession.cpp | trojan-gfw_trojan/src/session/clientsession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 16,158 | C++ | .cpp | 398 | 29.773869 | 296 | 0.541193 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,919 | udpforwardsession.cpp | trojan-gfw_trojan/src/session/udpforwardsession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 9,686 | C++ | .cpp | 229 | 34.078603 | 217 | 0.607941 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,920 | session.cpp | trojan-gfw_trojan/src/session/session.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,461 | C++ | .cpp | 26 | 39.423077 | 111 | 0.550279 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,921 | natsession.cpp | trojan-gfw_trojan/src/session/natsession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 10,441 | C++ | .cpp | 263 | 32.235741 | 217 | 0.609564 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,922 | serversession.cpp | trojan-gfw_trojan/src/session/serversession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 14,750 | C++ | .cpp | 350 | 32.257143 | 217 | 0.567336 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,923 | forwardsession.cpp | trojan-gfw_trojan/src/session/forwardsession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 8,765 | C++ | .cpp | 216 | 32.550926 | 217 | 0.602156 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,926 | version.cpp | trojan-gfw_trojan/src/core/version.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 956 | C++ | .cpp | 24 | 37.833333 | 72 | 0.756728 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,928 | service.cpp | trojan-gfw_trojan/src/core/service.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 16,496 | C++ | .cpp | 379 | 33.358839 | 204 | 0.586445 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,929 | ssldefaults.cpp | trojan-gfw_trojan/src/ssl/ssldefaults.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,437 | C++ | .cpp | 29 | 46.758621 | 72 | 0.765125 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,930 | sslsession.cpp | trojan-gfw_trojan/src/ssl/sslsession.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,415 | C++ | .cpp | 38 | 34.578947 | 72 | 0.741794 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,931 | socks5address.cpp | trojan-gfw_trojan/src/proto/socks5address.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 3,737 | C++ | .cpp | 95 | 29.810526 | 101 | 0.524869 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,932 | udppacket.cpp | trojan-gfw_trojan/src/proto/udppacket.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 2,232 | C++ | .cpp | 58 | 34.775862 | 96 | 0.670968 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,933 | trojanrequest.cpp | trojan-gfw_trojan/src/proto/trojanrequest.cpp | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,984 | C++ | .cpp | 54 | 32.777778 | 111 | 0.659574 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
3,934 | serversession.h | trojan-gfw_trojan/src/session/serversession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 2,217 | C++ | .h | 56 | 35.928571 | 178 | 0.713027 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,935 | natsession.h | trojan-gfw_trojan/src/session/natsession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,786 | C++ | .h | 48 | 33.770833 | 114 | 0.711649 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,936 | clientsession.h | trojan-gfw_trojan/src/session/clientsession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 2,073 | C++ | .h | 56 | 33.071429 | 117 | 0.701441 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,937 | session.h | trojan-gfw_trojan/src/session/session.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,923 | C++ | .h | 53 | 33.075472 | 72 | 0.712755 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,938 | forwardsession.h | trojan-gfw_trojan/src/session/forwardsession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,746 | C++ | .h | 47 | 33.744681 | 118 | 0.716224 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,939 | udpforwardsession.h | trojan-gfw_trojan/src/session/udpforwardsession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 2,011 | C++ | .h | 50 | 36.8 | 188 | 0.722534 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,941 | authenticator.h | trojan-gfw_trojan/src/core/authenticator.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,391 | C++ | .h | 40 | 32.25 | 81 | 0.744618 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,942 | service.h | trojan-gfw_trojan/src/core/service.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,820 | C++ | .h | 53 | 31.283019 | 72 | 0.719796 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,943 | log.h | trojan-gfw_trojan/src/core/log.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,818 | C++ | .h | 51 | 32.176471 | 129 | 0.710556 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,944 | config.h | trojan-gfw_trojan/src/core/config.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 2,656 | C++ | .h | 90 | 23.966667 | 72 | 0.656909 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,945 | ssldefaults.h | trojan-gfw_trojan/src/ssl/ssldefaults.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,023 | C++ | .h | 27 | 35.814815 | 72 | 0.754032 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,946 | sslsession.h | trojan-gfw_trojan/src/ssl/sslsession.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,228 | C++ | .h | 32 | 36.09375 | 72 | 0.749161 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,947 | socks5address.h | trojan-gfw_trojan/src/proto/socks5address.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,292 | C++ | .h | 36 | 32.972222 | 80 | 0.730032 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,948 | trojanrequest.h | trojan-gfw_trojan/src/proto/trojanrequest.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,277 | C++ | .h | 34 | 34.647059 | 117 | 0.738499 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,949 | udppacket.h | trojan-gfw_trojan/src/proto/udppacket.h | /*
* This file is part of the trojan project.
* Trojan is an unidentifiable mechanism that helps you bypass GFW.
* Copyright (C) 2017-2020 The Trojan Authors.
*
* 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 Fre... | 1,298 | C++ | .h | 31 | 39.419355 | 108 | 0.748219 | trojan-gfw/trojan | 18,846 | 3,016 | 86 | GPL-3.0 | 9/20/2024, 9:26:25 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
3,950 | sunshinesvc.cpp | LizardByte_Sunshine/tools/sunshinesvc.cpp | /**
* @file tools/sunshinesvc.cpp
* @brief Handles launching Sunshine.exe into user sessions as SYSTEM
*/
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <wtsapi32.h>
#include <string>
// PROC_THREAD_ATTRIBUTE_JOB_LIST is currently missing from MinGW headers
#ifndef PROC_THREAD_ATTRIBUTE_JOB_LIST
#defi... | 13,457 | C++ | .cpp | 349 | 33.684814 | 121 | 0.717133 | 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,951 | audio.cpp | LizardByte_Sunshine/tools/audio.cpp | /**
* @file tools/audio.cpp
* @brief Handles collecting audio device information from Windows.
*/
#define INITGUID
#include <audioclient.h>
#include <mmdeviceapi.h>
#include <roapi.h>
#include <codecvt>
#include <locale>
#include <synchapi.h>
#include <iostream>
#include "src/utility.h"
DEFINE_PROPERTYKEY(PKEY_... | 8,687 | C++ | .cpp | 258 | 28.368217 | 149 | 0.638677 | 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,952 | dxgi.cpp | LizardByte_Sunshine/tools/dxgi.cpp | /**
* @file tools/dxgi.cpp
* @brief Displays information about connected displays and GPUs
*/
#define WINVER 0x0A00
#include <d3dcommon.h>
#include <dxgi.h>
#include <iostream>
#include "src/utility.h"
using namespace std::literals;
namespace dxgi {
template <class T>
void
Release(T *dxgi) {
dxgi->Relea... | 2,848 | C++ | .cpp | 66 | 38.621212 | 113 | 0.641359 | 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,953 | ddprobe.cpp | LizardByte_Sunshine/tools/ddprobe.cpp | /**
* @file tools/ddprobe.cpp
* @brief Handles probing for DXGI duplication support.
*/
#include <d3d11.h>
#include <dxgi1_2.h>
#include <codecvt>
#include <iostream>
#include <locale>
#include <string>
#include <wrl.h>
#include "src/utility.h"
using Microsoft::WRL::ComPtr;
using namespace std::literals;
namespac... | 12,134 | C++ | .cpp | 279 | 39.336918 | 198 | 0.694153 | 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,954 | tests_main.cpp | LizardByte_Sunshine/tests/tests_main.cpp | /**
* @file tests/tests_main.cpp
* @brief Entry point definition.
*/
#include "tests_common.h"
#include "tests_environment.h"
#include "tests_events.h"
int
main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
testing::AddGlobalTestEnvironment(new SunshineEnvironment);
testing::UnitTest::GetInst... | 403 | C++ | .cpp | 14 | 26.928571 | 82 | 0.757732 | 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,955 | test_network.cpp | LizardByte_Sunshine/tests/unit/test_network.cpp | /**
* @file tests/unit/test_network.cpp
* @brief Test src/network.*
*/
#include <src/network.h>
#include "../tests_common.h"
struct MdnsInstanceNameTest: testing::TestWithParam<std::tuple<std::string, std::string>> {};
TEST_P(MdnsInstanceNameTest, Run) {
auto [input, expected] = GetParam();
ASSERT_EQ(net::mdn... | 795 | C++ | .cpp | 22 | 33.045455 | 93 | 0.682292 | 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,956 | test_audio.cpp | LizardByte_Sunshine/tests/unit/test_audio.cpp | /**
* @file tests/unit/test_audio.cpp
* @brief Test src/audio.*.
*/
#include <src/audio.h>
#include "../tests_common.h"
using namespace audio;
struct AudioTest: PlatformTestSuite, testing::WithParamInterface<std::tuple<std::basic_string_view<char>, config_t>> {
void
SetUp() override {
m_config = std::get<... | 2,038 | C++ | .cpp | 59 | 30.745763 | 150 | 0.635211 | 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,957 | test_mouse.cpp | LizardByte_Sunshine/tests/unit/test_mouse.cpp | /**
* @file tests/unit/test_mouse.cpp
* @brief Test src/input.*.
*/
#include <src/input.h>
#include "../tests_common.h"
struct MouseHIDTest: PlatformTestSuite, testing::WithParamInterface<util::point_t> {
void
SetUp() override {
#ifdef _WIN32
// TODO: Windows tests are failing, `get_mouse_loc` seems broken... | 3,729 | C++ | .cpp | 98 | 34.877551 | 97 | 0.674979 | 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,958 | test_file_handler.cpp | LizardByte_Sunshine/tests/unit/test_file_handler.cpp | /**
* @file tests/unit/test_file_handler.cpp
* @brief Test src/file_handler.*.
*/
#include <src/file_handler.h>
#include "../tests_common.h"
struct FileHandlerParentDirectoryTest: testing::TestWithParam<std::tuple<std::string, std::string>> {};
TEST_P(FileHandlerParentDirectoryTest, Run) {
auto [input, expected... | 2,871 | C++ | .cpp | 76 | 35.052632 | 103 | 0.713053 | 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,959 | test_rswrapper.cpp | LizardByte_Sunshine/tests/unit/test_rswrapper.cpp | /**
* @file tests/unit/test_rswrapper.cpp
* @brief Test src/rswrapper.*
*/
extern "C" {
#include <src/rswrapper.h>
}
#include "../tests_common.h"
TEST(ReedSolomonWrapperTests, InitTest) {
reed_solomon_init();
// Ensure all function pointers were populated
ASSERT_NE(reed_solomon_new, nullptr);
ASSERT_NE(re... | 877 | C++ | .cpp | 28 | 28.785714 | 72 | 0.718193 | 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,960 | test_entry_handler.cpp | LizardByte_Sunshine/tests/unit/test_entry_handler.cpp | /**
* @file tests/unit/test_entry_handler.cpp
* @brief Test src/entry_handler.*.
*/
#include <src/entry_handler.h>
#include "../tests_common.h"
#include "../tests_log_checker.h"
TEST(EntryHandlerTests, LogPublisherDataTest) {
// call log_publisher_data
log_publisher_data();
// check if specific log messages... | 611 | C++ | .cpp | 15 | 38.533333 | 95 | 0.725126 | 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,961 | test_httpcommon.cpp | LizardByte_Sunshine/tests/unit/test_httpcommon.cpp | /**
* @file tests/unit/test_httpcommon.cpp
* @brief Test src/httpcommon.*.
*/
#include <src/httpcommon.h>
#include "../tests_common.h"
struct UrlEscapeTest: testing::TestWithParam<std::tuple<std::string, std::string>> {};
TEST_P(UrlEscapeTest, Run) {
auto [input, expected] = GetParam();
ASSERT_EQ(http::url_es... | 1,965 | C++ | .cpp | 51 | 35.960784 | 89 | 0.699422 | 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,962 | test_logging.cpp | LizardByte_Sunshine/tests/unit/test_logging.cpp | /**
* @file tests/unit/test_logging.cpp
* @brief Test src/logging.*.
*/
#include <src/logging.h>
#include "../tests_common.h"
#include "../tests_log_checker.h"
#include <random>
namespace {
std::array log_levels = {
std::tuple("verbose", &verbose),
std::tuple("debug", &debug),
std::tuple("info", &in... | 1,129 | C++ | .cpp | 35 | 29.371429 | 82 | 0.679263 | 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,963 | test_video.cpp | LizardByte_Sunshine/tests/unit/test_video.cpp | /**
* @file tests/unit/test_video.cpp
* @brief Test src/video.*.
*/
#include <src/video.h>
#include "../tests_common.h"
struct EncoderTest: PlatformTestSuite, testing::WithParamInterface<video::encoder_t *> {
void
SetUp() override {
auto &encoder = *GetParam();
if (!video::validate_encoder(encoder, fal... | 1,167 | C++ | .cpp | 44 | 23 | 100 | 0.663986 | 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,964 | test_stream.cpp | LizardByte_Sunshine/tests/unit/test_stream.cpp | /**
* @file tests/unit/test_stream.cpp
* @brief Test src/stream.*
*/
#include <cstdint>
#include <functional>
#include <string>
#include <vector>
namespace stream {
std::vector<uint8_t>
concat_and_insert(uint64_t insert_size, uint64_t slice_size, const std::string_view &data1, const std::string_view &data2);
}... | 1,391 | C++ | .cpp | 34 | 38.647059 | 145 | 0.61658 | 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,965 | test_common.cpp | LizardByte_Sunshine/tests/unit/platform/test_common.cpp | /**
* @file tests/unit/platform/test_common.cpp
* @brief Test src/platform/common.*.
*/
#include <src/platform/common.h>
#include <boost/asio/ip/host_name.hpp>
#include "../../tests_common.h"
struct SetEnvTest: ::testing::TestWithParam<std::tuple<std::string, std::string, int>> {
protected:
void
TearDown() ov... | 1,525 | C++ | .cpp | 47 | 29.489362 | 88 | 0.686181 | 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,966 | httpcommon.cpp | LizardByte_Sunshine/src/httpcommon.cpp | /**
* @file src/httpcommon.cpp
* @brief Definitions for common HTTP.
*/
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "process.h"
#include <filesystem>
#include <utility>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#inclu... | 7,658 | C++ | .cpp | 221 | 29.624434 | 135 | 0.634803 | 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,967 | logging.cpp | LizardByte_Sunshine/src/logging.cpp | /**
* @file src/logging.cpp
* @brief Definitions for logging related functions.
*/
// standard includes
#include <fstream>
#include <iomanip>
#include <iostream>
// lib includes
#include <boost/core/null_deleter.hpp>
#include <boost/format.hpp>
#include <boost/log/attributes/clock.hpp>
#include <boost/log/common.hp... | 6,131 | C++ | .cpp | 171 | 30.883041 | 135 | 0.622661 | 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,968 | entry_handler.cpp | LizardByte_Sunshine/src/entry_handler.cpp | /**
* @file entry_handler.cpp
* @brief Definitions for entry handling functions.
*/
// standard includes
#include <csignal>
#include <iostream>
#include <thread>
// local includes
#include "config.h"
#include "confighttp.h"
#include "entry_handler.h"
#include "globals.h"
#include "httpcommon.h"
#include "logging.h"... | 6,971 | C++ | .cpp | 249 | 22.759036 | 104 | 0.624513 | 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,969 | config.cpp | LizardByte_Sunshine/src/config.cpp | /**
* @file src/config.cpp
* @brief Definitions for the configuration of Sunshine.
*/
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iostream>
#include <thread>
#include <unordered_map>
#include <utility>
#include <boost/asio.hpp>
#include <boost/filesystem.hpp>
#inclu... | 43,002 | C++ | .cpp | 1,109 | 32.191163 | 171 | 0.608286 | 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,970 | network.cpp | LizardByte_Sunshine/src/network.cpp | /**
* @file src/network.cpp
* @brief Definitions for networking related functions.
*/
#include "network.h"
#include "config.h"
#include "logging.h"
#include "utility.h"
#include <algorithm>
#include <sstream>
using namespace std::literals;
namespace ip = boost::asio::ip;
namespace net {
std::vector<ip::network_... | 5,936 | C++ | .cpp | 203 | 23.955665 | 110 | 0.600948 | 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,971 | cbs.cpp | LizardByte_Sunshine/src/cbs.cpp | /**
* @file src/cbs.cpp
* @brief Definitions for FFmpeg Coded Bitstream API.
*/
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavcodec/cbs_h264.h>
#include <libavcodec/cbs_h265.h>
#include <libavcodec/h264_levels.h>
#include <libavutil/pixdesc.h>
}
#include "cbs.h"
#include "logging.h"
#include "utility.... | 7,982 | C++ | .cpp | 198 | 35.09596 | 126 | 0.646869 | 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,972 | video.cpp | LizardByte_Sunshine/src/video.cpp | /**
* @file src/video.cpp
* @brief Definitions for video.
*/
#include <atomic>
#include <bitset>
#include <list>
#include <thread>
#include <boost/pointer_cast.hpp>
extern "C" {
#include <libavutil/imgutils.h>
#include <libavutil/mastering_display_metadata.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.... | 100,656 | C++ | .cpp | 2,448 | 33.646242 | 207 | 0.608997 | 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,973 | stat_trackers.cpp | LizardByte_Sunshine/src/stat_trackers.cpp | /**
* @file src/stat_trackers.cpp
* @brief Definitions for streaming statistic tracking.
*/
#include "stat_trackers.h"
namespace stat_trackers {
boost::format
one_digit_after_decimal() {
return boost::format("%1$.1f");
}
boost::format
two_digits_after_decimal() {
return boost::for... | 374 | C++ | .cpp | 15 | 20.866667 | 56 | 0.660969 | 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,974 | confighttp.cpp | LizardByte_Sunshine/src/confighttp.cpp | /**
* @file src/confighttp.cpp
* @brief Definitions for the Web UI Config HTTP server.
*
* @todo Authentication, better handling of routes common to nvhttp, cleanup
*/
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "process.h"
#include <filesystem>
#include <set>
#include <boost/property_tree/json_parser.hpp>
... | 31,907 | C++ | .cpp | 856 | 31.869159 | 142 | 0.64572 | 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,975 | input.cpp | LizardByte_Sunshine/src/input.cpp | /**
* @file src/input.cpp
* @brief Definitions for gamepad, keyboard, and mouse input handling.
*/
// define uint32_t for <moonlight-common-c/src/Input.h>
#include <cstdint>
extern "C" {
#include <moonlight-common-c/src/Input.h>
#include <moonlight-common-c/src/Limelight.h>
}
#include <bitset>
#include <chrono>
#in... | 57,366 | C++ | .cpp | 1,481 | 32.896691 | 151 | 0.642155 | 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,976 | main.cpp | LizardByte_Sunshine/src/main.cpp | /**
* @file src/main.cpp
* @brief Definitions for the main entry point for Sunshine.
*/
// standard includes
#include <codecvt>
#include <csignal>
#include <fstream>
#include <iostream>
// local includes
#include "confighttp.h"
#include "entry_handler.h"
#include "globals.h"
#include "httpcommon.h"
#include "loggin... | 10,408 | C++ | .cpp | 283 | 32.791519 | 158 | 0.692117 | 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,977 | stream.cpp | LizardByte_Sunshine/src/stream.cpp | /**
* @file src/stream.cpp
* @brief Definitions for the streaming protocols.
*/
#include "process.h"
#include <future>
#include <queue>
#include <fstream>
#include <openssl/err.h>
#include <boost/endian/arithmetic.hpp>
extern "C" {
// clang-format off
#include <moonlight-common-c/src/Limelight-internal.h>
#inclu... | 76,868 | C++ | .cpp | 1,652 | 38.986077 | 183 | 0.629818 | 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,978 | rtsp.cpp | LizardByte_Sunshine/src/rtsp.cpp | /**
* @file src/rtsp.cpp
* @brief Definitions for RTSP streaming.
*/
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
extern "C" {
#include <moonlight-common-c/src/Limelight-internal.h>
#include <moonlight-common-c/src/Rtsp.h>
}
#include <array>
#include <cctype>
#include <utility>
#include <boost/asio.hpp>
#include <boost... | 43,824 | C++ | .cpp | 963 | 38.870197 | 196 | 0.634616 | 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,979 | audio.cpp | LizardByte_Sunshine/src/audio.cpp | /**
* @file src/audio.cpp
* @brief Definitions for audio capture and encoding.
*/
#include <thread>
#include <opus/opus_multistream.h>
#include "platform/common.h"
#include "audio.h"
#include "config.h"
#include "globals.h"
#include "logging.h"
#include "thread_safe.h"
#include "utility.h"
namespace audio {
us... | 8,711 | C++ | .cpp | 272 | 25.897059 | 123 | 0.627369 | 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,980 | nvhttp.cpp | LizardByte_Sunshine/src/nvhttp.cpp | /**
* @file src/nvhttp.cpp
* @brief Definitions for the nvhttp (GameStream) server.
*/
// macros
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
// standard includes
#include <filesystem>
#include <utility>
// lib includes
#include <Simple-Web-Server/server_http.hpp>
#include <Simple-Web-Server/server_https.hpp>
#include <... | 39,504 | C++ | .cpp | 943 | 35.774125 | 206 | 0.642015 | 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,981 | file_handler.cpp | LizardByte_Sunshine/src/file_handler.cpp | /**
* @file file_handler.cpp
* @brief Definitions for file handling functions.
*/
// standard includes
#include <filesystem>
#include <fstream>
// local includes
#include "file_handler.h"
#include "logging.h"
namespace file_handler {
std::string
get_parent_directory(const std::string &path) {
// remove an... | 1,320 | C++ | .cpp | 48 | 23.479167 | 98 | 0.653175 | 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,982 | system_tray.cpp | LizardByte_Sunshine/src/system_tray.cpp | /**
* @file src/system_tray.cpp
* @brief Definitions for the system tray icon and notification system.
*/
// macros
#if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <accctrl.h>
#include <aclapi.h>
#define TRAY_ICON WEB_DIR "images/sunshine.ic... | 9,570 | C++ | .cpp | 288 | 27.770833 | 118 | 0.644411 | 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,983 | upnp.cpp | LizardByte_Sunshine/src/upnp.cpp | /**
* @file src/upnp.cpp
* @brief Definitions for UPnP port mapping.
*/
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>
#include "config.h"
#include "confighttp.h"
#include "globals.h"
#include "logging.h"
#include "network.h"
#include "nvhttp.h"
#include "rtsp.h"
#include "stream.h"
#include "... | 13,607 | C++ | .cpp | 337 | 32.002967 | 136 | 0.587537 | 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,984 | process.cpp | LizardByte_Sunshine/src/process.cpp | /**
* @file src/process.cpp
* @brief Definitions for the startup and shutdown of the apps started by a streaming Session.
*/
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "process.h"
#include <filesystem>
#include <string>
#include <thread>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost... | 24,695 | C++ | .cpp | 607 | 33.520593 | 145 | 0.601927 | 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,985 | globals.cpp | LizardByte_Sunshine/src/globals.cpp | /**
* @file globals.cpp
* @brief Definitions for globally accessible variables and functions.
*/
#include "globals.h"
safe::mail_t mail::man;
thread_pool_util::ThreadPool task_pool;
bool display_cursor = true;
#ifdef _WIN32
nvprefs::nvprefs_interface nvprefs_instance;
#endif
| 281 | C++ | .cpp | 11 | 24.090909 | 70 | 0.779851 | 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,986 | video_colorspace.cpp | LizardByte_Sunshine/src/video_colorspace.cpp | /**
* @file src/video_colorspace.cpp
* @brief Definitions for colorspace functions.
*/
#include "video_colorspace.h"
#include "logging.h"
#include "video.h"
extern "C" {
#include <libswscale/swscale.h>
}
namespace video {
bool
colorspace_is_hdr(const sunshine_colorspace_t &colorspace) {
... | 9,571 | C++ | .cpp | 242 | 31.165289 | 112 | 0.591899 | 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,987 | crypto.cpp | LizardByte_Sunshine/src/crypto.cpp | /**
* @file src/crypto.cpp
* @brief Definitions for cryptography functions.
*/
#include "crypto.h"
#include <openssl/pem.h>
#include <openssl/rsa.h>
namespace crypto {
using asn1_string_t = util::safe_ptr<ASN1_STRING, ASN1_STRING_free>;
cert_chain_t::cert_chain_t():
_certs {}, _cert_ctx { X509_STORE_CTX_... | 16,756 | C++ | .cpp | 404 | 35.522277 | 152 | 0.630385 | 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,988 | nvenc_utils.cpp | LizardByte_Sunshine/src/nvenc/nvenc_utils.cpp | /**
* @file src/nvenc/nvenc_utils.cpp
* @brief Definitions for NVENC utilities.
*/
#include <cassert>
#include "nvenc_utils.h"
namespace nvenc {
#ifdef _WIN32
DXGI_FORMAT
dxgi_format_from_nvenc_format(NV_ENC_BUFFER_FORMAT format) {
switch (format) {
case NV_ENC_BUFFER_FORMAT_YUV420_10B... | 2,873 | C++ | .cpp | 74 | 30.918919 | 103 | 0.667271 | 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,989 | nvenc_d3d11_on_cuda.cpp | LizardByte_Sunshine/src/nvenc/nvenc_d3d11_on_cuda.cpp | /**
* @file src/nvenc/nvenc_d3d11_on_cuda.cpp
* @brief Definitions for CUDA NVENC encoder with Direct3D11 input surfaces.
*/
#ifdef _WIN32
#include "nvenc_d3d11_on_cuda.h"
#include "nvenc_utils.h"
namespace nvenc {
nvenc_d3d11_on_cuda::nvenc_d3d11_on_cuda(ID3D11Device *d3d_device):
nvenc_d... | 9,970 | C++ | .cpp | 230 | 34.995652 | 127 | 0.639251 | 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,990 | nvenc_d3d11_native.cpp | LizardByte_Sunshine/src/nvenc/nvenc_d3d11_native.cpp | /**
* @file src/nvenc/nvenc_d3d11_native.cpp
* @brief Definitions for native Direct3D11 NVENC encoder.
*/
#ifdef _WIN32
#include "nvenc_d3d11_native.h"
#include "nvenc_utils.h"
namespace nvenc {
nvenc_d3d11_native::nvenc_d3d11_native(ID3D11Device *d3d_device):
nvenc_d3d11(NV_ENC_DEVICE_TYP... | 2,426 | C++ | .cpp | 59 | 34.491525 | 119 | 0.678617 | 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,991 | nvenc_d3d11.cpp | LizardByte_Sunshine/src/nvenc/nvenc_d3d11.cpp | /**
* @file src/nvenc/nvenc_d3d11.cpp
* @brief Definitions for abstract Direct3D11 NVENC encoder.
*/
#include "src/logging.h"
#ifdef _WIN32
#include "nvenc_d3d11.h"
namespace nvenc {
nvenc_d3d11::~nvenc_d3d11() {
if (dll) {
FreeLibrary(dll);
dll = NULL;
}
}
bool
n... | 1,504 | C++ | .cpp | 49 | 24.061224 | 125 | 0.605428 | 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,992 | nvenc_base.cpp | LizardByte_Sunshine/src/nvenc/nvenc_base.cpp | /**
* @file src/nvenc/nvenc_base.cpp
* @brief Definitions for abstract platform-agnostic base of standalone NVENC encoder.
*/
#include "nvenc_base.h"
#include "src/config.h"
#include "src/logging.h"
#include "src/utility.h"
#define MAKE_NVENC_VER(major, minor) ((major) | ((minor) << 24))
// Make sure ... | 26,090 | C++ | .cpp | 543 | 39.987109 | 185 | 0.651954 | 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,993 | wlgrab.cpp | LizardByte_Sunshine/src/platform/linux/wlgrab.cpp | /**
* @file src/platform/linux/wlgrab.cpp
* @brief Definitions for wlgrab capture.
*/
#include <thread>
#include "src/platform/common.h"
#include "src/logging.h"
#include "src/video.h"
#include "cuda.h"
#include "vaapi.h"
#include "wayland.h"
using namespace std::literals;
namespace wl {
static int env_width;
... | 13,595 | C++ | .cpp | 351 | 31.581197 | 163 | 0.608447 | 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.