mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
validate:launcher: Reindent utils.py
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
This commit is contained in:
parent
004a83f82a
commit
9a183e45d4
1 changed files with 43 additions and 40 deletions
|
@ -174,9 +174,9 @@ def printc(message, color="", title=False, title_char='', end="\n"):
|
|||
global last_carriage_return_len
|
||||
if title or title_char:
|
||||
length = 0
|
||||
for l in message.split("\n"):
|
||||
if len(l) > length:
|
||||
length = len(l)
|
||||
for line in message.split("\n"):
|
||||
if len(line) > length:
|
||||
length = len(line)
|
||||
if length == 0:
|
||||
length = len(message)
|
||||
|
||||
|
@ -319,9 +319,9 @@ def get_duration(media_file):
|
|||
# in that case.
|
||||
pass
|
||||
|
||||
for l in res.split('\n'):
|
||||
if "Duration: " in l:
|
||||
duration = parse_gsttimeargs(l.replace("Duration: ", ""))
|
||||
for line in res.split('\n'):
|
||||
if "Duration: " in line:
|
||||
duration = parse_gsttimeargs(line.replace("Duration: ", ""))
|
||||
break
|
||||
|
||||
return duration
|
||||
|
@ -659,7 +659,8 @@ def format_config_template(extra_data, config_text, test_name):
|
|||
test_name.replace('.', os.sep))
|
||||
actual_results_dir = os.path.join(extra_vars['validate-flow-actual-results-dir'],
|
||||
test_name.replace('.', os.sep))
|
||||
extra_vars['validateflow'] = "validateflow, expectations-dir=\"%s\", actual-results-dir=\"%s\"" % (expectations_dir, actual_results_dir)
|
||||
extra_vars['validateflow'] = "validateflow, expectations-dir=\"%s\", actual-results-dir=\"%s\"" % (
|
||||
expectations_dir, actual_results_dir)
|
||||
|
||||
if 'ssim-results-dir' in extra_vars:
|
||||
ssim_results = extra_vars['ssim-results-dir']
|
||||
|
@ -681,6 +682,7 @@ def get_fakesink_for_media_type(media_type, needs_clock=False):
|
|||
|
||||
class InvalidValueError(ValueError):
|
||||
"""Received value is invalid"""
|
||||
|
||||
def __init__(self, name, value, expect):
|
||||
ValueError.__init__(
|
||||
self, "Invalid value {!r} for {}. Expect {}.".format(
|
||||
|
@ -1293,13 +1295,13 @@ class GstStructure(Loggable):
|
|||
|
||||
# see GST_ASCII_IS_STRING in gst_private.h
|
||||
GST_ASCII_CHARS = [
|
||||
ord(l) for l in "abcdefghijklmnopqrstuvwxyz"
|
||||
ord(line) for line in "abcdefghijklmnopqrstuvwxyz"
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"0123456789"
|
||||
"_-+/:."
|
||||
]
|
||||
LEADING_OCTAL_CHARS = [ord(l) for l in "0123"]
|
||||
OCTAL_CHARS = [ord(l) for l in "01234567"]
|
||||
LEADING_OCTAL_CHARS = [ord(line) for line in "0123"]
|
||||
OCTAL_CHARS = [ord(line) for line in "01234567"]
|
||||
|
||||
@classmethod
|
||||
def serialize_string(cls, value):
|
||||
|
@ -1573,6 +1575,7 @@ class GstCapsFeatures():
|
|||
"""
|
||||
Mimicking a GstCapsFeatures.
|
||||
"""
|
||||
|
||||
def __init__(self, *features):
|
||||
"""
|
||||
Initialize the GstCapsFeatures.
|
||||
|
|
Loading…
Reference in a new issue