1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed stopping subtitle display when switching the primary device

This commit is contained in:
Klaus Schmidinger 2010-01-01 15:15:36 +01:00
parent 39f1ba7e03
commit 491c6d0a85
7 changed files with 23 additions and 5 deletions

View File

@ -2255,6 +2255,7 @@ Anssi Hannula <anssi.hannula@gmail.com>
for suggesting to change the default for LOCDIR in Makefile and Make.config.template for suggesting to change the default for LOCDIR in Makefile and Make.config.template
to "./locale", so that internationalization works by default when running VDR to "./locale", so that internationalization works by default when running VDR
from within its source directory from within its source directory
for fixing stopping subtitle display when switching the primary device
Antti Hartikainen <ami+vdr@ah.fi> Antti Hartikainen <ami+vdr@ah.fi>
for updating 'S13E' in 'sources.conf' for updating 'S13E' in 'sources.conf'

View File

@ -6242,3 +6242,8 @@ Video Disk Recorder Revision History
capability. capability.
- Fixed handling the "CA PMT" generation (revised a change not mentioned in version - Fixed handling the "CA PMT" generation (revised a change not mentioned in version
1.7.9's changes, which caused a malfunction with Conax and Viaccess CAMs). 1.7.9's changes, which caused a malfunction with Conax and Viaccess CAMs).
- Fixed stopping subtitle display when switching the primary device (thanks to
Anssi Hannula).
IMPORTANT NOTE TO PLUGIN AUTHORS: a plugin that implements a derived cDevice
class that can replay video must now call the MakePrimaryDevice() function of
its base class.

View File

@ -4,3 +4,8 @@ VDR Plugin 'dvbsddevice' Revision History
2009-12-28: Version 0.0.1 2009-12-28: Version 0.0.1
- Initial revision. - Initial revision.
2010-01-01: Version 0.0.2
- Calling the MakePrimaryDevice() function of the base class to allow
the cDevice to stop displaying subtitles.

View File

@ -3,13 +3,13 @@
* *
* See the README file for copyright information and how to reach the author. * See the README file for copyright information and how to reach the author.
* *
* $Id: dvbsddevice.c 1.1 2009/12/31 15:36:00 kls Exp $ * $Id: dvbsddevice.c 1.2 2010/01/01 15:01:01 kls Exp $
*/ */
#include <vdr/plugin.h> #include <vdr/plugin.h>
#include "dvbsdffdevice.h" #include "dvbsdffdevice.h"
static const char *VERSION = "0.0.1"; static const char *VERSION = "0.0.2";
static const char *DESCRIPTION = "SD Full Featured DVB device"; static const char *DESCRIPTION = "SD Full Featured DVB device";
class cPluginDvbsddevice : public cPlugin { class cPluginDvbsddevice : public cPlugin {

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * See the README file for copyright information and how to reach the author.
* *
* $Id: dvbsdffdevice.c 2.23 2009/12/31 15:36:56 kls Exp $ * $Id: dvbsdffdevice.c 2.24 2010/01/01 15:03:02 kls Exp $
*/ */
#include "dvbsdffdevice.h" #include "dvbsdffdevice.h"
@ -82,6 +82,7 @@ void cDvbSdFfDevice::MakePrimaryDevice(bool On)
{ {
if (On) if (On)
new cDvbOsdProvider(fd_osd); new cDvbOsdProvider(fd_osd);
cDvbDevice::MakePrimaryDevice(On);
} }
bool cDvbSdFfDevice::HasDecoder(void) const bool cDvbSdFfDevice::HasDecoder(void) const

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: device.c 2.29 2009/12/25 15:24:02 kls Exp $ * $Id: device.c 2.30 2010/01/01 15:03:36 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -154,6 +154,10 @@ int cDevice::DeviceNumber(void) const
void cDevice::MakePrimaryDevice(bool On) void cDevice::MakePrimaryDevice(bool On)
{ {
if (!On) {
DELETENULL(liveSubtitle);
DELETENULL(dvbSubtitleConverter);
}
} }
bool cDevice::SetPrimaryDevice(int n) bool cDevice::SetPrimaryDevice(int n)

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: device.h 2.18 2009/12/25 15:09:18 kls Exp $ * $Id: device.h 2.19 2010/01/01 15:04:27 kls Exp $
*/ */
#ifndef __DEVICE_H #ifndef __DEVICE_H
@ -176,6 +176,8 @@ protected:
///< anything the device needs to set up when it becomes the primary ///< anything the device needs to set up when it becomes the primary
///< device (On = true) or to shut down when it no longer is the primary ///< device (On = true) or to shut down when it no longer is the primary
///< device (On = false), it should do so in this function. ///< device (On = false), it should do so in this function.
///< A derived class must call the MakePrimaryDevice() function of its
///< base class.
public: public:
bool IsPrimaryDevice(void) const { return this == primaryDevice; } bool IsPrimaryDevice(void) const { return this == primaryDevice; }
int CardIndex(void) const { return cardIndex; } int CardIndex(void) const { return cardIndex; }