mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Adds function to stop PIP.
This commit is contained in:
parent
1a744a8eb8
commit
59d1a6b1f2
@ -1476,6 +1476,8 @@ void cSoftReceiver::Receive(uchar * data, int size)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static cSoftReceiver * PipReceiver; ///< PIP receiver
|
||||
|
||||
/**
|
||||
** Prepare new PIP.
|
||||
*/
|
||||
@ -1490,13 +1492,28 @@ static void NewPip(void)
|
||||
&& (channel = Channels.GetByNumber(cDevice::CurrentChannel()))
|
||||
&& (device = cDevice::GetDevice(channel, 1, false))) {
|
||||
fprintf(stderr, "pip: %d %p %p\n", channel_nr, channel, device);
|
||||
|
||||
delete PipReceiver;
|
||||
PipReceiver = NULL;
|
||||
|
||||
device->SwitchChannel(channel, false);
|
||||
receiver = new cSoftReceiver(channel);
|
||||
device->AttachReceiver(receiver);
|
||||
fprintf(stderr, "pip: attached\n");
|
||||
PipReceiver = receiver;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Stop PIP.
|
||||
*/
|
||||
static void DelPip(void)
|
||||
{
|
||||
fprintf(stderr, "pip: stopped\n");
|
||||
delete PipReceiver;
|
||||
PipReceiver = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@ -1743,6 +1760,9 @@ eOSState cSoftHdMenu::ProcessKey(eKeys key)
|
||||
case osUser2:
|
||||
NewPip();
|
||||
return osEnd;
|
||||
case osUser8:
|
||||
DelPip();
|
||||
return osEnd;
|
||||
#endif
|
||||
default:
|
||||
Create();
|
||||
|
Loading…
Reference in New Issue
Block a user