本文整理匯總了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