El Martes, 21 de Febrero de 2006 21:14, Jukka Vaisanen escribi?: > Jose wrote: > >> In both cases I think if that card was already being used for a > > recording, > > >> that recording would get bumped off regardless of any priorities etc. > >> Smells ugly..? > > > >If a card is used for a recording, cDevice::GetDevice don't take it. > > But in the loop to find the device: > >> for (int i = 0; i < cDevice::NumDevices(); > > ++i) { > > >> cDevice *dev = cDevice::GetDevice(i); > >> if (dev->ProvidesChannel(current, 0) > > && dev != device) { newdev = dev; > > >> break; > >> } > > I don't see how GetDevice could not "take" a device being used for > recording since we're accessing it with an index number > 0..(NumDevices-1) and not asking by channel + priority. And if GetDevice > were to return NULL here for a device being used for recording, this > would segfault on the dev->ProvidesChannel(...) call. > > So I think it *will* grab the first device (by index) that a) can serve > this channel b) is not used for live tv. I refer to cDevice::GetDevice(Channel, Priority) And even if it is not recording and there is not another device free, then cServerConnection::GetDevice returns NULL. Jose alberto > > - Jukka Vaisanen > > _______________________________________________ > vdr mailing list > vdr@xxxxxxxxxxx > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr