2013-10-02 3 views
2

나는 몇 개의 비디오를 재생하려고합니다. 내가 스레드에서 몇 가지 오류를 생각하고, 파이 게임 동영상 플레이어파이 게임 많은 영화를 재생

python2.6: ../../src/xcb_io.c:183: process_responses: Assertion `!(req && current_request && !(((long) (req->sequence) - (long) (current_request)) <= 0))' failed.

: 오류를 가지고와. 파이 게임에 대한 문서에서

썼다 :

The video overlay planes are drawn on top of everything in the display window. To draw the movie as normal graphics into the display window, create an offscreen Surface and set that as the movie target. Then once per frame blit that surface to the screen

나에게 예를 들어 사람을 줄 수 있을까요?

pygame.init() 
screen = pygame.display.set_mode((1024, 768)) 
background = pygame.Surface((1024, 768)) 

screen.blit(background, (0, 0)) 
pygame.display.update() 

movie = pygame.movie.Movie('media/video.mpg') 
mrect = pygame.Rect(0,0,140,113) 
movie.set_display(screen, mrect.move(65, 150)) 
movie.set_volume(0) 
movie.play() 

mrect2 = pygame.Rect(0,0,140,113) 
movie2 = pygame.movie.Movie('media/video2.mpg') 
movie2.set_display(screen, mrect2.move(350, 150)) 
movie2.set_volume(0) 
movie2.play() 
+0

코드는 지금까지 문제가 없습니다. 어떤 OS, 파이 게임 및 libxcb 버전을 사용하고 있습니까? – sloth

+0

우분투 10.10, 파이 게임 현재 버전. 이 주제는 종료 될 수 있습니다. – Anshik

답변

1

두 화면을 동일한 화면에 설정하면 멀티 트레드 오류가 발생할 수 있습니다. 각 영화에 대해 새 서페이스를 정의하고 화면에 표시되도록 설정하십시오.