mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
tests/examples/qmlglveray.py: fix formatting for commit lint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
This commit is contained in:
parent
be1841904b
commit
6218b153fd
1 changed files with 8 additions and 6 deletions
|
@ -26,22 +26,23 @@
|
||||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
# THE POSSIBILITY OF SUCH DAMAGE.
|
# 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
|
import signal
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
import sys
|
|
||||||
import gi
|
|
||||||
gi.require_version('Gst', '1.0')
|
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):
|
def main(args):
|
||||||
app = QGuiApplication(args)
|
app = QGuiApplication(args)
|
||||||
Gst.init(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')
|
o = pipeline.get_by_name('o')
|
||||||
f = open('overlay.qml', 'r')
|
f = open('overlay.qml', 'r')
|
||||||
o.set_property('qml-scene', f.read())
|
o.set_property('qml-scene', f.read())
|
||||||
|
@ -50,5 +51,6 @@ def main(args):
|
||||||
app.exec_()
|
app.exec_()
|
||||||
pipeline.set_state(Gst.State.NULL)
|
pipeline.set_state(Gst.State.NULL)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main(sys.argv))
|
sys.exit(main(sys.argv))
|
||||||
|
|
Loading…
Reference in a new issue