diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-01-07 14:46:14 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-01-07 14:46:14 +0100 |
commit | 87dd5139ff6666d64e7e343bcff632b342c4c814 (patch) | |
tree | c2b8f2f437a09e1ad2f740adc574f3f1833d8fe3 /transfer.c | |
parent | b4cab10eca558f6d90fa25a2a6e7fc3d90fac508 (diff) | |
download | vdr-87dd5139ff6666d64e7e343bcff632b342c4c814.tar.gz vdr-87dd5139ff6666d64e7e343bcff632b342c4c814.tar.bz2 |
CAM handling refactored; multiple recordings with one CAM; automatic CAM selection1.5.0
Diffstat (limited to 'transfer.c')
-rw-r--r-- | transfer.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: transfer.c 1.33 2006/01/29 17:24:39 kls Exp $ + * $Id: transfer.c 1.34 2007/01/07 14:45:28 kls Exp $ */ #include "transfer.h" @@ -14,8 +14,8 @@ // --- cTransfer ------------------------------------------------------------- -cTransfer::cTransfer(int VPid, const int *APids, const int *DPids, const int *SPids) -:cReceiver(0, -1, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids) +cTransfer::cTransfer(tChannelID ChannelID, int VPid, const int *APids, const int *DPids, const int *SPids) +:cReceiver(ChannelID, -1, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids) ,cThread("transfer") { ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer"); @@ -34,17 +34,18 @@ void cTransfer::Activate(bool On) { if (On) Start(); - else + else { Cancel(3); + cPlayer::Detach(); + } } void cTransfer::Receive(uchar *Data, int Length) { - if (IsAttached() && Running()) { + if (cPlayer::IsAttached() && Running()) { int p = ringBuffer->Put(Data, Length); if (p != Length && Running()) ringBuffer->ReportOverflow(Length - p); - return; } } @@ -110,8 +111,8 @@ void cTransfer::Action(void) cDevice *cTransferControl::receiverDevice = NULL; -cTransferControl::cTransferControl(cDevice *ReceiverDevice, int VPid, const int *APids, const int *DPids, const int *SPids) -:cControl(transfer = new cTransfer(VPid, APids, DPids, SPids), true) +cTransferControl::cTransferControl(cDevice *ReceiverDevice, tChannelID ChannelID, int VPid, const int *APids, const int *DPids, const int *SPids) +:cControl(transfer = new cTransfer(ChannelID, VPid, APids, DPids, SPids), true) { ReceiverDevice->AttachReceiver(transfer); receiverDevice = ReceiverDevice; |