mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-01 01:21:18 +01:00
# Description of Changes This pull request introduces support for FFmpeg as a new external tool in the application. It adds configuration options for FFmpeg session limits and timeouts, updates the process execution and tool-checking utilities to handle FFmpeg, and expands endpoint configuration to include FFmpeg-dependent features. Corresponding unit tests have also been added to ensure FFmpeg detection works as expected. **FFmpeg Integration and Configuration:** * Added FFmpeg session limit and timeout configuration options to `ApplicationProperties`, with default values and getter methods. [[1]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R631) [[2]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R672-R675) [[3]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R702) [[4]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R743-R746) * Updated `ProcessExecutor` to recognize FFmpeg as a process type, and to use the new session limit and timeout configuration for FFmpeg processes. [[1]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aL305-R316) [[2]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR74-R78) [[3]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR133-R137) **Tool Detection and Exception Handling:** * Implemented `isFfmpegAvailable()` in `CheckProgramInstall` to detect FFmpeg installation, with caching for efficiency. [[1]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R14) [[2]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R60-R78) * Added a specific exception factory method for missing FFmpeg in `ExceptionUtils`. **Endpoint Configuration:** * Registered the new `pdf-to-video` endpoint under the "Convert", "Java", and "FFmpeg" groups, and updated the tool group logic to include "FFmpeg". [[1]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R265) [[2]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R395) [[3]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R452-R454) [[4]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437L496-R502) **Testing Enhancements:** * Added and updated unit tests in `CheckProgramInstallTest` to verify FFmpeg detection, including scenarios for installed, not installed, and caching behavior. [[1]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR29) [[2]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR38-R45) [[3]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR67-R75) [[4]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR222-R262) --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details. |
||
|---|---|---|
| .. | ||
| cucumber | ||
| testdriver | ||
| allEndpointsRemovedSettings.yml | ||
| endpoints.txt | ||
| test2.sh | ||
| test_disabledEndpoints.sh | ||
| test_webpages.sh | ||
| test.sh | ||
| webpage_urls_full.txt | ||
| webpage_urls.txt | ||