Re: [GnomeMeeting-devel-list] Name update in the plugins
- From: PUYDT Julien <julien puydt laposte net>
- To: GnomeMeeting Devel Liste <gnomemeeting-devel-list gnome org>
- Subject: Re: [GnomeMeeting-devel-list] Name update in the plugins
- Date: Fri, 06 Feb 2004 15:52:11 +0100
On Fri, 2004-02-06 at 15:44, PUYDT Julien wrote:
> I'll try to translate my proposed fix in answer to that mail.
The list of devices is obtained through:
PStringList PVideoInputV4lDevice::GetInputDeviceNames()
{
return GetNames().GetInputDeviceNames();
}
where:
static
V4LNames & GetNames()
{
static V4LNames names;
return names;
}
and the list of names is created in the creation feature of V4LNames,
which as a static variable, is created only once!
How to fix that?
i) keep 'names' static, but make the creation call an 'update' function,
that is also called anytime 'names' has to be returned;
ii) at the beginning of 'update', save the dictionary that gives the
correspondance between devices names and user-friendly names, don't free
it!
iii) in 'update', if a device returns EBUSY on opening, look for its
userfriendly name in the old dictionay we saved for that!
iv) at the end of 'update', free the old dictionary.
Any taker?
Snark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]