@@ -82,7 +82,7 @@ def __init__(self, settings):
82
82
83
83
# create the capture object
84
84
self .__capture = xbmc .RenderCapture ()
85
- self .__capture .capture (64 , 64 , xbmc . CAPTURE_FLAG_CONTINUOUS )
85
+ self .__capture .capture (64 , 64 )
86
86
87
87
def __del__ (self ):
88
88
'''Destructor
@@ -101,7 +101,8 @@ def execute(self):
101
101
102
102
# capture an image
103
103
self .__capture .waitForCaptureStateChangeEvent (200 )
104
- if self .__capture .getCaptureState () == xbmc .CAPTURE_STATE_DONE :
104
+ captureState = self .__capture .getCaptureState ()
105
+ if captureState == xbmc .CAPTURE_STATE_DONE :
105
106
# retrieve image data and reformat into rgb format
106
107
data = self .__capture .getImage ()
107
108
if self .__capture .getImageFormat () == 'ARGB' :
@@ -117,7 +118,12 @@ def execute(self):
117
118
# unable to send image. notify and go to the error state
118
119
notify (xbmcaddon .Addon ().getLocalizedString (32101 ))
119
120
return ErrorState (self .__settings )
121
+
122
+ if captureState != xbmc .CAPTURE_STATE_WORKING :
123
+ #the current capture is processed or it has failed, we request a new one
124
+ self .__capture .capture (64 , 64 )
120
125
126
+ #limit the maximum number of frames sent to hyperion
121
127
xbmc .sleep (100 )
122
128
123
129
return self
0 commit comments