本文整理汇总了Python中xbmc.PLAYER_CORE_AUTO属性的典型用法代码示例。如果您正苦于以下问题:Python xbmc.PLAYER_CORE_AUTO属性的具体用法?Python xbmc.PLAYER_CORE_AUTO怎么用?Python xbmc.PLAYER_CORE_AUTO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类xbmc
的用法示例。
在下文中一共展示了xbmc.PLAYER_CORE_AUTO属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: direct_play
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def direct_play(url):
_log("direct_play ["+url+"]")
title = ""
try:
xlistitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", path=url)
except:
xlistitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", )
xlistitem.setInfo( "video", { "Title": title } )
playlist = xbmc.PlayList( xbmc.PLAYLIST_VIDEO )
playlist.clear()
playlist.add( url, xlistitem )
player_type = xbmc.PLAYER_CORE_AUTO
xbmcPlayer = xbmc.Player( player_type )
xbmcPlayer.play(playlist)
示例2: onPlayBackStarted
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def onPlayBackStarted(self):
mensagemprogresso.close()
if xbmc.Player(xbmc.PLAYER_CORE_AUTO).getPlayingFile() != "http://"+LOCAL_IP+":"+str(VIDEO_PORT)+"/" and 'sopcast' not in xbmc.Player(xbmc.PLAYER_CORE_AUTO).getPlayingFile():
try: os.kill(self.spsc_pid,9)
except: pass
else: pass
示例3: onPlayBackEnded
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def onPlayBackEnded(self):
url = "http://"+LOCAL_IP+":"+str(VIDEO_PORT)+"/"
xbmc.sleep(300)
if os.path.exists("/proc/"+str(self.spsc_pid)) and xbmc.getCondVisibility("Window.IsActive(epg.xml)") and settings.getSetting('safe_stop')=="true":
if not xbmc.Player(xbmc.PLAYER_CORE_AUTO).isPlaying():
player = streamplayer(xbmc.PLAYER_CORE_AUTO , spsc_pid=self.spsc_pid , listitem=self.listitem)
player.play(url, self.listitem)
try:
xbmcvfs.delete(os.path.join(pastaperfil,'sopcast.avi'))
except:
pass
示例4: onPlayBackStopped
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def onPlayBackStopped(self):
self._playbackLock = False
url = "http://"+LOCAL_IP+":"+str(VIDEO_PORT)+"/"
xbmc.sleep(300)
if os.path.exists("/proc/"+str(self.spsc_pid)) and xbmc.getCondVisibility("Window.IsActive(epg.xml)") and settings.getSetting('safe_stop')=="true":
if not xbmc.Player(xbmc.PLAYER_CORE_AUTO).isPlaying():
player = streamplayer(xbmc.PLAYER_CORE_AUTO , spsc_pid=self.spsc_pid , listitem=self.listitem)
player.play(url, self.listitem)
else:
try: os.kill(self.spsc_pid,9)
except: pass
try:
xbmcvfs.delete(os.path.join(pastaperfil,'sopcast.avi'))
except:
pass
示例5: __init__
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def __init__(self):
self._stopped = False
self._totalTime = 999999
xbmc.Player.__init__(self, xbmc.PLAYER_CORE_AUTO)
示例6: getPlayerType
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def getPlayerType(self):
sPlayerType = common.getSetting('playerType')
if (sPlayerType == '0'):
return xbmc.PLAYER_CORE_AUTO
elif (sPlayerType == '1'):
return xbmc.PLAYER_CORE_MPLAYER
elif (sPlayerType == '2'):
return xbmc.PLAYER_CORE_DVDPLAYER
# PLAYER_CORE_AMLPLAYER
elif (sPlayerType == '3'):
return 5
return xbmc.PLAYER_CORE_AUTO
示例7: getPlayerType
# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import PLAYER_CORE_AUTO [as 别名]
def getPlayerType(self):
return True
sPlayerType = ptv.getSetting('playerType')
if (sPlayerType == '0'):
return xbmc.PLAYER_CORE_AUTO
elif (sPlayerType == '1'):
return xbmc.PLAYER_CORE_MPLAYER
elif (sPlayerType == '2'):
return xbmc.PLAYER_CORE_DVDPLAYER
# PLAYER_CORE_AMLPLAYER
elif (sPlayerType == '3'):
return 5
return xbmc.PLAYER_CORE_AUTO