From: Alexey C. <4e...@gm...> - 2009-11-26 19:02:26
|
Nicolas, thank you for suggestion. Unfortunately, I didn't manage to solve this using thread lock, it seems that it's Qt bug that it doesn't make the window native on winId() request. I made a workaround, the first time I play the file twice (stop the first turn in 300 msecs and play again). В сообщении от Вторник 24 ноября 2009 07:34:22 вы написали: > I think I have almost the same problem but with gtk . > You have to put a lock , during update of xwindow_id. > > See bug https://bugzilla.gnome.org/show_bug.cgi?id=599885 > > Exemple code with GTK > > def on_sync_message(self, bus, message): > > if message.structure is None: > > return > > > > if message.structure.get_name() == "prepare-xwindow-id": > > # Assign the viewport > > gtk.gdk.threads_enter() > > gtk.gdk.display_get_default().sync() > > imagesink = message.src > > imagesink.set_property("force-aspect-ratio", True) > > imagesink.set_xwindow_id(self.movie_window.window.xid) > > gtk.gdk.threads_leave() > > Nico > > 4ernov a écrit : > > Hello, > > I suffer strange problem when using xvimagesink and ximagesink and > > displaying the output to Qt4's QWidget. I initialize sink element with > > windowid of QWidget: > > > > gst_x_overlay_set_xwindow_id ((GstXOverlay*)xvimagesink, > > ui->video->winId()); > > > > and then play video to it using playbin with this sink set as video-sink: > > > > g_object_set(G_OBJECT (_pipeline), "video-sink", xvimagesink, NULL); > > > > Video files (I tried avi with Xvid encoded video) are played just > > fine, but when I try to play any DVD disc pipeline works ok, sound > > goes but nothing is displayed on the widget and console is filled with > > X Error messages: > > > > X Error: BadGC (invalid GC parameter) 13 > > Extension: 133 (Uknown extension) > > Minor opcode: 19 (Unknown request) > > Resource id: 0x4c00002 > > > > I think it prints one such text on every frame, very often. > > Also, if I set windowid of the main window of application, i.e.: > > > > gst_x_overlay_set_xwindow_id ((GstXOverlay*)xvimagesink, this->winId()); > > > > everything works ok, too. > > > > Could you please help me with the problem? How can I fix it or maybe > > it's a bug in GStreamer or Qt? > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > >----- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > > 30-Day trial. Simplify your report design, integration and deployment - > > and focus on what you do best, core application coding. Discover what's > > new with Crystal Reports now. http://p.sf.net/sfu/bobj-july > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > gstreamer-devel mailing list > > gst...@li... > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > |