noobs 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYING +339 -0
- package/README.md +46 -0
- package/bin/64bit/obs.lib +0 -0
- package/binding.gyp +23 -0
- package/dist/bin/Qt6Core.dll +0 -0
- package/dist/bin/Qt6Gui.dll +0 -0
- package/dist/bin/Qt6Network.dll +0 -0
- package/dist/bin/Qt6Svg.dll +0 -0
- package/dist/bin/Qt6Widgets.dll +0 -0
- package/dist/bin/Qt6Xml.dll +0 -0
- package/dist/bin/avcodec-61.dll +0 -0
- package/dist/bin/avdevice-61.dll +0 -0
- package/dist/bin/avfilter-10.dll +0 -0
- package/dist/bin/avformat-61.dll +0 -0
- package/dist/bin/avutil-59.dll +0 -0
- package/dist/bin/datachannel.dll +0 -0
- package/dist/bin/libcurl.dll +0 -0
- package/dist/bin/libobs-d3d11.dll +0 -0
- package/dist/bin/libobs-opengl.dll +0 -0
- package/dist/bin/libobs-winrt.dll +0 -0
- package/dist/bin/librist.dll +0 -0
- package/dist/bin/libx264-164.dll +0 -0
- package/dist/bin/lua51.dll +0 -0
- package/dist/bin/obs-amf-test.exe +0 -0
- package/dist/bin/obs-ffmpeg-mux.exe +0 -0
- package/dist/bin/obs-frontend-api.dll +0 -0
- package/dist/bin/obs-scripting.dll +0 -0
- package/dist/bin/obs.dll +0 -0
- package/dist/bin/srt.dll +0 -0
- package/dist/bin/swresample-5.dll +0 -0
- package/dist/bin/swscale-8.dll +0 -0
- package/dist/bin/w32-pthreads.dll +0 -0
- package/dist/bin/zlib.dll +0 -0
- package/dist/effects/area.effect +250 -0
- package/dist/effects/bicubic_scale.effect +236 -0
- package/dist/effects/bilinear_lowres_scale.effect +123 -0
- package/dist/effects/color.effect +172 -0
- package/dist/effects/default.effect +254 -0
- package/dist/effects/default_rect.effect +84 -0
- package/dist/effects/deinterlace_base.effect +325 -0
- package/dist/effects/deinterlace_blend.effect +21 -0
- package/dist/effects/deinterlace_blend_2x.effect +21 -0
- package/dist/effects/deinterlace_discard.effect +21 -0
- package/dist/effects/deinterlace_discard_2x.effect +21 -0
- package/dist/effects/deinterlace_linear.effect +21 -0
- package/dist/effects/deinterlace_linear_2x.effect +21 -0
- package/dist/effects/deinterlace_yadif.effect +21 -0
- package/dist/effects/deinterlace_yadif_2x.effect +21 -0
- package/dist/effects/format_conversion.effect +1823 -0
- package/dist/effects/lanczos_scale.effect +292 -0
- package/dist/effects/opaque.effect +159 -0
- package/dist/effects/premultiplied_alpha.effect +38 -0
- package/dist/effects/repeat.effect +36 -0
- package/dist/effects/solid.effect +80 -0
- package/dist/noobs.node +0 -0
- package/dist/plugins/obs-ffmpeg.dll +0 -0
- package/dist/plugins/obs-x264.dll +0 -0
- package/dist/plugins/win-capture.dll +0 -0
- package/include/audio-monitoring/osx/mac-helpers.h +13 -0
- package/include/audio-monitoring/pulse/pulseaudio-wrapper.h +212 -0
- package/include/audio-monitoring/win32/wasapi-output.h +22 -0
- package/include/callback/calldata.h +195 -0
- package/include/callback/decl.h +61 -0
- package/include/callback/proc.h +52 -0
- package/include/callback/signal.h +73 -0
- package/include/graphics/axisang.h +65 -0
- package/include/graphics/bounds.h +108 -0
- package/include/graphics/device-exports.h +177 -0
- package/include/graphics/effect-parser.h +290 -0
- package/include/graphics/effect.h +190 -0
- package/include/graphics/graphics-internal.h +335 -0
- package/include/graphics/graphics.h +1024 -0
- package/include/graphics/half.h +100 -0
- package/include/graphics/image-file.h +124 -0
- package/include/graphics/input.h +34 -0
- package/include/graphics/libnsgif/libnsgif.h +142 -0
- package/include/graphics/math-defs.h +45 -0
- package/include/graphics/math-extra.h +61 -0
- package/include/graphics/matrix3.h +98 -0
- package/include/graphics/matrix4.h +102 -0
- package/include/graphics/plane.h +85 -0
- package/include/graphics/quat.h +170 -0
- package/include/graphics/shader-parser.h +273 -0
- package/include/graphics/srgb.h +177 -0
- package/include/graphics/vec2.h +148 -0
- package/include/graphics/vec3.h +224 -0
- package/include/graphics/vec4.h +241 -0
- package/include/media-io/audio-io.h +228 -0
- package/include/media-io/audio-math.h +43 -0
- package/include/media-io/audio-resampler.h +44 -0
- package/include/media-io/format-conversion.h +50 -0
- package/include/media-io/frame-rate.h +29 -0
- package/include/media-io/media-io-defs.h +20 -0
- package/include/media-io/media-remux.h +37 -0
- package/include/media-io/video-frame.h +64 -0
- package/include/media-io/video-io.h +338 -0
- package/include/media-io/video-scaler.h +43 -0
- package/include/obs-audio-controls.h +250 -0
- package/include/obs-av1.h +47 -0
- package/include/obs-avc.h +55 -0
- package/include/obs-config.h +52 -0
- package/include/obs-data.h +311 -0
- package/include/obs-defs.h +52 -0
- package/include/obs-encoder.h +361 -0
- package/include/obs-ffmpeg-compat.h +13 -0
- package/include/obs-hevc.h +81 -0
- package/include/obs-hotkey.h +271 -0
- package/include/obs-hotkeys.h +653 -0
- package/include/obs-interaction.h +56 -0
- package/include/obs-internal.h +1459 -0
- package/include/obs-missing-files.h +53 -0
- package/include/obs-module.h +181 -0
- package/include/obs-nal.h +37 -0
- package/include/obs-nix-platform.h +53 -0
- package/include/obs-nix-wayland.h +24 -0
- package/include/obs-nix-x11.h +22 -0
- package/include/obs-nix.h +42 -0
- package/include/obs-output.h +96 -0
- package/include/obs-properties.h +364 -0
- package/include/obs-scene.h +127 -0
- package/include/obs-service.h +115 -0
- package/include/obs-source.h +568 -0
- package/include/obs.h +2608 -0
- package/include/obsconfig.h +13 -0
- package/include/obsversion.h +5 -0
- package/include/util/apple/cfstring-utils.h +16 -0
- package/include/util/array-serializer.h +37 -0
- package/include/util/base.h +97 -0
- package/include/util/bitstream.h +28 -0
- package/include/util/bmem.h +94 -0
- package/include/util/buffered-file-serializer.h +32 -0
- package/include/util/c99defs.h +75 -0
- package/include/util/cf-lexer.h +199 -0
- package/include/util/cf-parser.h +281 -0
- package/include/util/circlebuf.h +319 -0
- package/include/util/config-file.h +103 -0
- package/include/util/crc32.h +29 -0
- package/include/util/curl/curl-helper.h +35 -0
- package/include/util/darray.h +606 -0
- package/include/util/deque.h +319 -0
- package/include/util/dstr.h +320 -0
- package/include/util/file-serializer.h +34 -0
- package/include/util/lexer.h +273 -0
- package/include/util/pipe.h +52 -0
- package/include/util/platform.h +223 -0
- package/include/util/profiler.h +97 -0
- package/include/util/serializer.h +158 -0
- package/include/util/simde/check.h +285 -0
- package/include/util/simde/debug-trap.h +117 -0
- package/include/util/simde/hedley.h +2123 -0
- package/include/util/simde/simde-align.h +481 -0
- package/include/util/simde/simde-arch.h +537 -0
- package/include/util/simde/simde-common.h +918 -0
- package/include/util/simde/simde-constify.h +925 -0
- package/include/util/simde/simde-detect-clang.h +114 -0
- package/include/util/simde/simde-diagnostic.h +447 -0
- package/include/util/simde/simde-features.h +550 -0
- package/include/util/simde/simde-math.h +1858 -0
- package/include/util/simde/x86/mmx.h +2456 -0
- package/include/util/simde/x86/sse.h +4479 -0
- package/include/util/simde/x86/sse2.h +7549 -0
- package/include/util/source-profiler.h +66 -0
- package/include/util/sse-intrin.h +32 -0
- package/include/util/task.h +22 -0
- package/include/util/text-lookup.h +45 -0
- package/include/util/threading-posix.h +77 -0
- package/include/util/threading-windows.h +142 -0
- package/include/util/threading.h +103 -0
- package/include/util/utf8.h +35 -0
- package/include/util/uthash.h +34 -0
- package/include/util/util_uint128.h +108 -0
- package/include/util/util_uint64.h +34 -0
- package/include/util/windows/device-enum.h +14 -0
- package/include/util/windows/obfuscate.h +16 -0
- package/include/util/windows/win-registry.h +37 -0
- package/include/util/windows/win-version.h +57 -0
- package/include/util/windows/window-helpers.h +47 -0
- package/index.d.ts +38 -0
- package/index.js +8 -0
- package/package.json +31 -0
- package/src/main.cpp +321 -0
- package/src/obs_interface.cpp +605 -0
- package/src/obs_interface.h +74 -0
- package/src/utils.cpp +80 -0
- package/src/utils.h +3 -0
package/src/utils.cpp
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#include <iostream>
|
|
2
|
+
#include <obs.h>
|
|
3
|
+
#include <fstream>
|
|
4
|
+
#include <chrono>
|
|
5
|
+
#include <iomanip>
|
|
6
|
+
#include <sstream>
|
|
7
|
+
|
|
8
|
+
void log_handler(int lvl, const char *msg, va_list args, void *p) {
|
|
9
|
+
// Use the passed log path parameter
|
|
10
|
+
static std::string log_filename;
|
|
11
|
+
static bool filename_initialized = false;
|
|
12
|
+
|
|
13
|
+
if (!filename_initialized) {
|
|
14
|
+
auto now = std::chrono::system_clock::now();
|
|
15
|
+
auto time_t = std::chrono::system_clock::to_time_t(now);
|
|
16
|
+
|
|
17
|
+
std::stringstream filename_stream;
|
|
18
|
+
filename_stream << "ObsEngine-" << std::put_time(std::localtime(&time_t), "%Y-%m-%d") << ".log";
|
|
19
|
+
|
|
20
|
+
// Use the provided directory path and append the filename
|
|
21
|
+
std::string log_dir = static_cast<const char*>(p);
|
|
22
|
+
|
|
23
|
+
// Ensure the directory path ends with a separator
|
|
24
|
+
if (!log_dir.empty() && log_dir.back() != '\\' && log_dir.back() != '/') {
|
|
25
|
+
log_dir += "\\";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
log_filename = log_dir + filename_stream.str();
|
|
29
|
+
filename_initialized = true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Get current timestamp
|
|
33
|
+
auto now = std::chrono::system_clock::now();
|
|
34
|
+
auto time_t = std::chrono::system_clock::to_time_t(now);
|
|
35
|
+
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
|
|
36
|
+
now.time_since_epoch()) % 1000;
|
|
37
|
+
|
|
38
|
+
// Convert log level to string
|
|
39
|
+
const char* level_str;
|
|
40
|
+
switch (lvl) {
|
|
41
|
+
case LOG_ERROR: level_str = "ERROR"; break;
|
|
42
|
+
case LOG_WARNING: level_str = "WARN"; break;
|
|
43
|
+
case LOG_INFO: level_str = "INFO"; break;
|
|
44
|
+
case LOG_DEBUG: level_str = "DEBUG"; break;
|
|
45
|
+
default: level_str = "UNKNOWN"; break;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Format the log message
|
|
49
|
+
char buffer[4096];
|
|
50
|
+
vsnprintf(buffer, sizeof(buffer), msg, args);
|
|
51
|
+
|
|
52
|
+
// Create timestamp string
|
|
53
|
+
std::stringstream timestamp;
|
|
54
|
+
timestamp << std::put_time(std::localtime(&time_t), "%Y-%m-%d %H:%M:%S");
|
|
55
|
+
timestamp << "." << std::setfill('0') << std::setw(3) << ms.count();
|
|
56
|
+
|
|
57
|
+
std::string timestamp_str = "[" + timestamp.str() + "] [" + level_str + "] ";
|
|
58
|
+
|
|
59
|
+
// Split the message by newlines and add timestamp to each line
|
|
60
|
+
std::string message(buffer);
|
|
61
|
+
std::istringstream iss(message);
|
|
62
|
+
std::string line;
|
|
63
|
+
std::string formatted_output;
|
|
64
|
+
|
|
65
|
+
while (std::getline(iss, line)) {
|
|
66
|
+
formatted_output += timestamp_str + line + "\n";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Remove the last newline if it exists
|
|
70
|
+
if (!formatted_output.empty() && formatted_output.back() == '\n') {
|
|
71
|
+
formatted_output.pop_back();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Write to log file
|
|
75
|
+
std::ofstream logFile(log_filename, std::ios::app);
|
|
76
|
+
if (logFile.is_open()) {
|
|
77
|
+
logFile << formatted_output << std::endl;
|
|
78
|
+
logFile.close();
|
|
79
|
+
}
|
|
80
|
+
}
|
package/src/utils.h
ADDED