本文整理汇总了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
示例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
示例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)