diff --git a/src/audio.cpp b/src/audio.cpp index 2894d128..0242ba2e 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -75,7 +75,7 @@ auto control_shared = safe::make_shared(start_audio_control, stop_a void encodeThread(sample_queue_t samples, config_t config, void *channel_data) { auto packets = mail::man->queue(mail::audio_packets); - //FIXME: Pick correct opus_stream_config_t based on config.channels + // FIXME: Pick correct opus_stream_config_t based on config.channels auto stream = &stream_configs[map_stream(config.channels, config.flags[config_t::HIGH_QUALITY])]; opus_t opus { opus_multistream_encoder_create( @@ -120,7 +120,7 @@ void encodeThread(sample_queue_t samples, config_t config, void *channel_data) { void capture(safe::mail_t mail, config_t config, void *channel_data) { auto shutdown_event = mail->event(mail::shutdown); - //FIXME: Pick correct opus_stream_config_t based on config.channels + // FIXME: Pick correct opus_stream_config_t based on config.channels auto stream = &stream_configs[map_stream(config.channels, config.flags[config_t::HIGH_QUALITY])]; auto ref = control_shared.ref(); @@ -135,7 +135,7 @@ void capture(safe::mail_t mail, config_t config, void *channel_data) { return; } - // Order of priorty: + // Order of priority: // 1. Config // 2. Virtual if available // 3. Host diff --git a/src/cbs.cpp b/src/cbs.cpp index e4e24571..d50bd195 100644 --- a/src/cbs.cpp +++ b/src/cbs.cpp @@ -124,9 +124,9 @@ util::buffer_t make_sps_h264(const AVCodecContext *ctx) { sps.seq_parameter_set_id = 0; sps.chroma_format_idc = 1; - sps.log2_max_frame_num_minus4 = 3; //4; + sps.log2_max_frame_num_minus4 = 3; // 4; sps.pic_order_cnt_type = 0; - sps.log2_max_pic_order_cnt_lsb_minus4 = 0; //4; + sps.log2_max_pic_order_cnt_lsb_minus4 = 0; // 4; sps.max_num_ref_frames = dpb_frame; @@ -297,4 +297,4 @@ bool validate_sps(const AVPacket *packet, int codec_id) { return ((CodedBitstreamH265Context *)ctx->priv_data)->active_sps->vui_parameters_present_flag; } -} // namespace cbs \ No newline at end of file +} // namespace cbs diff --git a/src/cbs.h b/src/cbs.h index dc772dd9..cd989b4a 100644 --- a/src/cbs.h +++ b/src/cbs.h @@ -31,4 +31,4 @@ h264_t make_sps_h264(const AVCodecContext *ctx, const AVPacket *packet); bool validate_sps(const AVPacket *packet, int codec_id); } // namespace cbs -#endif \ No newline at end of file +#endif diff --git a/src/config.cpp b/src/config.cpp index 9d27734b..b7f483ac 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -105,14 +105,14 @@ enum quality_e : int { enum class rc_hevc_e : int { constqp, /**< Constant QP mode */ vbr_latency, /**< Latency Constrained Variable Bitrate */ - vbr_peak, /**< Peak Contrained Variable Bitrate */ + vbr_peak, /**< Peak Constrained Variable Bitrate */ cbr, /**< Constant bitrate mode */ }; enum class rc_h264_e : int { constqp, /**< Constant QP mode */ cbr, /**< Constant bitrate mode */ - vbr_peak, /**< Peak Contrained Variable Bitrate */ + vbr_peak, /**< Peak Constrained Variable Bitrate */ vbr_latency, /**< Latency Constrained Variable Bitrate */ }; diff --git a/src/confighttp.cpp b/src/confighttp.cpp index c21089de..f5f2ce09 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -1,4 +1,3 @@ -// // Created by TheElixZammuto on 2021-05-09. // TODO: Authentication, better handling of routes common to nvhttp, cleanup @@ -92,7 +91,7 @@ bool authenticate(resp_https_t response, req_https_t request) { return false; } - //If credentials are shown, redirect the user to a /welcome page + // If credentials are shown, redirect the user to a /welcome page if(config::sunshine.username.empty()) { send_redirect(response, request, "/welcome"); return false; @@ -314,7 +313,7 @@ void saveApp(resp_https_t response, req_https_t request) { BOOST_LOG(fatal) << config::stream.file_apps; try { - //TODO: Input Validation + // TODO: Input Validation pt::read_json(ss, inputTree); pt::read_json(config::stream.file_apps, fileTree); @@ -335,7 +334,7 @@ void saveApp(resp_https_t response, req_https_t request) { apps_node.push_back(std::make_pair("", inputTree)); } else { - //Unfortuantely Boost PT does not allow to directly edit the array, copy should do the trick + // Unfortunately Boost PT does not allow to directly edit the array, copy should do the trick pt::ptree newApps; int i = 0; for(const auto &kv : apps_node) { @@ -388,7 +387,7 @@ void deleteApp(resp_https_t response, req_https_t request) { return; } else { - //Unfortuantely Boost PT does not allow to directly edit the array, copy should do the trick + // Unfortunately Boost PT does not allow to directly edit the array, copy should do the trick pt::ptree newApps; int i = 0; for(const auto &kv : apps_node) { @@ -452,7 +451,7 @@ void saveConfig(resp_https_t response, req_https_t request) { }); pt::ptree inputTree; try { - //TODO: Input Validation + // TODO: Input Validation pt::read_json(ss, inputTree); for(const auto &kv : inputTree) { std::string value = inputTree.get(kv.first); @@ -488,7 +487,7 @@ void savePassword(resp_https_t response, req_https_t request) { }); try { - //TODO: Input Validation + // TODO: Input Validation pt::read_json(ss, inputTree); auto username = inputTree.count("currentUsername") > 0 ? inputTree.get("currentUsername") : ""; auto newUsername = inputTree.get("newUsername"); @@ -544,7 +543,7 @@ void savePin(resp_https_t response, req_https_t request) { }); try { - //TODO: Input Validation + // TODO: Input Validation pt::read_json(ss, inputTree); std::string pin = inputTree.get("pin"); outputTree.put("status", nvhttp::pin(pin)); diff --git a/src/confighttp.h b/src/confighttp.h index 1e0c4a76..cae32aef 100644 --- a/src/confighttp.h +++ b/src/confighttp.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/3/19. -// #ifndef SUNSHINE_CONFIGHTTP_H #define SUNSHINE_CONFIGHTTP_H @@ -18,4 +16,4 @@ constexpr auto PORT_HTTPS = 1; void start(); } // namespace confighttp -#endif //SUNSHINE_CONFIGHTTP_H +#endif // SUNSHINE_CONFIGHTTP_H diff --git a/src/crypto.cpp b/src/crypto.cpp index 006cf7fb..45b65abc 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -1,13 +1,11 @@ -// // Created by loki on 5/31/19. -// #include "crypto.h" #include namespace crypto { using big_num_t = util::safe_ptr; -//using rsa_t = util::safe_ptr; +// using rsa_t = util::safe_ptr; using asn1_string_t = util::safe_ptr; cert_chain_t::cert_chain_t() : _certs {}, _cert_ctx { X509_STORE_CTX_new() } {} @@ -22,7 +20,7 @@ static int openssl_verify_cb(int ok, X509_STORE_CTX *ctx) { int err_code = X509_STORE_CTX_get_error(ctx); switch(err_code) { - //FIXME: Checking for X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY is a temporary workaround to get mmonlight-embedded to work on the raspberry pi + // FIXME: Checking for X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY is a temporary workaround to get mmonlight-embedded to work on the raspberry pi case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: return 1; @@ -274,7 +272,7 @@ int cbc_t::encrypt(const std::string_view &plaintext, std::uint8_t *cipher, aes_ int len; - int size = plaintext.size(); //round_to_pkcs7_padded(plaintext.size()); + int size = plaintext.size(); // round_to_pkcs7_padded(plaintext.size()); // Encrypt into the caller's buffer if(EVP_EncryptUpdate(encrypt_ctx.get(), cipher, &size, (const std::uint8_t *)plaintext.data(), plaintext.size()) != 1) { @@ -492,4 +490,4 @@ std::string rand_alphabet(std::size_t bytes, const std::string_view &alphabet) { return value; } -} // namespace crypto \ No newline at end of file +} // namespace crypto diff --git a/src/crypto.h b/src/crypto.h index 7f648311..46259d1a 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/1/19. -// #ifndef SUNSHINE_CRYPTO_H #define SUNSHINE_CRYPTO_H diff --git a/src/httpcommon.cpp b/src/httpcommon.cpp index 91074144..5f1955a6 100644 --- a/src/httpcommon.cpp +++ b/src/httpcommon.cpp @@ -44,7 +44,7 @@ int init() { if(clean_slate) { unique_id = util::uuid_t::generate().string(); - auto dir = std::filesystem::temp_directory_path() / "Sushine"sv; + auto dir = std::filesystem::temp_directory_path() / "Sunshine"sv; config::nvhttp.cert = (dir / ("cert-"s + unique_id)).string(); config::nvhttp.pkey = (dir / ("pkey-"s + unique_id)).string(); } @@ -180,4 +180,4 @@ int create_creds(const std::string &pkey, const std::string &cert) { return 0; } -} // namespace http \ No newline at end of file +} // namespace http diff --git a/src/httpcommon.h b/src/httpcommon.h index 37d8451f..e1a1509a 100644 --- a/src/httpcommon.h +++ b/src/httpcommon.h @@ -16,4 +16,4 @@ extern std::string unique_id; extern net::net_e origin_pin_allowed; extern net::net_e origin_web_ui_allowed; -} // namespace http \ No newline at end of file +} // namespace http diff --git a/src/input.cpp b/src/input.cpp index 050a8687..c40cdef5 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 6/20/19. -// // define uint32_t for #include @@ -89,7 +87,7 @@ struct gamepad_t { // When emulating the HOME button, we may need to artificially release the back button. // Afterwards, the gamepad state on sunshine won't match the state on Moonlight. - // To prevent Sunshine from sending erronious input data to the active application, + // To prevent Sunshine from sending erroneous input data to the active application, // Sunshine forces the button to be in a specific state until the gamepad state matches that of // Moonlight once more. button_state_e back_button_state; @@ -316,11 +314,11 @@ void passthrough(std::shared_ptr &input, PNV_MOUSE_BUTTON_PACKET packet /*/ * When Moonlight sends mouse input through absolute coordinates, * it's possible that BUTTON_RIGHT is pressed down immediately after releasing BUTTON_LEFT. - * As a result, Sunshine will left click on hyperlinks in the browser before right clicking + * As a result, Sunshine will left-click on hyperlinks in the browser before right-clicking * * This can be solved by delaying BUTTON_LEFT, however, any delay on input is undesirable during gaming * As a compromise, Sunshine will only put delays on BUTTON_LEFT when - * absolute mouse coordinates have been send. + * absolute mouse coordinates have been sent. * * Try to make sure BUTTON_RIGHT gets called before BUTTON_LEFT is released. * @@ -428,7 +426,7 @@ void passthrough(std::shared_ptr &input, PNV_KEYBOARD_PACKET packet) { if(!pressed) { if(!release) { // A new key has been pressed down, we need to check for key combo's - // If a keycombo has been pressed down, don't pass it through + // If a key-combo has been pressed down, don't pass it through if(input->shortcutFlags == input_t::SHORTCUT && apply_shortcut(keyCode) > 0) { return; } diff --git a/src/input.h b/src/input.h index c9c0590e..ce291623 100644 --- a/src/input.h +++ b/src/input.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/20/19. -// #ifndef SUNSHINE_INPUT_H #define SUNSHINE_INPUT_H @@ -32,4 +30,4 @@ struct touch_port_t : public platf::touch_port_t { }; } // namespace input -#endif //SUNSHINE_INPUT_H +#endif // SUNSHINE_INPUT_H diff --git a/src/main.cpp b/src/main.cpp index 0f5581d6..58271f83 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 5/30/19. -// #include "process.h" @@ -289,7 +287,7 @@ int main(int argc, char *argv[]) { upnp_unmap = upnp::start(); }); - //FIXME: Temporary workaround: Simple-Web_server needs to be updated or replaced + // FIXME: Temporary workaround: Simple-Web_server needs to be updated or replaced if(shutdown_event->peek()) { return 0; } diff --git a/src/main.h b/src/main.h index aa9558b3..89c4dbdc 100644 --- a/src/main.h +++ b/src/main.h @@ -1,6 +1,4 @@ -// // Created by loki on 12/22/19. -// #ifndef SUNSHINE_MAIN_H #define SUNSHINE_MAIN_H @@ -54,4 +52,4 @@ MAIL(rumble); } // namespace mail -#endif //SUNSHINE_MAIN_H +#endif // SUNSHINE_MAIN_H diff --git a/src/network.cpp b/src/network.cpp index ccf9e32f..90254899 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 12/27/19. -// #include "network.h" #include "utility.h" @@ -112,4 +110,4 @@ void free_host(ENetHost *host) { enet_host_destroy(host); } -} // namespace net \ No newline at end of file +} // namespace net diff --git a/src/network.h b/src/network.h index 88f18a40..bd371841 100644 --- a/src/network.h +++ b/src/network.h @@ -1,6 +1,4 @@ -// // Created by loki on 12/27/19. -// #ifndef SUNSHINE_NETWORK_H #define SUNSHINE_NETWORK_H @@ -32,4 +30,4 @@ net_e from_address(const std::string_view &view); host_t host_create(ENetAddress &addr, std::size_t peers, std::uint16_t port); } // namespace net -#endif //SUNSHINE_NETWORK_H +#endif // SUNSHINE_NETWORK_H diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 67f8878c..47067d26 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 6/3/19. -// #define BOOST_BIND_GLOBAL_PLACEHOLDERS @@ -297,7 +295,7 @@ void clientpairingsecret(std::shared_ptr> &add_cer // if hash not correct, probably MITM if(std::memcmp(hash.data(), sess.clienthash.data(), hash.size())) { - //TODO: log + // TODO: log map_id_sess.erase(client.uniqueID); tree.put("root.paired", 0); diff --git a/src/nvhttp.h b/src/nvhttp.h index af077a56..ae96c6db 100644 --- a/src/nvhttp.h +++ b/src/nvhttp.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/3/19. -// #ifndef SUNSHINE_NVHTTP_H #define SUNSHINE_NVHTTP_H @@ -17,4 +15,4 @@ bool pin(std::string pin); void erase_all_clients(); } // namespace nvhttp -#endif //SUNSHINE_NVHTTP_H +#endif // SUNSHINE_NVHTTP_H diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 3b9257be..04763026 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -167,7 +167,7 @@ static std::uint32_t from_view(const std::string_view &string) { _CONVERT("eDP"sv, eDP); _CONVERT("DSI"sv, DSI); - BOOST_LOG(error) << "Unknown Monitor connector type ["sv << string << "]: Please report this to the Github issue tracker"sv; + BOOST_LOG(error) << "Unknown Monitor connector type ["sv << string << "]: Please report this to the GitHub issue tracker"sv; return DRM_MODE_CONNECTOR_Unknown; } diff --git a/src/process.cpp b/src/process.cpp index 7fd900c5..db9056a8 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 12/14/19. -// #define BOOST_BIND_GLOBAL_PLACEHOLDERS @@ -47,7 +45,7 @@ int exe(const std::string &cmd, bp::environment &env, file_t &file, std::error_c int proc_t::execute(int app_id) { if(!running() && _app_id != -1) { - // previous process exited on it's own, reset _process_handle + // previous process exited on its own, reset _process_handle _process_handle = bp::group(); _app_id = -1; @@ -73,7 +71,7 @@ int proc_t::execute(int app_id) { } std::error_code ec; - //Executed when returning from function + // Executed when returning from function auto fg = util::fail_guard([&]() { terminate(); }); @@ -193,9 +191,9 @@ std::vector &proc_t::get_apps() { return _apps; } -/// Gets application image from application list. -/// Returns default image if image configuration is not set. -/// returns http content-type header compatible image type +// Gets application image from application list. +// Returns default image if image configuration is not set. +// returns http content-type header compatible image type std::string proc_t::get_app_image(int app_id) { auto app_index = app_id - 1; if(app_index < 0 || app_index >= _apps.size()) { diff --git a/src/process.h b/src/process.h index 2b3fdad8..eab324a7 100644 --- a/src/process.h +++ b/src/process.h @@ -1,6 +1,4 @@ -// // Created by loki on 12/14/19. -// #ifndef SUNSHINE_PROCESS_H #define SUNSHINE_PROCESS_H @@ -105,4 +103,4 @@ std::optional parse(const std::string &file_name); extern proc_t proc; } // namespace proc -#endif //SUNSHINE_PROCESS_H +#endif // SUNSHINE_PROCESS_H diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 983aff96..a2ffa143 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 2/2/20. -// #define BOOST_BIND_GLOBAL_PLACEHOLDERS @@ -123,7 +121,7 @@ public: socket->read_payload(); }); - auto content_lenght = 0; + auto content_length = 0; for(auto option = req->options; option != nullptr; option = option->next) { if("Content-length"sv == option->option) { BOOST_LOG(debug) << "Found Content-Length: "sv << option->content << " bytes"sv; @@ -133,14 +131,14 @@ public: std::string_view content { option->content }; auto begin = std::find_if(std::begin(content), std::end(content), [](auto ch) { return (bool)std::isdigit(ch); }); - content_lenght = util::from_chars(begin, std::end(content)); + content_length = util::from_chars(begin, std::end(content)); break; } } - if(end - socket->crlf >= content_lenght) { - if(end - socket->crlf > content_lenght) { - BOOST_LOG(warning) << "(end - socket->crlf) > content_lenght -- "sv << (std::size_t)(end - socket->crlf) << " > "sv << content_lenght; + if(end - socket->crlf >= content_length) { + if(end - socket->crlf > content_length) { + BOOST_LOG(warning) << "(end - socket->crlf) > content_length -- "sv << (std::size_t)(end - socket->crlf) << " > "sv << content_length; } fg.disable(); @@ -271,7 +269,7 @@ public: if(ec) { BOOST_LOG(error) << "Couldn't accept incoming connections: "sv << ec.message(); - //Stop server + // Stop server clear(); return; } @@ -380,7 +378,7 @@ void launch_session_raise(launch_session_t launch_session) { } int session_count() { - // Ensure session_count is up to date + // Ensure session_count is up-to-date server.clear(false); return server.session_count(); diff --git a/src/rtsp.h b/src/rtsp.h index f038a5cf..f295e615 100644 --- a/src/rtsp.h +++ b/src/rtsp.h @@ -1,6 +1,4 @@ -// // Created by loki on 2/2/20. -// #ifndef SUNSHINE_RTSP_H #define SUNSHINE_RTSP_H @@ -27,4 +25,4 @@ void rtpThread(); } // namespace stream -#endif //SUNSHINE_RTSP_H +#endif // SUNSHINE_RTSP_H diff --git a/src/stream.cpp b/src/stream.cpp index 27fbe85a..7a357c12 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 6/5/19. -// #include "process.h" @@ -240,11 +238,10 @@ struct broadcast_ctx_t { udp::socket video_sock { io }; udp::socket audio_sock { io }; - // This is purely for adminitrative purposes. - // - // It's possible two instances of Moonlight are behind a NAT. - // From Sunshine's point of view, the ip addresses are identical - // We need some way to know what ports are already used for different streams + // This is purely for administrative purposes. + // It's possible two instances of Moonlight are behind a NAT. + // From Sunshine's point of view, the ip addresses are identical + // We need some way to know what ports are already used for different streams util::sync_t>> audio_video_connections; control_server_t control_server; @@ -767,7 +764,7 @@ void controlBroadcastThread(control_server_t *server) { } // Let all remaining connections know the server is shutting down - // reason: gracefull termination + // reason: graceful termination std::uint32_t reason = 0x80030023; control_terminate_t plaintext; @@ -932,7 +929,7 @@ void videoBroadcastThread(udp::socket &sock) { // With a fecpercentage of 255, if payload_new is broken up into more than a 100 data_shards // it will generate greater than DATA_SHARDS_MAX shards. - // Therefore, we start breaking the data up into three seperate fec blocks. + // Therefore, we start breaking the data up into three separate fec blocks. auto multi_fec_threshold = 90 * blocksize; // We can go up to 4 fec blocks, but 3 is plenty @@ -1331,7 +1328,7 @@ void join(session_t &session) { session.audioThread.join(); BOOST_LOG(debug) << "Waiting for control to end..."sv; session.controlEnd.view(); - //Reset input on session stop to avoid stuck repeated keys + // Reset input on session stop to avoid stuck repeated keys BOOST_LOG(debug) << "Resetting Input..."sv; input::reset(session.input); diff --git a/src/stream.h b/src/stream.h index b1e17b0f..8e054aa9 100644 --- a/src/stream.h +++ b/src/stream.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/5/19. -// #ifndef SUNSHINE_STREAM_H #define SUNSHINE_STREAM_H @@ -45,4 +43,4 @@ state_e state(session_t &session); } // namespace session } // namespace stream -#endif //SUNSHINE_STREAM_H +#endif // SUNSHINE_STREAM_H diff --git a/src/sync.h b/src/sync.h index 8d67de2a..019adc9e 100644 --- a/src/sync.h +++ b/src/sync.h @@ -1,6 +1,4 @@ -// // Created by loki on 16-4-19. -// #ifndef SUNSHINE_SYNC_H #define SUNSHINE_SYNC_H @@ -92,4 +90,4 @@ private: } // namespace util -#endif //T_MAN_SYNC_H +#endif // SUNSHINE_SYNC_H diff --git a/src/task_pool.h b/src/task_pool.h index fc07e8ab..8352289c 100644 --- a/src/task_pool.h +++ b/src/task_pool.h @@ -17,7 +17,7 @@ namespace util { class _ImplBase { public: - //_unique_base_type _this_ptr; + // _unique_base_type _this_ptr; inline virtual ~_ImplBase() = default; diff --git a/src/thread_pool.h b/src/thread_pool.h index 8048e6d0..b26c8e34 100644 --- a/src/thread_pool.h +++ b/src/thread_pool.h @@ -7,7 +7,7 @@ namespace util { /* * Allow threads to execute unhindered - * while keeping full controll over the threads. + * while keeping full control over the threads. */ class ThreadPool : public TaskPool { public: diff --git a/src/thread_safe.h b/src/thread_safe.h index d1541ee9..b14b3234 100644 --- a/src/thread_safe.h +++ b/src/thread_safe.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/10/19. -// #ifndef SUNSHINE_THREAD_SAFE_H #define SUNSHINE_THREAD_SAFE_H @@ -37,7 +35,7 @@ public: _cv.notify_all(); } - // pop and view shoud not be used interchangebly + // pop and view shoud not be used interchangeably status_t pop() { std::unique_lock ul { _lock }; @@ -58,7 +56,7 @@ public: return val; } - // pop and view shoud not be used interchangebly + // pop and view shoud not be used interchangeably template status_t pop(std::chrono::duration delay) { std::unique_lock ul { _lock }; @@ -78,7 +76,7 @@ public: return val; } - // pop and view shoud not be used interchangebly + // pop and view shoud not be used interchangeably const status_t &view() { std::unique_lock ul { _lock }; @@ -508,4 +506,4 @@ inline void cleanup(mail_raw_t *mail) { } } // namespace safe -#endif //SUNSHINE_THREAD_SAFE_H +#endif // SUNSHINE_THREAD_SAFE_H diff --git a/src/upnp.cpp b/src/upnp.cpp index a8fc6f4b..a5a99e86 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -181,4 +181,4 @@ std::unique_ptr start() { return std::make_unique(std::move(urls), data, std::move(mappings)); } -} // namespace upnp \ No newline at end of file +} // namespace upnp diff --git a/src/upnp.h b/src/upnp.h index 478d69b1..2ab57df6 100644 --- a/src/upnp.h +++ b/src/upnp.h @@ -7,4 +7,4 @@ namespace upnp { [[nodiscard]] std::unique_ptr start(); } -#endif \ No newline at end of file +#endif diff --git a/src/uuid.h b/src/uuid.h index 6d8abe80..c3a026c0 100644 --- a/src/uuid.h +++ b/src/uuid.h @@ -1,6 +1,4 @@ -// // Created by loki on 8-2-19. -// #ifndef T_MAN_UUID_H #define T_MAN_UUID_H @@ -76,4 +74,4 @@ union uuid_t { } }; } // namespace util -#endif //T_MAN_UUID_H +#endif // T_MAN_UUID_H diff --git a/src/video.cpp b/src/video.cpp index f49cac95..bec77c81 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -1,6 +1,4 @@ -// // Created by loki on 6/6/19. -// #include #include @@ -225,7 +223,7 @@ public: ~swdevice_t() override {} - // Store ownsership when frame is hw_frame + // Store ownership when frame is hw_frame frame_t hw_frame; frame_t sw_frame; @@ -239,7 +237,7 @@ public: enum flag_e { DEFAULT = 0x00, PARALLEL_ENCODING = 0x01, - H264_ONLY = 0x02, // When HEVC is to heavy + H264_ONLY = 0x02, // When HEVC is too heavy LIMITED_GOP_SIZE = 0x04, // Some encoders don't like it when you have an infinite GOP_SIZE. *cough* VAAPI *cough* SINGLE_SLICE_ONLY = 0x08, // Never use multiple slices <-- Older intel iGPU's ruin it for everyone else :P }; @@ -1622,12 +1620,7 @@ retry: } int init() { - BOOST_LOG(info) << "//////////////////////////////////////////////////////////////////"sv; - BOOST_LOG(info) << "// //"sv; - BOOST_LOG(info) << "// Testing for available encoders, this may generate errors. //"sv; - BOOST_LOG(info) << "// You can safely ignore those errors. //"sv; - BOOST_LOG(info) << "// //"sv; - BOOST_LOG(info) << "//////////////////////////////////////////////////////////////////"sv; + BOOST_LOG(info) << "// Testing for available encoders, this may generate errors. You can safely ignore those errors. //"sv; KITTY_WHILE_LOOP(auto pos = std::begin(encoders), pos != std::end(encoders), { if( @@ -1643,11 +1636,7 @@ int init() { }) BOOST_LOG(info); - BOOST_LOG(info) << "//////////////////////////////////////////////////////////////"sv; - BOOST_LOG(info) << "// //"sv; - BOOST_LOG(info) << "// Ignore any errors mentioned above, they are not relevant //"sv; - BOOST_LOG(info) << "// //"sv; - BOOST_LOG(info) << "//////////////////////////////////////////////////////////////"sv; + BOOST_LOG(info) << "// Ignore any errors mentioned above, they are not relevant. //"sv; BOOST_LOG(info); if(encoders.empty()) { diff --git a/src/video.h b/src/video.h index 05df4463..6b8d6e57 100644 --- a/src/video.h +++ b/src/video.h @@ -1,6 +1,4 @@ -// // Created by loki on 6/9/19. -// #ifndef SUNSHINE_VIDEO_H #define SUNSHINE_VIDEO_H @@ -84,4 +82,4 @@ void capture( int init(); } // namespace video -#endif //SUNSHINE_VIDEO_H +#endif // SUNSHINE_VIDEO_H