本文整理汇总了Python中freestream.Core.DownloadConfig.DownloadConfigInterface.set_player_buffer_time方法的典型用法代码示例。如果您正苦于以下问题:Python DownloadConfigInterface.set_player_buffer_time方法的具体用法?Python DownloadConfigInterface.set_player_buffer_time怎么用?Python DownloadConfigInterface.set_player_buffer_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类freestream.Core.DownloadConfig.DownloadConfigInterface
的用法示例。
在下文中一共展示了DownloadConfigInterface.set_player_buffer_time方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_player_buffer_time
# 需要导入模块: from freestream.Core.DownloadConfig import DownloadConfigInterface [as 别名]
# 或者: from freestream.Core.DownloadConfig.DownloadConfigInterface import set_player_buffer_time [as 别名]
def set_player_buffer_time(self, value):
if DEBUG:
log('DownloadRuntimeConfig::set_player_buffer_time', binascii.hexlify(self.get_hash()), value)
self.dllock.acquire()
try:
if self.sd is not None:
set_player_buffer_time_lambda = lambda : self.sd is not None and self.sd.set_player_buffer_time(value)
self.session.lm.rawserver.add_task(set_player_buffer_time_lambda, 0)
if self.dd is not None:
set_player_buffer_time_lambda = lambda : self.dd is not None and self.dd.set_player_buffer_time(value)
self.session.lm.rawserver.add_task(set_player_buffer_time_lambda, 0)
DownloadConfigInterface.set_player_buffer_time(self, value)
finally:
self.dllock.release()