11#include "AddonClass.h"
13#include "ServiceBroker.h"
14#include "application/ApplicationComponents.h"
15#include "application/ApplicationPlayer.h"
16#include "commons/Buffer.h"
24 XBMCCOMMONS_STANDARD_EXCEPTION(RenderCaptureException);
40 unsigned int m_captureId;
42 unsigned int m_height;
48 m_captureId = UINT_MAX;
55 auto& components = CServiceBroker::GetAppComponents();
56 const auto appPlayer = components.GetComponent<CApplicationPlayer>();
57 appPlayer->RenderCaptureRelease(m_captureId);
61#ifdef DOXYGEN_SHOULD_USE_THIS
74 inline int getWidth() {
return m_width; }
77#ifdef DOXYGEN_SHOULD_USE_THIS
89 inline int getHeight() {
return m_height; }
92#ifdef DOXYGEN_SHOULD_USE_THIS
105 const auto& components = CServiceBroker::GetAppComponents();
106 const auto appPlayer = components.GetComponent<CApplicationPlayer>();
107 return appPlayer->GetRenderAspectRatio();
111#ifdef DOXYGEN_SHOULD_USE_THIS
131#ifdef DOXYGEN_SHOULD_USE_THIS
149 inline XbmcCommons::Buffer
getImage(
unsigned int msecs = 0)
152 if (!GetPixels(msecs))
153 return XbmcCommons::Buffer(0);
155 size_t size = m_width * m_height * 4;
156 return XbmcCommons::Buffer(m_buffer, size);
159#ifdef DOXYGEN_SHOULD_USE_THIS
174 inline void capture(
int width,
int height)
177 auto& components = CServiceBroker::GetAppComponents();
178 const auto appPlayer = components.GetComponent<CApplicationPlayer>();
182 appPlayer->RenderCaptureRelease(m_captureId);
185 m_captureId = appPlayer->RenderCaptureAlloc();
188 m_buffer =
new uint8_t[m_width*m_height*4];
189 appPlayer->RenderCapture(m_captureId, m_width, m_height, CAPTUREFLAG_CONTINUOUS);
194 inline bool GetPixels(
unsigned int msec)
196 auto& components = CServiceBroker::GetAppComponents();
197 const auto appPlayer = components.GetComponent<CApplicationPlayer>();
198 return appPlayer->RenderCaptureGetPixels(m_captureId, msec, m_buffer,
199 m_width * m_height * 4);
Definition RenderCapture.h:39
getImage(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Definition RenderCapture.h:147
getAspectRatio()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getHeight()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
getImageFormat()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Definition RenderCapture.h:123
capture(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Definition RenderCapture.h:172
getWidth()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...