Re: Xvideo: Autopaint colorkey bug in the Unix version of Helix

Greg Wright <[email protected]>
Newsgroups gmane.comp.multimedia.helix.devel
Message-ID <[email protected]>
Bankim Bhavsar wrote:
> Hi Daniel,
> In the 1st iteration of the Xv extension in VMware video driver we
> just had XV_COLORKEY attribute and relied on the application to paint
> the colorkey. With no autopaint feature in the
> driver, videos didn't play with Real Player. So we added the
> XV_AUTOPAINT_COLORKEY attribute. Although the driver starts with
> default value of 1, if some other application (eg Mplayer) changes the
> attribute to 0 then videos will stop working with Real player.
> 
> Setting XV_AUTOPAINT_COLORKEY to 1 will solve this problem.
> 
> Any idea when is the next release of Real player for Linux coming up?

Daniel, take a look at:

     m_bNeedColorKeyFilled = FALSE;

     //XXXgfw, this is not needed on unix because our overlay support
     //automatically fills the window with the color key....

     //XXXgfw Well, this turns out to be mostly true. With our new fancy
     //presentation-feature SMIL demo we have a problem where the video can not
     //be seen until you see the player. This is the only case I have seen where
     //the automatic drawing of the color key by X11 is not sufficient. So, I am
     //enabling the color-key rectangle-fill code below. I may also turn off the
     //auto-color-key-fill code in XVideo so that we don't have 2 different
     //pieces of code blt'ing the color key at the same time.


//XXXgfw when we have time we should make this work in a more
//cross platform way.
//#if !defined(_UNIX) || defined(_MAC_UNIX)
     CBaseRootSurface* pSurface = m_pSite->GetRootSurface();

     pSurface->LockCompMutex();
     if (pSurface->IsCompositionEnabled())
     {
         //If composition is enabled we must also blt to that.
         HXxDC hdc;
         _GetCompositionSurfaceHXxDC(&hdc);
         FillColorKey(hdc);
         _ReleaseCompositionSurfaceHXxDC(hdc);
     }
     pSurface->UnlockCompMutex();

     //Use GDI to fill in this rect.
     HXxWindow* pWindow = m_pSite->GetWindow();
     if (pWindow && pWindow->window)
     {
         HXxDC hdc = _GetDC(pWindow);
         FillColorKey(hdc);
         _ReleaseDC(pWindow, hdc);
     }
//#else
     //Unix fillcolorkey here....
     //_UnixFillColorKey();
//#endif
}


It looks like we should be working even without Xv painting the
color key for us. Is this change, in basesurf.cpp, in your branch?

--greg.


_______________________________________________
Helix-client-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.