From 6218b153fd2cca91c0cfdb4a05f618cecfee8909 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 26 Jul 2024 11:12:25 +1000 Subject: [PATCH] tests/examples/qmlglveray.py: fix formatting for commit lint Part-of: --- .../tests/examples/qt/qmloverlay/overlay.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-good/tests/examples/qt/qmloverlay/overlay.py b/subprojects/gst-plugins-good/tests/examples/qt/qmloverlay/overlay.py index e4fe30d211..38fd9a1d96 100644 --- a/subprojects/gst-plugins-good/tests/examples/qt/qmloverlay/overlay.py +++ b/subprojects/gst-plugins-good/tests/examples/qt/qmloverlay/overlay.py @@ -26,22 +26,23 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGE. +from PySide2.QtQuick import QQuickItem +from PySide2.QtGui import QGuiApplication +from gi.repository import Gst, GLib +import gi +import sys import signal signal.signal(signal.SIGINT, signal.SIG_DFL) -import sys -import gi gi.require_version('Gst', '1.0') -from gi.repository import Gst, GLib -from PySide2.QtGui import QGuiApplication -from PySide2.QtQuick import QQuickItem def main(args): app = QGuiApplication(args) Gst.init(args) - pipeline = Gst.parse_launch("""videotestsrc ! glupload ! qmlgloverlay name=o ! gldownload ! videoconvert ! autovideosink""") + pipeline = Gst.parse_launch( + """videotestsrc ! glupload ! qmlgloverlay name=o ! gldownload ! videoconvert ! autovideosink""") o = pipeline.get_by_name('o') f = open('overlay.qml', 'r') o.set_property('qml-scene', f.read()) @@ -50,5 +51,6 @@ def main(args): app.exec_() pipeline.set_state(Gst.State.NULL) + if __name__ == '__main__': sys.exit(main(sys.argv))