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.
- Jukka Vaisanen
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@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
El Martes, 21 de Febrero de 2006 21:40, Jose Alberto Reguero escribió:
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
Also dev->ProvidesChannel don't take the thevice if it is recording. You can try it.
Jose Alberto
- Jukka Vaisanen
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr