TwiceAsNice
2019-02-18
|
Class to provide video streaming and recording functionality.
More...
#include <streammanager.h>
Class to provide video streaming and recording functionality.
INDI::CCD can utilize this class to add streaming and recording functionality to the driver.
Transfer of the video stream is done via the same BLOB property CCD1 used for transfer of image data to the client. Therefore, it is not possible to transmit image data and video stream at the same time. Two formats are accepted for video streaming:
Use setPixelFormat() and setSize() before uploading the stream data. 16bit frames are only supported in some recorders. You can send 16bit frames, but they will be downscaled to 8bit when necessary for streaming and recording purposes. Base classes must implement startStreaming() and stopStreaming() functions. When a frame is ready, use uploadStream() to send the data to active encoders and recorders.
It is highly recommended to implement the streaming functionality in a dedicated thread.
Encoders are responsible for encoding the frame and transmitting it to the client. The CCD1 BLOB format is set to the desired format. Default encoding format is RAW (format = ".stream").
Currently, two encoders are supported:
Recorders are responsible for recording the video stream to a file. The recording file directory and name can be set via the RECORD_FILE property which is composed of RECORD_FILE_DIR and RECORD_FILE_NAME elements. You can specify a record directory name together with a file name. You may use special character sequences to generate dynamic names: D is replaced with the date ('YYYY-MM-DD') H is replaced with the time ('hh-mm-ss') T is replaced with a timestamp F is replaced with the filter name currently in use (see Snoop Devices in Options tab)
Currently, two recorders are supported:
By default, the full image width and height are used for transmitting the data. Subframing is possible by updating the CCD_STREAM_FRAME property. All values set in this property must be set in BINNED coordinates, unlike the CCD_FRAME which is set in UNBINNED coordinates.