信封 - python2.7,windows7的上GStreamer的1.0'gtk.gdk.Win32Window' 對象有沒有屬性 'get_xid'
我試圖在我的ENV運行從http://bazaar.launchpad.net/~jderose/+junk/gst-examples/view/head:/video-player-1.0代碼,並且它與AttributeError: 'gtk.gdk.Win32Window' object has no attribute 'get_xid'
我發現最少的代碼來測試get_xid這裏粘貼: -
import gi
gi.require_version("GdkX11", "3.0")
gi.require_version('Gtk', '3.0')
from gi.repository import GdkX11, Gtk, GstVideo
class App:
def __init__(self):
win = Gtk.Window()
win.resize(400, 400)
win.connect('delete-event', Gtk.main_quit)
da = Gtk.DrawingArea()
win.add(da)
win.show_all()
import pdb;pdb.set_trace()
print da.get_property('window').get_xid()
if __name__ == "__main__":
App()
Gtk.main()
AttributeError: 'gtk.gdk.Win32Window' object has no attribute 'get_xid'
理想的情況下,如果我有進口GdkX11
然後窗口對象應該get_xid,但它不工作的windows7的環境,貌似GdkX11
沒有t用於windows用戶。請告訴我該如何解決這個問題。
可能重複:http://stackoverflow.com/a/8012212/1513933 –
這是特定於Windows,我想不同的解決方案將適用在這裏。 – AlokThakur