mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* Correct JS requestConfig call
* Update requestWriteConfig to new API format
* Add hyperion-light and bare-minimum preset scenarios
* Refactor Python
* Windows add bcrypt until mbedtls  is fixed
(https://github.com/Mbed-TLS/mbedtls/pull/9554)
* Corrections
* Use ScreenCaptureKit under macOS 15 and above
* ReSigning macOS package
* Python 3.11.10 test
* Revert "Python 3.11.10 test"
This reverts commit ee921e4f12.
* Handle defined exits from python scripts
* Update change.log
* CodeQL findings
---------
Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
		
	
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| // CoreGraphics
 | |
| #include <CoreGraphics/CoreGraphics.h>
 | |
| 
 | |
| // Utils includes
 | |
| #include <utils/ColorRgb.h>
 | |
| #include <hyperion/Grabber.h>
 | |
| 
 | |
| ///
 | |
| /// The OsxFrameGrabber is used for creating snapshots of the display (screenshots)
 | |
| ///
 | |
| class OsxFrameGrabber : public Grabber
 | |
| {
 | |
| public:
 | |
| 	///
 | |
| 	/// Construct a OsxFrameGrabber that will capture snapshots with specified dimensions.
 | |
| 	///
 | |
| 	/// @param[in] display The index of the display to capture
 | |
| 
 | |
| 	///
 | |
| 	OsxFrameGrabber(int display=kCGDirectMainDisplay);
 | |
| 	~OsxFrameGrabber() override;
 | |
| 
 | |
| 	///
 | |
| 	/// @brief Setup a new capture screen, will free the previous one
 | |
| 	/// @return True on success, false if no screen is found
 | |
| 	///
 | |
| 	bool setupDisplay();
 | |
| 
 | |
| 	///
 | |
| 	/// Captures a single snapshot of the display and writes the data to the given image. The
 | |
| 	/// provided image should have the same dimensions as the configured values (_width and
 | |
| 	/// _height)
 | |
| 	///
 | |
| 	/// @param[out] image  The snapped screenshot (should be initialized with correct width and
 | |
| 	/// height)
 | |
| 	///
 | |
| 	int grabFrame(Image<ColorRgb> & image);
 | |
| 
 | |
| 	///
 | |
| 	/// @brief Overwrite Grabber.h implementation
 | |
| 	///
 | |
| 	bool setDisplayIndex(int index) override;
 | |
| 
 | |
| 	///
 | |
| 	/// @brief Discover OSX screens available (for configuration).
 | |
| 	///
 | |
| 	/// @param[in] params Parameters used to overwrite discovery default behaviour
 | |
| 	///
 | |
| 	/// @return A JSON structure holding a list of devices found
 | |
| 	///
 | |
| 	QJsonObject discover(const QJsonObject& params);
 | |
| 
 | |
| private:
 | |
| 	/// display
 | |
| 	int _screenIndex;
 | |
| 
 | |
| 	/// Reference to the captured display
 | |
| 	CGDirectDisplayID _display;
 | |
| };
 |