Re: [Ekiga-devel-list] preliminary patch for X-Video support



Matthias Schneider a écrit :
Hello,

if I understand you and Julien correctly the best aproach would be:
write a wrapper PVideoOutputDevice_ekiga that registers with OPAL (in GMManager::GMManager()) and
may switch between multiple PVideoOutputDevices dynamically? (right now that would be GDK/SDL and
XV)

Yes, that's my idea.

However this requires a change of the PVideoOutputDevice interface specifications if I am not
mistaken, we need some way to signal back to the wraper device that something has gone wrong and
we have to select the next-priority device. This could be e.g.
  - a init function that returns some value
  - let the setframedata function return some information
  - both
Please let me know if I understood correctly and my conclusion is correct.

Hmmm... no, in the place of the code where you say "Opal, this is my PVideoOutputDevice", you know say : "Ekiga, try to use this PVideoOutputDeviceXV into your wrapper... you can't ? Then try this one (SDL) ? Still can't ? Ok, let's fall back to GDK"

In a more codish way :

#ifdef HAS_XV
if (!myOutputDevice->Wrap (XVOutput))
#endif
#ifdef HAS_SDL
  if (!myOutputDevice->Wrap (SDLOutput))
#endif
    (void)myOutputDevice->Wrap (GDKOutput);

Where our facade implementation (the myOutputDevice given to opal) has a Wrap method returning a BOOL, to know if we managed to hide the given object behind it.

Snark



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]