当前位置: 首页>>代码示例>>Python>>正文


Python player_base.BasePlayer类代码示例

本文整理汇总了Python中lollypop.player_base.BasePlayer的典型用法代码示例。如果您正苦于以下问题:Python BasePlayer类的具体用法?Python BasePlayer怎么用?Python BasePlayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BasePlayer类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 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
开发者ID:Nikhil-z,项目名称:lollypop,代码行数:33,代码来源:player_bin.py

示例2: __init__

 def __init__(self):
     """
         Init radio player
     """
     BasePlayer.__init__(self)
     self.__current = None
     self.__radios = []
开发者ID:TainakaDrums,项目名称:lollypop,代码行数:7,代码来源:player_radio.py

示例3: __init__

 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
开发者ID:oleastre,项目名称:lollypop,代码行数:25,代码来源:player_bin.py

示例4: __init__

 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self._user_playlist_ids = []
     self._user_playlist = []
     self._user_playlist_backup = []
开发者ID:sgnls,项目名称:lollypop,代码行数:8,代码来源:player_userplaylist.py

示例5: __init__

 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)
开发者ID:TainakaDrums,项目名称:lollypop,代码行数:9,代码来源:player_shuffle.py

示例6: __init__

 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)
开发者ID:horst3180,项目名称:lollypop,代码行数:15,代码来源:player_bin.py

示例7: __init__

 def __init__(self):
     """
         Init linear player
     """
     BasePlayer.__init__(self)
开发者ID:ktosiu,项目名称:lollypop,代码行数:5,代码来源:player_linear.py

示例8: __init__

 def __init__(self):
     BasePlayer.__init__(self)
     self._current = None
开发者ID:yoseforb,项目名称:lollypop,代码行数:3,代码来源:player_radio.py

示例9: __init__

 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
开发者ID:Nikhil-z,项目名称:lollypop,代码行数:5,代码来源:player_externals.py

示例10: __init__

 def __init__(self):
     """
         Init user playlist
     """
     BasePlayer.__init__(self)
     self._user_playlist_id = None
开发者ID:kenden,项目名称:lollypop,代码行数:6,代码来源:player_userplaylist.py

示例11: __init__

 def __init__(self):
     BasePlayer.__init__(self)
开发者ID:horst3180,项目名称:lollypop,代码行数:2,代码来源:player_userplaylist.py

示例12: __init__

 def __init__(self):
    BasePlayer.__init__(self)
    Objects.settings.connect('changed::shuffle', self._set_shuffle)
开发者ID:horst3180,项目名称:lollypop,代码行数:3,代码来源:player_shuffle.py


注:本文中的lollypop.player_base.BasePlayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。