Issue
I am trying to develop python application, which displays received UDP stream insige QWidget window. I use gstreamer and Pyside (Qt). To do this I need to set window handle with my QWidget's winId and I do so. Code sample below:
def _on_any_bus_message(self, bus, message):
structure = message.get_structure()
if structure is not None:
print(structure.get_name())
if structure.get_name() == "prepare-window-handle":
message.src.set_window_handle(self.videoWidget.winId())
return Gst.BusSyncReply.PASS
videoWidget
is of type QWidget
.
When I run my application in Ubuntu 18.04 VM and try to receive stream, it opens in new OpenGL renderer window instead of expected window. I printed the incomming messages in the code above and noticed that message "prepare-window-handle"
is never received.
I did another test - I run the same application in docker container with Ubuntu 16.04 and the message "prepare-window-handle"
was received - it was printed in terminal and handled by application.
Both linux machines have gstreamer1.0 installed with the same set of plugins. What could be the reason that on Linux VM this message is not received? Does it have something to do with graphics drivers or some acceleration issues?
Solution
Thanks to Florian's questions i directed my investigation in a good direction and found the solution for my problem - gstreamer receiving pipeline needs to have autovideosink
changed to ximagesink
. The full working pipeline posted below:
udpsrc port=4000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtpjitterbuffer ! rtph264depay ! decodebin ! videoconvert ! ximagesink sync=FALSE
Answered By - irky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.