Commit Graph

224 Commits

Author SHA1 Message Date
Sergey Krashevich abe617a346 refactor(ffmpeg): generalize device and hardware support for multiple OS
- Rename `device_freebsd.go` to `device_bsd.go` and `hardware_freebsd.go` to `hardware_bsd.go` to reflect broader BSD support (FreeBSD, NetBSD, OpenBSD, Dragonfly).
- Update build tags in `device_bsd.go` and `hardware_bsd.go` to include FreeBSD, NetBSD, OpenBSD, and Dragonfly.
- Rename `device_linux.go` to `device_unix.go` and `hardware_linux.go` to `hardware_unix.go` to generalize Unix support excluding Darwin-based systems and BSDs.
- Add specific build tags to `device_darwin.go`, `device_unix.go`, `hardware_darwin.go`, and `hardware_unix.go` to correctly target their respective operating systems.
- Ensure Windows-specific files (`device_windows.go` and `hardware_windows.go`) are correctly tagged for building on Windows.
2024-05-01 09:04:19 +03:00
Alex X 732fe47836 Merge pull request #871 from dadav/signal
Feature: Make kill signal configurable
2024-04-29 18:40:07 +03:00
Alex X 4e0185cfe6 Code refactoring after #878 2024-04-29 18:34:48 +03:00
Alex X 070ea3892f Merge pull request #913 from robvanoostenrijk/master
Added FreeBSD binaries
2024-04-29 11:27:31 +03:00
Alex X cf4f6468f3 Simplify restart func 2024-04-29 10:41:53 +03:00
Alex X c7af5028be Code fix after #963 2024-04-29 10:32:42 +03:00
Alex X 9527a2be2e Merge pull request #963 from skrashevich/simple-daemon-mode
feat(app): support daemon mode on non-Windows platforms
2024-04-29 07:52:40 +03:00
Alex X ee5c663467 Code refactoring after #963 2024-04-29 07:51:53 +03:00
Alex X 1682d18ba6 Merge pull request #1009 from skrashevich/fix-new-stream-error
fix(streams): handle interface conversion panic in NewStream() at internal/streams
2024-04-29 06:20:41 +03:00
Alex X abda47045d Fixed possible nil pointer 2024-04-28 07:15:36 +03:00
Alex X 51c5d51786 Merge pull request #1051 from ggenny/milestione/add-tls-skip-param
Integrate WebRTC with RESTful API for Milestone XProtect VMS
2024-04-28 07:13:28 +03:00
Alex X c309bb83e7 Code refactoring for Milestone client 2024-04-28 07:09:01 +03:00
Sergey Krashevich 1d59c02745 Merge branch 'AlexxIT:master' into fix-new-stream-error 2024-04-23 03:25:12 +03:00
Sergey Krashevich 905ef9b1ba Merge remote-tracking branch 'upstream/master' into sec-fix-slowloris 2024-04-20 13:56:02 +03:00
Sergey Krashevich ac3d931576 Merge remote-tracking branch 'upstream/master' into simple-daemon-mode 2024-04-20 13:54:57 +03:00
Gennaro Gallo 40dd3907a0 add insecure Tls param, skip wrong tls vms 2024-04-18 11:40:04 +02:00
Gennaro Gallo 621d2e017e fix patch with stream creation 2024-04-18 10:18:31 +02:00
Gennaro Gallo d0a9c7a126 add milestone implementation webrtc 2024-04-18 10:18:12 +02:00
Gennaro Gallo 2301d8d7b2 add milestione http request api uri 2024-04-18 10:18:01 +02:00
Sergey Krashevich e1ebed4859 fix(api): fix potential Slowloris Attack 2024-04-16 17:22:06 +03:00
Sergey Krashevich adf49b8475 feat(logging): more usable exec log 2024-04-14 21:56:07 +03:00
Sergey Krashevich 9fc3d91a17 fix(streams): handle non-string elements in slice source for NewStream 2024-03-19 09:46:56 +03:00
Sergey Krashevich 3afe8d7c1d fix(daemon-mode): handle '-daemon' argument correctly for background execution
This commit fixes the issue where the '-daemon' argument was not being properly handled when re-executing the program in daemon mode. The loop removes the '-daemon' flag from the arguments slice before the program is re-run in the background, ensuring that subsequent executions do not attempt to enter daemon mode again.

The change will prevent potential errors or unexpected behavior due to the presence of the '-daemon' argument in recursive calls, making the daemon mode feature more robust and reliable.
2024-02-24 13:04:18 +03:00
Sergey Krashevich 15c27e16cc feat(app): support daemon mode on non-Windows platforms
Added a new command-line flag `-daemon` to run the application in the background as a daemon. This option is only available for non-Windows operating systems due to platform-specific process handling. When enabled, the application restarts itself with the same arguments except for the `-daemon` flag, prints the PID of the background process, and then exits the current process.
2024-02-24 10:33:02 +03:00
Rob van Oostenrijk f73ee41d93 Updated FreeBSD ffmpeg integrations 2024-01-30 19:10:53 +04:00
Rob van Oostenrijk 93dad05bde Added FreeBSD Binaries (#2)
Co-authored-by: Rob van Oostenrijk <robvanoostenrijk@noreply.users.github.com>
2024-01-29 21:14:47 +04:00
dadav 152719441e feat: Add signal related params to exec 2024-01-21 19:34:15 +01:00
Alex X ccec41a10f Update version to 1.8.5 2024-01-01 09:34:44 +03:00
Alex X ae13a72fde Fix mdns log message #843 2023-12-30 20:44:50 +03:00
Alex X 853e98879b Fix OPUS for HomeKit server #667 #843 2023-12-27 23:05:45 +03:00
Alex X 7ad4d350f8 Fix hardware profiles for H265 templates #809 2023-12-17 18:07:57 +03:00
Alex X c63fc6a2ad Fix exec source leaves zombie processes after fail #814 2023-12-17 17:59:41 +03:00
Alex X d3bc18c369 Logs refactoring after #780 2023-12-11 18:07:38 +03:00
Alex X 1f3a32023f Merge pull request #780 from 'skrashevich/log-viewer' 2023-12-11 18:07:25 +03:00
Alex X a46bad0522 Add support hardware resize for Rockchip 2023-12-10 15:58:54 +03:00
Sergey Krashevich fc5b36acd3 actualise godoc comment for api.logHandler func 2023-12-05 17:54:53 +03:00
Sergey Krashevich 0a8ab9bbd1 Update app.go to remove the unused variable LogFilePath 2023-12-05 17:50:51 +03:00
Sergey Krashevich b60000ac34 Refactor log handling to use in-memory Logger 2023-12-05 17:44:32 +03:00
Alex X 39d87625d7 Merge pull request #798 from MPTres/cors
Fix CORS support in WHEP/WHIP API
2023-12-05 16:16:07 +03:00
MPTres 0da8b46148 remove empty lines. 2023-12-05 13:52:34 +01:00
Alex X 8d9f87061c Add support hardware auto discovery for Rockchip 2023-12-05 15:43:50 +03:00
Alex X 4bdfa62039 Code refactoring for ffmpeg hardware linux 2023-12-05 15:43:14 +03:00
Alex X 67ea2d9d02 Fix support FFmpeg device on Windows 2023-12-05 15:40:16 +03:00
MPTres 39b614fb0f Remove X-PINGOTHER from allowed headers. 2023-12-05 13:37:05 +01:00
MPTres 84469dcd25 CORS. Add support for OPTIONS requests. 2023-12-04 17:14:18 +01:00
Alex X eceb4a476f Add support Rockchip hardware transcoding 2023-12-04 16:54:50 +03:00
Sergey Krashevich 7ac5b4f114 Ensure exit code is within valid range
The exitHandler function now properly validates the exit code provided
in the query string. It checks for conversion errors and ensures the
code is within the valid range of 0 to 125. If the validation fails,
it responds with an HTTP 400 Bad Request error. This prevents potential
misuse of the exit endpoint by restricting the exit codes to expected
values.
2023-11-29 10:03:39 +03:00
Sergey Krashevich ab47d5718f Refactor log handling and add UI auto-update toggle
This commit refactors the log handling in the API to use a switch statement for improved readability and maintainability. It also introduces error messages with more context when reading or truncating the log file fails.

On the frontend, a new auto-update toggle button has been added to the log viewer, allowing users to enable or disable automatic log updates. The button's appearance changes based on its state, providing a clear visual indication of whether auto-update is active. Additionally, the button styling has been updated to ensure consistency across the interface.
2023-11-28 22:55:50 +03:00
Sergey Krashevich 8d382afa0f Add log file handling and viewing capabilities
This commit introduces the ability to handle log files through the API and
provides a new log viewing page. The API now supports GET and DELETE methods
for log file operations, allowing retrieval and deletion of log contents.
A new log.html page has been added for viewing logs in the browser, with
automatic refresh every 5 seconds and styling based on log levels.

The app.go file has been updated to include a GetLogFilepath function that
retrieves or generates the log file path. The NewLogger function now accepts
a file parameter to enable file logging. The main.js file has been updated
to include a link to the new log.html page.

This enhancement improves the observability and management of the application
by providing real-time access to logs and the ability to clear them directly
from the web interface.
2023-11-26 23:21:57 +03:00
Alex X a87dafbbec Update version to 1.8.4 2023-11-19 18:38:26 +03:00