diff options
author | Philippe Normand <philn@igalia.com> | 2021-05-20 16:43:25 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-05-25 10:46:47 +0000 |
commit | ac888515877ced76d7291e48d57e1666d7f6198b (patch) | |
tree | 71016f60c2d7112c6b6131818c80c43648bcfa28 | |
parent | 34a88d95c6c7bb61ac97c073e15f61b9e61046f5 (diff) |
validate: launcher: Simplify fakesink handling
Now the function returns either a fakeaudiosink or a fakevideosink, depending on
the media type.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/246>
-rw-r--r-- | validate/launcher/utils.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/validate/launcher/utils.py b/validate/launcher/utils.py index 26dca49..09166bd 100644 --- a/validate/launcher/utils.py +++ b/validate/launcher/utils.py @@ -658,16 +658,11 @@ def format_config_template(extra_data, config_text, test_name): def get_fakesink_for_media_type(media_type, needs_clock=False): - if media_type == "video": - if needs_clock: - return 'fakevideosink qos=true max-lateness=20000000' + extra = "" + if media_type == "video" and needs_clock: + extra = 'max-lateness=20000000' - return "fakevideosink sync=false" - - if needs_clock: - return "fakesink sync=true" - - return "fakesink" + return f"fake{media_type}sink sync={needs_clock} {extra}" class InvalidValueError(ValueError): |