Python gi.repository 模块,GstVideo() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用gi.repository.GstVideo()

项目:gpt    作者:encarsia    | 项目源码 | 文件源码
def setup_player(self,f):
        #file to play must be transmitted as uri
        self.uri = "file://"+os.path.abspath(f)
        self.player.set_property("uri",self.uri)

        #make playbin play in specified window instead separate
        #import GdkX11 and GstVideo 
        win_id = self.movie_window.get_property('window').get_xid()
        self.sink.set_window_handle(win_id)
        self.player.set_property("video-sink",self.sink)