def on_sync_message(self, bus, message):
print("sync: %s" % bus, message)
if message is None or message.structure is None:
return
message_name = message.structure.get_name()
if message_name == "prepare-xwindow-id":
imagesink = message.src
imagesink.set_property("force-aspect-ratio", True)
Gdk.threads_enter()
# FIXME: this is the way to do it, *but* get_xid() is not
# exported in the GIR
xid = self.player.movie_window.get_window().get_xid()
imagesink.set_xwindow_id(xid)
Gdk.threads_leave()
评论列表
文章目录