我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用gi.repository.GstVideo()。
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)