diff options
author | Johns <johns98@gmx.net> | 2013-01-04 18:50:14 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2013-01-04 18:50:14 +0100 |
commit | 59d1a6b1f2a69e8f24279a00b38848f29ed92726 (patch) | |
tree | b60c3a4e6542a693e4de148094c7420885c4bf35 /softhddevice.cpp | |
parent | 1a744a8eb8bb5991c1073cf7b5884115c9659774 (diff) | |
download | vdr-plugin-softhddevice-59d1a6b1f2a69e8f24279a00b38848f29ed92726.tar.gz vdr-plugin-softhddevice-59d1a6b1f2a69e8f24279a00b38848f29ed92726.tar.bz2 |
Adds function to stop PIP.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r-- | softhddevice.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp index e1c4e31..f931f76 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -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(); |