Create 2 gst-pipeline on qml
Unsolved
QML and Qt Quick
-
Hi everyone,
I would like to create 2 gst-pipelines with diferent items to play 2 different videos using the same structure shown on reference:
[https://doc.qt.io/qt-5/qml-qtmultimedia-mediaplayer.html]
Item { MediaPlayer { id: mediaplayer source: "gst-pipeline: videotestsrc ! qtvideosink" } VideoOutput { anchors.fill: parent source: mediaplayer } MouseArea { id: playArea anchors.fill: parent onPressed: mediaplayer.play(); }}
/* My code is:*/
ColumnLayout { id: columnLayout anchors.fill: parent spacing: 0 Item { id: item1 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter width: 220 height: 220 Layout.fillWidth: true Layout.fillHeight: true VideoPlayer { width: parent.width height: parent.height color: backgroundColor source: "gst-pipeline: rtspsrc location= " + video1Url + " latency=0 protocols=tcp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink" title: video1Name inverted: video1Inverted MouseArea { anchors.fill: parent } } } } RowLayout { spacing: 0 Item { id: item2 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter height: 70 Layout.fillWidth: true Layout.fillHeight: true VideoPlayer { width: parent.width height: parent.height color: backgroundColor source: "gst-pipeline: rtspsrc location= " + video2Url + " latency=0 protocols=tcp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! qtvideosink" title: video2Name inverted: video2Inverted MouseArea { anchors.fill: parent } } }
With this code I just can get 1 one of them working. I would like to create a gst-pipeline for each video. Any idea about what changes what I have to do please? Thanks