Fix state code in gstreamer
This commit is contained in:
parent
2ba4889cd7
commit
ac2b9d90bd
@ -46,8 +46,13 @@ class GStreamerPlaybackController(BasePlaybackController):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
gst_state = self.bin.get_state()
|
gststate = type(gst.STATE_NULL)
|
||||||
return self.STATE_MAPPING.get(gst_state, self.STOPPED)
|
|
||||||
|
for state in self.bin.get_state():
|
||||||
|
if type(state) == gststate and state in self.STATE_MAPPING:
|
||||||
|
return self.STATE_MAPPING[state]
|
||||||
|
|
||||||
|
return self.STOPPED
|
||||||
|
|
||||||
def play(self, id=None, position=None):
|
def play(self, id=None, position=None):
|
||||||
playlist = self.backend.current_playlist.playlist
|
playlist = self.backend.current_playlist.playlist
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user