Remove trailing whitespace errors
[panucci.git] / src / panucci / backends / gstplaybin.py
blob272e9f41f3226b4db0326ab6ad95861475c6865f
1 #!/usr/bin/env python
3 # This file is part of Panucci.
4 # Copyright (c) 2008-2010 The Panucci Audiobook and Podcast Player Project
6 # Panucci is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Panucci is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Panucci. If not, see <http://www.gnu.org/licenses/>.
20 from __future__ import absolute_import
22 import gst
23 import logging
25 from panucci.backends import gstbase
27 class GstPlaybinPlayer(gstbase.GstBasePlayer):
28 """ """
30 def __init__(self):
31 gstbase.GstBasePlayer.__init__(self)
32 self.__log = logging.getLogger('panucci.backends.GstPlaybinPlayer')
33 self.__log.debug("Initialized GstPlaybinPlayer backend")
35 def _setup_player(self, filetype=None):
36 self.__log.debug("Creating playbin-based gstreamer player")
37 self._player = gst.element_factory_make('playbin2', 'player')
38 self._filesrc = self._player
39 self._filesrc_property = 'uri'
40 self._volume_control = self._player
41 self._volume_multiplier = 1.
42 self._volume_property = 'volume'
43 return True