Exemple #1
0
 def __init__(self):
     """
         Init playbin
     """
     Gst.init(None)
     BasePlayer.__init__(self)
     self._codecs = Codecs()
     self._crossfading = False
     self._playbin = self._playbin1 = Gst.ElementFactory.make(
                                                        'playbin', 'player')
     self._playbin2 = Gst.ElementFactory.make('playbin', 'player')
     self._preview = None
     self._plugins = self.plugins1 = PluginsPlayer(self._playbin1)
     self.plugins2 = PluginsPlayer(self._playbin2)
     self._volume_id = self._playbin.connect('notify::volume',
                                             self._on_volume_changed)
     for playbin in [self._playbin1, self._playbin2]:
         flags = playbin.get_property("flags")
         flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
         playbin.set_property('flags', flags)
         playbin.set_property('buffer-size', 5 << 20)
         playbin.set_property('buffer-duration', 10 * Gst.SECOND)
         playbin.connect('about-to-finish',
                         self._on_stream_about_to_finish)
         bus = playbin.get_bus()
         bus.add_signal_watch()
         bus.connect('message::error', self._on_bus_error)
         bus.connect('message::eos', self._on_bus_eos)
         bus.connect('message::element', self._on_bus_element)
         bus.connect('message::stream-start', self._on_stream_start)
         bus.connect("message::tag", self._on_bus_message_tag)
     self._handled_error = None
     self._start_time = 0
Exemple #2
0
 def __init__(self):
     """
         Init playbin
     """
     Gst.init(None)
     BasePlayer.__init__(self)
     self._codecs = Codecs()
     self._crossfading = False
     self._playbin = self._playbin1 = Gst.ElementFactory.make(
         'playbin', 'player')
     self._playbin2 = Gst.ElementFactory.make('playbin', 'player')
     self._plugins = self.plugins1 = PluginsPlayer(self._playbin1)
     self.plugins2 = PluginsPlayer(self._playbin2)
     self._volume_id = self._playbin.connect('notify::volume',
                                             self._on_volume_changed)
     for playbin in [self._playbin1, self._playbin2]:
         flags = playbin.get_property("flags")
         flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
         playbin.set_property('flags', flags)
         playbin.set_property('buffer-size', 5 << 20)
         playbin.set_property('buffer-duration', 10 * Gst.SECOND)
         playbin.connect('about-to-finish', self._on_stream_about_to_finish)
         bus = playbin.get_bus()
         bus.add_signal_watch()
         bus.connect('message::error', self._on_bus_error)
         bus.connect('message::eos', self._on_bus_eos)
         bus.connect('message::element', self._on_bus_element)
         bus.connect('message::stream-start', self._on_stream_start)
         bus.connect("message::tag", self._on_bus_message_tag)
     self._handled_error = None
     self._start_time = 0
Exemple #3
0
 def __init__(self):
     """
         Init radio player
     """
     BasePlayer.__init__(self)
     self.__current = None
     self.__radios = []
Exemple #4
0
 def __init__(self):
     """
         Init playbin
     """
     Gst.init(None)
     BasePlayer.__init__(self)
     self.__codecs = Codecs()
     self._playbin = self.__playbin1 = Gst.ElementFactory.make(
         "playbin", "player")
     self.__playbin2 = Gst.ElementFactory.make("playbin", "player")
     self.__preview = None
     self._plugins = self._plugins1 = PluginsPlayer(self.__playbin1)
     self._plugins2 = PluginsPlayer(self.__playbin2)
     self._playbin.connect("notify::volume", self.__on_volume_changed)
     for playbin in [self.__playbin1, self.__playbin2]:
         flags = playbin.get_property("flags")
         flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
         playbin.set_property("flags", flags)
         playbin.set_property("buffer-size", 5 << 20)
         playbin.set_property("buffer-duration", 10 * Gst.SECOND)
         playbin.connect("about-to-finish",
                         self.__on_stream_about_to_finish)
         bus = playbin.get_bus()
         bus.add_signal_watch()
         bus.connect("message::error", self.__on_bus_error)
         bus.connect("message::eos", self.__on_bus_eos)
         bus.connect("message::element", self.__on_bus_element)
         bus.connect("message::stream-start", self._on_stream_start)
         bus.connect("message::tag", self.__on_bus_message_tag)
     self._start_time = 0
Exemple #5
0
 def __init__(self):
     """
         Init playbin
     """
     Gst.init(None)
     BasePlayer.__init__(self)
     self._codecs = Codecs()
     self._playbin = Gst.ElementFactory.make('playbin', 'player')
     flags = self._playbin.get_property("flags")
     flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
     self._playbin.set_property('flags', flags)
     self._playbin.set_property('buffer-size', 5 << 20)
     self._playbin.set_property('buffer-duration', 10 * Gst.SECOND)
     ReplayGainPlayer.__init__(self, self._playbin)
     self._playbin.connect('about-to-finish',
                           self._on_stream_about_to_finish)
     bus = self._playbin.get_bus()
     bus.add_signal_watch()
     bus.connect('message::error', self._on_bus_error)
     bus.connect('message::eos', self._on_bus_eos)
     bus.connect('message::element', self._on_bus_element)
     bus.connect('message::stream-start', self._on_stream_start)
     bus.connect("message::tag", self._on_bus_message_tag)
     self._handled_error = None
     self._start_time = 0
Exemple #6
0
 def __init__(self):
     """
         Init playbin
     """
     Gst.init(None)
     BasePlayer.__init__(self)
     self._codecs = Codecs()
     self._playbin = Gst.ElementFactory.make('playbin', 'player')
     flags = self._playbin.get_property("flags")
     flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
     self._playbin.set_property('flags', flags)
     self._playbin.set_property('buffer-size', 5 << 20)
     self._playbin.set_property('buffer-duration', 10 * Gst.SECOND)
     ReplayGainPlayer.__init__(self, self._playbin)
     self._playbin.connect('about-to-finish',
                           self._on_stream_about_to_finish)
     bus = self._playbin.get_bus()
     bus.add_signal_watch()
     bus.connect('message::error', self._on_bus_error)
     bus.connect('message::eos', self._on_bus_eos)
     bus.connect('message::element', self._on_bus_element)
     bus.connect('message::stream-start', self._on_stream_start)
     bus.connect("message::tag", self._on_bus_message_tag)
     self._handled_error = None
     self._start_time = 0
Exemple #7
0
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self.__user_playlist_ids = []
     self.__user_playlist = []
     self.__user_playlist_backup = []
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self._user_playlist_ids = []
     self._user_playlist = []
     self._user_playlist_backup = []
 def __init__(self):
     """
         Init shuffle player
     """
     BasePlayer.__init__(self)
     self.reset_history()
     # Party mode
     self.__is_party = False
     Lp().settings.connect('changed::shuffle', self.__set_shuffle)
Exemple #10
0
 def __init__(self):
     """
         Init shuffle player
     """
     BasePlayer.__init__(self)
     # Party mode
     self.__is_party = False
     self.reset_history()
     Lp().settings.connect('changed::shuffle', self.__set_shuffle)
Exemple #11
0
 def __init__(self):
     Gst.init(None)
     BasePlayer.__init__(self)
     self._playbin = Gst.ElementFactory.make('playbin', 'player')
     flags = self._playbin.get_property("flags")
     flags &= ~GstPlayFlags.GST_PLAY_FLAG_VIDEO
     self._playbin.set_property("flags", flags)
     ReplayGainPlayer.__init__(self, self._playbin)
     self._playbin.connect("about-to-finish",
     self._on_stream_about_to_finish)
     bus = self._playbin.get_bus()
     bus.add_signal_watch()
     bus.connect('message::error', self._on_bus_error)
     bus.connect('message::eos', self._on_bus_eos)
     bus.connect('message::stream-start', self._on_stream_start)
Exemple #12
0
 def __init__(self):
     BasePlayer.__init__(self)
     Objects.settings.connect('changed::shuffle', self._set_shuffle)
 def __init__(self):
     """
         Init linear player
     """
     BasePlayer.__init__(self)
Exemple #14
0
 def __init__(self):
    BasePlayer.__init__(self)
    Objects.settings.connect('changed::shuffle', self._set_shuffle)
 def __init__(self):
     BasePlayer.__init__(self)
Exemple #16
0
 def __init__(self):
     """
         Init linear player
     """
     BasePlayer.__init__(self)
Exemple #17
0
 def __init__(self):
     BasePlayer.__init__(self)
     self._current = None
Exemple #18
0
 def __init__(self):
     BasePlayer.__init__(self)
Exemple #19
0
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
Exemple #20
0
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self._user_playlist_id = None
 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self._user_playlist_id = None