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


Python Log.v方法代码示例

本文整理汇总了Python中util.Log.v方法的典型用法代码示例。如果您正苦于以下问题:Python Log.v方法的具体用法?Python Log.v怎么用?Python Log.v使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在util.Log的用法示例。


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

示例1: parse_audio

# 需要导入模块: from util import Log [as 别名]
# 或者: from util.Log import v [as 别名]
	def parse_audio(self, ffprobe_dict):
		if ffprobe_dict == False:
			return

		audio_streams = []

		for stream in ffprobe_dict["streams"]:
			if stream["codec_type"] == "audio":
				language_found = None
				try:
					language_found = stream["tags"]["language"]
				except:
					Log.v(TAG, "Could not find a language for stream " + str(stream["index"]))
				audio_streams.append({"index": stream["index"], "codec": stream["codec_name"], "channels": stream["channels"], "language": language_found})
		return audio_streams
开发者ID:magmastonealex,项目名称:ffproc,代码行数:17,代码来源:MediaParser.py

示例2: parse_subs

# 需要导入模块: from util import Log [as 别名]
# 或者: from util.Log import v [as 别名]
	def parse_subs(self, ffprobe_dict):
		if ffprobe_dict == False:
			return
		sub_streams = []
		for stream in ffprobe_dict["streams"]:
			if stream["codec_type"] == "subtitle":
				language_found = None
				try:
					language_found = stream["tags"]["language"]
				except:
					Log.v(TAG, "Could not find a language for stream " + str(stream["index"]))
				# number of frames or bitrate is the best way to figure out the difference between secondary (ie foreign langauge/ forced) and primary (all text) captions.
				# There is likely a better way... still need to find it.
				br = None
				try:
					br = stream["nb_frames"]
				except:
					try:
						br = stream["tags"]["NUMBER_OF_FRAMES"]
					except:
						pass
				sub_streams.append({"index": stream["index"], "codec": stream["codec_name"], "language": language_found, "numframes": br})
		return sub_streams
开发者ID:magmastonealex,项目名称:ffproc,代码行数:25,代码来源:MediaParser.py

示例3: Parser

# 需要导入模块: from util import Log [as 别名]
# 或者: from util.Log import v [as 别名]
fileparsed = Parser(startfilename)



profile = arguments.profile
basefilename = os.path.basename(arguments.file)



if profile == None:
	regexes = json.loads(open("regexes.json").read())
	for regex in regexes:
		if re.match(regex["regex"], basefilename) != None:
			profile = regex["profile"]
			Log.v(TAG, "Got profile " + profile + " for " + basefilename)

if profile == None:
	#No regex matched either!
	profile = "default"


if profile not in allprofiles:
	Log.e(TAG, "Profile " + profile+" does not exist!")
	sys.exit()

discoveredprofile = allprofiles[profile]
#TODO: use argparse here


thistask = transformer.ffmpeg_tasks_create(fileparsed,discoveredprofile)
开发者ID:olipayne,项目名称:ffproc,代码行数:32,代码来源:ffproc.py


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