Revert "spotify: Remove gst import from spotify.playback module"
This reverts commit 0459f037a4.
This commit is contained in:
parent
0459f037a4
commit
f9c50051c2
@ -1,5 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pygst
|
||||
pygst.require('0.10')
|
||||
import gst
|
||||
|
||||
import logging
|
||||
import functools
|
||||
|
||||
@ -55,5 +59,5 @@ class SpotifyPlaybackProvider(base.BasePlaybackProvider):
|
||||
|
||||
def on_seek_data(self, time_position):
|
||||
logger.debug('playback.on_seek_data(%d) called', time_position)
|
||||
self.backend.spotify.buffer_timestamp = time_position
|
||||
self.backend.spotify.buffer_timestamp = time_position * gst.MSECOND
|
||||
self.backend.spotify.session.seek(time_position)
|
||||
|
||||
@ -124,7 +124,7 @@ class SpotifySessionManager(process.BaseThread, PyspotifySessionManager):
|
||||
|
||||
buffer_ = gst.Buffer(bytes(frames))
|
||||
buffer_.set_caps(gst.caps_from_string(capabilites))
|
||||
buffer_.timestamp = self.buffer_timestamp * gst.MSECOND
|
||||
buffer_.timestamp = self.buffer_timestamp
|
||||
buffer_.duration = num_frames * gst.SECOND / sample_rate
|
||||
|
||||
self.buffer_timestamp += buffer_.duration
|
||||
|
||||
Loading…
Reference in New Issue
Block a user