Review gstreamer-local-backend branch

This commit is contained in:
Stein Magnus Jodal 2010-08-21 23:25:38 +02:00
parent 7062e3c8ee
commit df22256f09
5 changed files with 15 additions and 14 deletions

View File

@ -442,8 +442,8 @@ class BasePlaybackController(object):
:type time_position: int :type time_position: int
:rtype: :class:`True` if successful, else :class:`False` :rtype: :class:`True` if successful, else :class:`False`
""" """
# FIXME I think return value is only realy usefull for internal # FIXME I think return value is only really useful for internal
# testing, as such it should probably not be exposed in api. # testing, as such it should probably not be exposed in API.
if self.state == self.STOPPED: if self.state == self.STOPPED:
self.play() self.play()
elif self.state == self.PAUSED: elif self.state == self.PAUSED:

View File

@ -1,14 +1,13 @@
import logging
import os
import glob import glob
import shutil import logging
import multiprocessing import multiprocessing
import os
import shutil
from mopidy import settings from mopidy import settings
from mopidy.backends.base import * from mopidy.backends.base import *
from mopidy.models import Playlist, Track, Album from mopidy.models import Playlist, Track, Album
from mopidy import settings from mopidy.utils.process import pickle_connection
from mopidy.process import pickle_connection
from .translator import parse_m3u, parse_mpd_tag_cache from .translator import parse_m3u, parse_mpd_tag_cache

View File

@ -194,7 +194,7 @@ class GStreamerProcess(BaseProcess):
def set_position(self, position): def set_position(self, position):
self.gst_pipeline.get_state() # block until state changes are done self.gst_pipeline.get_state() # block until state changes are done
handeled= self.gst_pipeline.seek_simple(gst.Format(gst.FORMAT_TIME), handeled = self.gst_pipeline.seek_simple(gst.Format(gst.FORMAT_TIME),
gst.SEEK_FLAG_FLUSH, position * gst.MSECOND) gst.SEEK_FLAG_FLUSH, position * gst.MSECOND)
self.gst_pipeline.get_state() # block until seek is done self.gst_pipeline.get_state() # block until seek is done
return handeled return handeled

View File

@ -51,6 +51,13 @@ DUMP_LOG_FILENAME = u'dump.log'
#: Currently only the first frontend in the list is used. #: Currently only the first frontend in the list is used.
FRONTENDS = (u'mopidy.frontends.mpd.MpdFrontend',) FRONTENDS = (u'mopidy.frontends.mpd.MpdFrontend',)
#: Which GStreamer audio sink to use in :mod:`mopidy.outputs.gstreamer`.
#:
#: Default::
#:
#: GSTREAMER_AUDIO_SINK = u'autoaudiosink'
GSTREAMER_AUDIO_SINK = u'autoaudiosink'
#: Path to folder with local music. #: Path to folder with local music.
#: #:
#: Used by :mod:`mopidy.backends.local`. #: Used by :mod:`mopidy.backends.local`.
@ -163,8 +170,3 @@ SPOTIFY_USERNAME = u''
#: #:
#: Used by :mod:`mopidy.backends.libspotify`. #: Used by :mod:`mopidy.backends.libspotify`.
SPOTIFY_PASSWORD = u'' SPOTIFY_PASSWORD = u''
#: Which GStreamer audio sink to use in output pipeline.
#:
#: Default: autoaudiosink
GSTREAMER_AUDIO_SINK = u'autoaudiosink'

View File

@ -1,9 +1,9 @@
import multiprocessing
import os import os
import random import random
import shutil import shutil
import tempfile import tempfile
import time import time
import multiprocessing
from mopidy import settings from mopidy import settings
from mopidy.mixers.dummy import DummyMixer from mopidy.mixers.dummy import DummyMixer