mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +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
|
global last_carriage_return_len
|
||||||
if title or title_char:
|
if title or title_char:
|
||||||
length = 0
|
length = 0
|
||||||
for l in message.split("\n"):
|
for line in message.split("\n"):
|
||||||
if len(l) > length:
|
if len(line) > length:
|
||||||
length = len(l)
|
length = len(line)
|
||||||
if length == 0:
|
if length == 0:
|
||||||
length = len(message)
|
length = len(message)
|
||||||
|
|
||||||
|
@ -319,9 +319,9 @@ def get_duration(media_file):
|
||||||
# in that case.
|
# in that case.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for l in res.split('\n'):
|
for line in res.split('\n'):
|
||||||
if "Duration: " in l:
|
if "Duration: " in line:
|
||||||
duration = parse_gsttimeargs(l.replace("Duration: ", ""))
|
duration = parse_gsttimeargs(line.replace("Duration: ", ""))
|
||||||
break
|
break
|
||||||
|
|
||||||
return duration
|
return duration
|
||||||
|
@ -659,7 +659,8 @@ def format_config_template(extra_data, config_text, test_name):
|
||||||
test_name.replace('.', os.sep))
|
test_name.replace('.', os.sep))
|
||||||
actual_results_dir = os.path.join(extra_vars['validate-flow-actual-results-dir'],
|
actual_results_dir = os.path.join(extra_vars['validate-flow-actual-results-dir'],
|
||||||
test_name.replace('.', os.sep))
|
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:
|
if 'ssim-results-dir' in extra_vars:
|
||||||
ssim_results = extra_vars['ssim-results-dir']
|
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):
|
class InvalidValueError(ValueError):
|
||||||
"""Received value is invalid"""
|
"""Received value is invalid"""
|
||||||
|
|
||||||
def __init__(self, name, value, expect):
|
def __init__(self, name, value, expect):
|
||||||
ValueError.__init__(
|
ValueError.__init__(
|
||||||
self, "Invalid value {!r} for {}. Expect {}.".format(
|
self, "Invalid value {!r} for {}. Expect {}.".format(
|
||||||
|
@ -1293,13 +1295,13 @@ class GstStructure(Loggable):
|
||||||
|
|
||||||
# see GST_ASCII_IS_STRING in gst_private.h
|
# see GST_ASCII_IS_STRING in gst_private.h
|
||||||
GST_ASCII_CHARS = [
|
GST_ASCII_CHARS = [
|
||||||
ord(l) for l in "abcdefghijklmnopqrstuvwxyz"
|
ord(line) for line in "abcdefghijklmnopqrstuvwxyz"
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"0123456789"
|
"0123456789"
|
||||||
"_-+/:."
|
"_-+/:."
|
||||||
]
|
]
|
||||||
LEADING_OCTAL_CHARS = [ord(l) for l in "0123"]
|
LEADING_OCTAL_CHARS = [ord(line) for line in "0123"]
|
||||||
OCTAL_CHARS = [ord(l) for l in "01234567"]
|
OCTAL_CHARS = [ord(line) for line in "01234567"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def serialize_string(cls, value):
|
def serialize_string(cls, value):
|
||||||
|
@ -1573,6 +1575,7 @@ class GstCapsFeatures():
|
||||||
"""
|
"""
|
||||||
Mimicking a GstCapsFeatures.
|
Mimicking a GstCapsFeatures.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, *features):
|
def __init__(self, *features):
|
||||||
"""
|
"""
|
||||||
Initialize the GstCapsFeatures.
|
Initialize the GstCapsFeatures.
|
||||||
|
|
Loading…
Reference in a new issue