Ticket #6834: vdpau_flipqueue_locking.diff
File vdpau_flipqueue_locking.diff, 3.0 KB (added by , 15 years ago) |
---|
-
home/mark/mythtv/trunk/mythtv/libs/libmythtv/util-vdpau.cpp
70 70 } 71 71 72 72 VDPAUContext::VDPAUContext() 73 : nextframedelay(0),lastframetime(0),73 : display(NULL), nextframedelay(0), lastframetime(0), 74 74 pix_fmt(-1), checkVideoSurfaces(8), pause_surface(0), 75 75 outputSurface(0), checkOutputSurfaces(false), 76 76 outputSize(QSize(0,0)), decoder(0), maxReferences(2), … … 134 134 bool color_control, int color_key, 135 135 MythCodecID mcodecid, QString options) 136 136 { 137 display = disp; 137 138 outputSize = screen_size; 138 139 ParseOptions(options); 139 140 … … 142 143 143 144 bool ok; 144 145 145 ok = InitProcs( disp);146 ok = InitProcs(); 146 147 if (!ok) 147 148 return ok; 148 149 … … 185 186 return &dummy[0]; 186 187 } 187 188 188 bool VDPAUContext::InitProcs( MythXDisplay *disp)189 bool VDPAUContext::InitProcs(void) 189 190 { 191 if (!display) 192 return false; 193 190 194 VdpStatus vdp_st; 191 195 bool ok = true; 192 196 vdp_get_error_string = &dummy_get_error_string; 193 197 194 XLOCK(disp , vdp_st = vdp_device_create_x11(195 disp ->GetDisplay(),196 disp ->GetScreen(),198 XLOCK(display, vdp_st = vdp_device_create_x11( 199 display->GetDisplay(), 200 display->GetScreen(), 197 201 &vdp_device, 198 202 &vdp_get_proc_address 199 203 )); … … 540 544 VdpStatus vdp_st; 541 545 bool ok = true; 542 546 547 if (!display) 548 return false; 549 550 display->Lock(); 543 551 vdp_st = vdp_presentation_queue_target_create_x11( 544 552 vdp_device, 545 553 win, … … 569 577 CHECK_ST 570 578 } 571 579 580 display->Unlock(); 572 581 return ok; 573 582 } 574 583 … … 577 586 VdpStatus vdp_st; 578 587 bool ok = true; 579 588 589 if (display) 590 display->Lock(); 591 580 592 if (vdp_flip_queue) 581 593 { 582 594 vdp_st = vdp_presentation_queue_destroy( … … 592 604 vdp_flip_target = 0; 593 605 CHECK_ST 594 606 } 607 608 if (display) 609 display->Unlock(); 610 595 611 } 596 612 597 613 int VDPAUContext::AddBuffer(int width, int height) -
home/mark/mythtv/trunk/mythtv/libs/libmythtv/util-vdpau.h
103 103 void DeinitPIP(NuppelVideoPlayer *pipplayer, bool check_layer = true); 104 104 105 105 private: 106 bool InitProcs( MythXDisplay *disp);106 bool InitProcs(void); 107 107 void DeinitProcs(void); 108 108 void ClearScreen(void); 109 109 VdpVideoMixer CreateMasterMixer(int width, int height); … … 119 119 bool InitPIP(NuppelVideoPlayer *pipplayer, QSize vid_size); 120 120 void ParseOptions(QString options); 121 121 122 MythXDisplay *display; 122 123 int nextframedelay; 123 124 VdpTime lastframetime; 124 125