![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Stream/VideoDecoder.h>
VideoDecoder is responsible of processing the received ByteBuffer which contains the image data. More...
VideoDecoder is responsible of processing the received ByteBuffer which contains the image data.
Firstly the ByteBuffer is stored in m_lastByteBuffer, then it is processed in a separate thread using 'ffmpeg' to decode and retrieve the Image pixels. When a new image has been decoded this is signaled via "signalNewImage" the image size can also be retrieved once an image is decoded successfully.
Classes | |
| struct | FrameStats |
Public Member Functions | |
| VideoDecoder () | |
| constructs the class, but dos not initiate the internal decoding threads, call start() to achieve this | |
| void | setUseHardwareAcceleration (bool value) |
| bool | useHardwareAcceleration () const |
| bool | hardwareAccelerationUsed () const |
| bool | start () |
| starts the internal threads and wait for the byteBuffers to start decoding the frames | |
| bool | stop () |
| stops the thread and frees the 'ffmpeg' contexts | |
| void | feedByteBuffer (std::unique_ptr< ByteBuffer > bb) |
| sets the byteBuffer to be decoded | |
| vec2i | detectedImageSize () const |
| get the image width and height, if decoding was successful, otherwise return (-1, -1) | |
| size_t | estimatedBytesPerSeconds () const |
get the average number of Bytes received per second (calculated in the last m_updateDuration number of seconds) | |
| double | estimatedFPS () const |
get the estimated frame per second (see also estimatedBytesPerSeconds) | |
| void | restartDecoder () |
| Re-initializes the VideoDecoder state, useful if the video format of size changed. | |
| void | restartEncoder () |
| Re-initializes the VideoDecoder state, useful if the video format of size changed. | |
Public Attributes | |
| Signal< std::shared_ptr< SharedImage > > | signalNewImage |