Version 1.7.24

Original announce message:
VDR developer version 1.7.24 is now available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.24.tar.bz2

A 'diff' against the previous version is available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.23-1.7.24.diff

MD5 checksums:

a034c5e399417dfc583483f650d003ee  vdr-1.7.24.tar.bz2
aa1a2b202da92e65945ff39470b26618  vdr-1.7.23-1.7.24.diff

WARNING:
========

This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.

From the HISTORY file:
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed a high load in case a transponder can't be received.
- Improved the way DVB_API_VERSION is checked.
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed asserting there is a live programme if the primary device is bonded with
  a device that starts a recording on a different band.
- Fixed the return type of cMyDeviceHook::DeviceProvidesTransponder() in PLUGINS.html.
- Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss).
- Some improvements to the Makefiles (thanks to Christian Ruppert).
- Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full
  minutes (thanks to Christoph Haubrich).
- Symbolic links are no longer resolved in cRecordings::ScanVideoDir() (thanks to
  Sundararaj Reel).
- The epg.data file is now read in a separate thread to make the startup process
  faster in case the file is very large (suggested by Helmut Auer).
- Fixed selecting the primary device for receiving the live viewing channel in
  case it is bonded with an other device and has no receiver attached to it.
- Fixed a possible crash when canceling VDR while displaying subtitles, and the
  primary device is no longer available.
- Improved handling subtitles of BBC channels.
- No longer using tabs as delimiter in the EPG bugfix log (they were garbled in the
  log file).
- Added a missing '.' after the month in VPS strings.
- Added some missing 'const' to cDevice (thanks to Joachim Wilke).
- Fixed handling the PrimaryLimit when requesting a device for live viewing
  (reported by Uwe Scheffler).
- Removed superfluous calls to SetVideoFormat() from device constructors. This
  function is called in cDevice::SetPrimaryDevice(), anyway.
- An ongoing editing process is now canceled if either the original or the edited
  version of the recording is deleted from the Recordings menu.
- The SVDRP command DELR now won't delete a recording that is currently being edited.
- Removed code stub for obsolete SVDRP command MOVT.
- The DVB device adapters/frontends are now probed by scanning the /dev/dvb directory
  instead of looping through adapter/frontend numbers. This allows for "holes" in the
  device numbering.
- cReadDir::Next() now skips directory entries "." and "..".
- Fixed a possible deadlock in time shift mode.
- Fixed switching into time shift mode when pausing live video (thanks to Reinhard
  Nissl for helping to debug this one).
This commit is contained in:
Klaus Schmidinger 2012-02-19 14:54:00 +01:00 committed by Dieter Hametner
parent 59f0138a7d
commit c2d9577b3d
90 changed files with 1177 additions and 633 deletions

View File

@ -272,6 +272,8 @@ Uwe Scheffler <linux_dvb@uni.de>
for helping to test new DVB-T handling
for reporting a bug in switching the video format in the Setup/DVB menu
for reporting a problem with frozen live view in conjunction with device bonding
for reporting a problem in handling the PrimaryLimit when requesting a device for
live viewing
Matjaz Thaler <matjaz.thaler@guest.arnes.si>
for improving AC3 decoding when replaying DVDs
@ -604,6 +606,7 @@ Helmut Auer <vdr@helmutauer.de>
for a patch that was used to implement the command line options --edit and
--genindex
for suggesting to disable EPG processing for a while after a CLRE command
for suggesting to read the epg.data file in a separate thread
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
@ -680,6 +683,7 @@ Oliver Endriss <o.endriss@gmx.de>
for his input on calculating the Aspect factor in GetOsdSize()
for suggesting a better way of handling calls to realloc()
for making the cutter set the 'broken link' flag for MPEG2 TS recordings
for reporting a crash in a plugin using cDeviceHook when VDR ends
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'
@ -1125,6 +1129,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for adding support for DVB-T2 to libsi
for adding support for handling DVB-T2 transponders
for suggesting to add member functions Adapter() and Frontend() to cDvbDevice
for improving handling subtitles of BBC channels
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
@ -1293,6 +1298,7 @@ Reinhard Nissl <rnissl@gmx.de>
for making subtitle PIDs be decrypted
for making cEITScanner process new transponders before old ones, to make sure
transponder changes are recognized
for helping to debug switching into time shift mode when pausing live video
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
@ -1765,6 +1771,7 @@ Joachim Wilke <vdr@joachim-wilke.de>
for adding a missing 'const' to cRecording::FramesPerSecond()
for modifying cCharSetConv so that it can be used to convert from "whatever VDR uses"
to a given code
for adding some missing 'const' to cDevice
Sascha Klek <sklek@gmx.de>
for reporting a problem with the '0' key in the "Day" item of the "Timers" menu
@ -2267,6 +2274,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
index file
for fixing setting the start time of an edited recording
for adding support for HbbTV to libsi
for fixing cRecording::LengthInSeconds(), which wrongfully rounded the result to full
minutes
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
@ -2816,3 +2825,16 @@ Torsten Lang <info@torstenlang.de>
of EPG data from BSkyB's "MTV MUSIC"
for suggesting to make BIDI support check at runtime whether the system runs with
UTF-8
Christian Ruppert <idl0r@gentoo.org>
for some improvements to the Makefiles
Ralf Schueler <dl4mw@schueler.ws>
for backporting "Changed cDvbDevice::GrabImage() to use V4L" from version 1.7.3
to 1.6.0-3
for backporting "Added some missing 'const' keywords to avoid compilation errors
with gcc 4.4" from version 1.7.8 to 1.6.0-3
for backporting "Modified cSVDRP::CmdGRAB() to avoid writing into const data"
from version 1.7.8 to 1.6.0-3
for backporting "Fixed cRecordings::DelByName() to avoid compilation errors with
gcc 4.4" from version 1.7.9 to 1.6.0-3

53
HISTORY
View File

@ -6835,3 +6835,56 @@ Video Disk Recorder Revision History
progress display.
- Fixed frozen live view with device bonding in case the bonded master is used for
live viewing (reported by Uwe Scheffler).
2012-02-14: Version 1.6.0-3
- Changed cDvbDevice::GrabImage() to use V4L2
(backport from version 1.7.3, thanks to Ralf Schueler).
- Added some missing 'const' keywords to avoid compilation errors with gcc 4.4
(backport from version 1.7.8, thanks to Ralf Schueler).
- Modified cSVDRP::CmdGRAB() to avoid writing into const data
(backport from version 1.7.8, thanks to Ralf Schueler).
- Fixed cRecordings::DelByName() to avoid compilation errors with gcc 4.4
(backport from version 1.7.9, thanks to Ralf Schueler).
2012-02-19: Version 1.7.24
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed a high load in case a transponder can't be received.
- Improved the way DVB_API_VERSION is checked.
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed asserting there is a live programme if the primary device is bonded with
a device that starts a recording on a different band.
- Fixed the return type of cMyDeviceHook::DeviceProvidesTransponder() in PLUGINS.html.
- Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss).
- Some improvements to the Makefiles (thanks to Christian Ruppert).
- Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full
minutes (thanks to Christoph Haubrich).
- Symbolic links are no longer resolved in cRecordings::ScanVideoDir() (thanks to
Sundararaj Reel).
- The epg.data file is now read in a separate thread to make the startup process
faster in case the file is very large (suggested by Helmut Auer).
- Fixed selecting the primary device for receiving the live viewing channel in
case it is bonded with an other device and has no receiver attached to it.
- Fixed a possible crash when canceling VDR while displaying subtitles, and the
primary device is no longer available.
- Improved handling subtitles of BBC channels.
- No longer using tabs as delimiter in the EPG bugfix log (they were garbled in the
log file).
- Added a missing '.' after the month in VPS strings.
- Added some missing 'const' to cDevice (thanks to Joachim Wilke).
- Fixed handling the PrimaryLimit when requesting a device for live viewing
(reported by Uwe Scheffler).
- Removed superfluous calls to SetVideoFormat() from device constructors. This
function is called in cDevice::SetPrimaryDevice(), anyway.
- An ongoing editing process is now canceled if either the original or the edited
version of the recording is deleted from the Recordings menu.
- The SVDRP command DELR now won't delete a recording that is currently being edited.
- Removed code stub for obsolete SVDRP command MOVT.
- The DVB device adapters/frontends are now probed by scanning the /dev/dvb directory
instead of looping through adapter/frontend numbers. This allows for "holes" in the
device numbering.
- cReadDir::Next() now skips directory entries "." and "..".
- Fixed a possible deadlock in time shift mode.
- Fixed switching into time shift mode when pausing live video (thanks to Reinhard
Nissl for helping to debug this one).

View File

@ -304,7 +304,7 @@ multiple slashes).
Note that the file system need not be 64-bit proof, since the 'vdr'
program splits video files into chunks of about 2GB. You should use
a disk with several gigabytes of free space. One GB can store roughly
half an hour of video data.
half an hour of SD video data, or 10 minutes of HD video.
If you have more than one disk and don't want to combine them to form
one large logical volume, you can set up several video directories as

View File

@ -6,15 +6,15 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 2.4 2011/12/04 14:41:00 kls Exp $
# $Id: Make.config.template 2.5 2012/01/18 12:20:51 kls Exp $
### The C compiler and options:
CC = gcc
CFLAGS = -g -O3 -Wall
CC ?= gcc
CFLAGS ?= -g -O3 -Wall
CXX = g++
CXXFLAGS = -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
CXX ?= g++
CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
ifdef PLUGIN
CFLAGS += -fPIC
@ -23,23 +23,24 @@ endif
### The directory environment:
#DVBDIR = /usr/src/v4l-dvb/linux
MANDIR = /usr/local/man
BINDIR = /usr/local/bin
PREFIX ?= $(DESTDIR)/usr/local
#DVBDIR ?= /usr/src/v4l-dvb/linux
MANDIR ?= $(PREFIX)/man
BINDIR ?= $(PREFIX)/bin
LOCDIR = ./locale
PLUGINDIR= ./PLUGINS
PLUGINLIBDIR= $(PLUGINDIR)/lib
VIDEODIR = /video
CONFDIR = $(VIDEODIR)
LOCDIR ?= ./locale
PLUGINDIR ?= ./PLUGINS
PLUGINLIBDIR ?= $(PLUGINDIR)/lib
VIDEODIR ?= /video
CONFDIR ?= $(VIDEODIR)
### The remote control:
LIRC_DEVICE = /var/run/lirc/lircd
RCU_DEVICE = /dev/ttyS1
LIRC_DEVICE ?= /var/run/lirc/lircd
RCU_DEVICE ?= /dev/ttyS1
## Define if you want vdr to not run as root
#VDR_USER = vdr
#VDR_USER ?= vdr
### You don't need to touch the following:

View File

@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 2.23 2012/01/14 13:09:10 kls Exp $
# $Id: Makefile 2.24 2012/01/18 12:19:37 kls Exp $
.DELETE_ON_ERROR:
@ -17,10 +17,10 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
LSIDIR = ./libsi
DESTDIR ?=
PREFIX ?= /usr/local
MANDIR = $(PREFIX)/share/man
BINDIR = $(PREFIX)/bin
INCDIR = $(PREFIX)/include
LOCDIR = ./locale
MANDIR ?= $(PREFIX)/share/man
BINDIR ?= $(PREFIX)/bin
INCDIR ?= $(PREFIX)/include
LOCDIR ?= ./locale
LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig)
INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig)
@ -30,7 +30,7 @@ PLUGINLIBDIR= $(PLUGINDIR)/lib
VIDEODIR = /video
CONFDIR = $(VIDEODIR)
DOXYGEN = /usr/bin/doxygen
DOXYGEN ?= /usr/bin/doxygen
DOXYFILE = Doxyfile
PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(shell pkg-config --variable=pc_path pkg-config):$(PREFIX)/lib/pkgconfig))
@ -246,4 +246,3 @@ clean:
-rm -rf include
-rm -rf srcdoc
CLEAN: clean

View File

@ -1993,7 +1993,7 @@ whatever actions are necessary to determine whether the given Device can
provide the given Channel's transponder, as in
<p><table><tr><td class="code"><pre>
void cMyDeviceHook::DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const
bool cMyDeviceHook::DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const
{
if (<i>condition where Device can't provide Channel</i>)
return false;

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.9 2011/12/04 15:30:21 kls Exp $
# $Id: Makefile 1.12 2012/02/08 15:10:09 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@ -51,7 +51,7 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o bitbuffer.o dvbhdffdevice.o hdffcmd.o hdffosd.o setup.o
OBJS = $(PLUGIN).o dvbhdffdevice.o hdffcmd.o hdffosd.o menu.o setup.o
### The main target:

View File

@ -1,97 +0,0 @@
/*
* bitbuffer.c: TODO(short description)
*
* See the README file for copyright information and how to reach the author.
*
* $Id: bitbuffer.c 1.1 2009/12/29 14:29:20 kls Exp $
*/
#include "bitbuffer.h"
#include <stdlib.h>
cBitBuffer::cBitBuffer(uint32_t MaxLength)
{
mData = NULL;
mMaxLength = 0;
mBitPos = 0;
if (MaxLength <= 0x10000)
{
mData = new uint8_t[MaxLength];
if (mData)
{
mMaxLength = MaxLength * 8;
}
}
}
cBitBuffer::~cBitBuffer(void)
{
if (mData)
delete[] mData;
}
uint8_t * cBitBuffer::GetData(void)
{
return mData;
}
uint32_t cBitBuffer::GetMaxLength(void)
{
return mMaxLength / 8;
}
uint32_t cBitBuffer::GetBits(int NumBits)
{
return 0;
}
void cBitBuffer::SetBits(int NumBits, uint32_t Data)
{
uint32_t nextBitPos;
uint32_t bytePos;
uint32_t bitsInByte;
int shift;
if (NumBits <= 0 || NumBits > 32)
return;
nextBitPos = mBitPos + NumBits;
if (nextBitPos > mMaxLength)
return;
bytePos = mBitPos / 8;
bitsInByte = mBitPos % 8;
mData[bytePos] &= (uint8_t) (0xFF << (8 - bitsInByte));
shift = NumBits - (8 - bitsInByte);
if (shift > 0)
mData[bytePos] |= (uint8_t) (Data >> shift);
else
mData[bytePos] |= (uint8_t) (Data << (-shift));
NumBits -= 8 - bitsInByte;
bytePos++;
while (NumBits > 0)
{
shift = NumBits - 8;
if (shift > 0)
mData[bytePos] = (uint8_t) (Data >> shift);
else
mData[bytePos] = (uint8_t) (Data << (-shift));
NumBits -= 8;
bytePos++;
}
mBitPos = nextBitPos;
}
uint32_t cBitBuffer::GetByteLength(void)
{
return (mBitPos + 7) / 8;
}
void cBitBuffer::SetDataByte(uint32_t Position, uint8_t Data)
{
if (Position < mMaxLength)
mData[Position] = Data;
}

View File

@ -1,31 +0,0 @@
/*
* bitbuffer.h: TODO(short description)
*
* See the README file for copyright information and how to reach the author.
*
* $Id: bitbuffer.h 1.1 2009/12/29 14:27:03 kls Exp $
*/
#ifndef _HDFF_BITBUFFER_H_
#define _HDFF_BITBUFFER_H_
#include <stdint.h>
class cBitBuffer
{
private:
uint8_t * mData;
uint32_t mMaxLength;
uint32_t mBitPos;
public:
cBitBuffer(uint32_t MaxLength);
~cBitBuffer(void);
uint8_t * GetData(void);
uint32_t GetMaxLength(void);
uint32_t GetBits(int NumBits);
void SetBits(int NumBits, uint32_t Data);
uint32_t GetByteLength(void);
void SetDataByte(uint32_t Position, uint8_t Data);
};
#endif

View File

@ -3,29 +3,37 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbhddevice.c 1.14 2011/08/27 09:31:45 kls Exp $
* $Id: dvbhddevice.c 1.16 2012/02/08 15:10:30 kls Exp $
*/
#include <vdr/plugin.h>
#include <vdr/shutdown.h>
#include "dvbhdffdevice.h"
#include "menu.h"
#include "setup.h"
static const char *VERSION = "0.0.4";
static const char *DESCRIPTION = trNOOP("HD Full Featured DVB device");
static const char *MAINMENUENTRY = "dvbhddevice";
class cPluginDvbhddevice : public cPlugin {
private:
cDvbHdFfDeviceProbe *probe;
bool mIsUserInactive;
public:
cPluginDvbhddevice(void);
virtual ~cPluginDvbhddevice();
virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void) { return tr(DESCRIPTION); }
virtual void MainThreadHook(void);
virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
};
cPluginDvbhddevice::cPluginDvbhddevice(void)
: mIsUserInactive(true)
{
probe = new cDvbHdFfDeviceProbe;
}
@ -35,6 +43,33 @@ cPluginDvbhddevice::~cPluginDvbhddevice()
delete probe;
}
void cPluginDvbhddevice::MainThreadHook(void)
{
bool isUserInactive = ShutdownHandler.IsUserInactive();
if (isUserInactive != mIsUserInactive)
{
mIsUserInactive = isUserInactive;
if (gHdffSetup.CecEnabled && gHdffSetup.CecTvOn)
{
HDFF::cHdffCmdIf * hdffCmdIf = cDvbHdFfDevice::GetHdffCmdHandler();
if (!mIsUserInactive)
{
hdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON);
}
}
}
}
const char *cPluginDvbhddevice::MainMenuEntry(void)
{
return gHdffSetup.HideMainMenu ? NULL : MAINMENUENTRY;
}
cOsdObject *cPluginDvbhddevice::MainMenuAction(void)
{
return new cHdffMenu(cDvbHdFfDevice::GetHdffCmdHandler());
}
cMenuSetupPage *cPluginDvbhddevice::SetupMenu(void)
{
return new cHdffSetupPage(cDvbHdFfDevice::GetHdffCmdHandler());

View File

@ -3,9 +3,11 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbhdffdevice.c 1.35 2011/12/04 15:30:42 kls Exp $
* $Id: dvbhdffdevice.c 1.39 2012/02/15 13:14:49 kls Exp $
*/
#include <stdint.h>
#include "dvbhdffdevice.h"
#include <errno.h>
#include <limits.h>
@ -50,30 +52,34 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapter, int Frontend)
mHdffCmdIf->CmdAvSetAudioDownmix((HdffAudioDownmixMode_t) gHdffSetup.AudioDownmix);
mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) gHdffSetup.AnalogueVideo);
mHdffCmdIf->CmdHdmiSetVideoMode(gHdffSetup.GetVideoMode());
HdffHdmiConfig_t hdmiConfig;
memset(&hdmiConfig, 0, sizeof(hdmiConfig));
hdmiConfig.TransmitAudio = true;
hdmiConfig.ForceDviMode = false;
hdmiConfig.CecEnabled = gHdffSetup.CecEnabled;
strcpy(hdmiConfig.CecDeviceName, "VDR");
hdmiConfig.VideoModeAdaption = (HdffVideoModeAdaption_t) gHdffSetup.VideoModeAdaption;
mHdffCmdIf->CmdHdmiConfigure(&hdmiConfig);
if (gHdffSetup.CecEnabled)
mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON);
mHdffCmdIf->CmdRemoteSetProtocol((HdffRemoteProtocol_t) gHdffSetup.RemoteProtocol);
mHdffCmdIf->CmdRemoteSetAddressFilter(gHdffSetup.RemoteAddress >= 0, gHdffSetup.RemoteAddress);
}
// Video format:
SetVideoFormat(Setup.VideoFormat);
}
cDvbHdFfDevice::~cDvbHdFfDevice()
{
delete spuDecoder;
if (isHdffPrimary)
delete mHdffCmdIf;
// We're not explicitly closing any device files here, since this sometimes
// caused segfaults. Besides, the program is about to terminate anyway...
delete spuDecoder;
if (isHdffPrimary)
{
if (gHdffSetup.CecEnabled && gHdffSetup.CecTvOff)
{
mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_OFF);
}
delete mHdffCmdIf;
}
// We're not explicitly closing any device files here, since this sometimes
// caused segfaults. Besides, the program is about to terminate anyway...
}
void cDvbHdFfDevice::MakePrimaryDevice(bool On)

View File

@ -3,9 +3,11 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: hdffcmd.c 1.22 2011/12/04 15:31:03 kls Exp $
* $Id: hdffcmd.c 1.23 2012/02/06 11:08:48 kls Exp $
*/
#include <stdint.h>
#include "hdffcmd.h"
#include "libhdffcmd/hdffcmd.h"
#include <stdio.h>

View File

@ -3,13 +3,12 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: hdffcmd.h 1.18 2011/12/04 15:31:23 kls Exp $
* $Id: hdffcmd.h 1.19 2012/02/06 11:09:27 kls Exp $
*/
#ifndef _HDFF_CMD_H_
#define _HDFF_CMD_H_
#include "bitbuffer.h"
#include "libhdffcmd/hdffcmd.h"
namespace HDFF

View File

@ -4,17 +4,9 @@
VERSION = 0.1.0
ifndef $(INSTALL_PATH)
INSTALL_PATH=/usr/local
endif
ifndef $(INSTALL_LIB_PATH)
INSTALL_LIB_PATH=$(INSTALL_PATH)/lib
endif
ifndef $(INSTALL_INCLUDE_PATH)
INSTALL_INCLUDE_PATH=$(INSTALL_PATH)/include
endif
INSTALL_PATH ?= /usr/local
INSTALL_LIB_PATH ?= $(INSTALL_PATH)/lib
INSTALL_INCLUDE_PATH ?= $(INSTALL_PATH)/include
LIB_NAME = libhdffcmd
@ -27,9 +19,10 @@ LIB_HEADERS = hdffcmd.h hdffcmd_av.h hdffcmd_generic.h hdffcmd_hdmi.h \
LIB_STATIC = $(LIB_NAME).a
LIB_SHARED = $(LIB_NAME)-$(VERSION).so
CC = gcc
CFLAGS = -g -O2 -fPIC -Wall
AR = ar -r
CC ?= gcc
CFLAGS ?= -g -O2 -fPIC -Wall
AR ?= ar
ARFLAGS ?= r
### Implicit rules:
@ -50,10 +43,10 @@ $(DEPFILE): Makefile
all: $(LIB_STATIC) $(LIB_SHARED)
$(LIB_STATIC): $(LIB_OBJS)
$(AR) $(LIB_STATIC) $(LIB_OBJS)
$(AR) $(ARFLAGS) $(LIB_STATIC) $(LIB_OBJS)
$(LIB_SHARED): $(LIB_OBJS)
$(CC) -fPIC -shared -o $(LIB_SHARED) $(LIB_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $(LIB_SHARED) $(LIB_OBJS)
ln -sf $(LIB_SHARED) $(LIB_NAME).so
clean:

View File

@ -66,7 +66,8 @@ typedef enum HdffVideoConversion_t
HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9,
HDFF_VIDEO_CONVERSION_PILLARBOX,
HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT,
HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9
HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9,
HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9
} HdffVideoConversion_t;
typedef struct HdffVideoFormat_t

View File

@ -111,6 +111,7 @@ typedef enum HdffMessageId_t
HDFF_MSG_HDMI_GET_DISPLAY_INFO,
HDFF_MSG_HDMI_GET_VIDEO_MODE,
HDFF_MSG_HDMI_SEND_CEC_COMMAND,
HDFF_MSG_HDMI_SEND_RAW_CEC_COMMAND,
HDFF_MSG_REMOTE_SET_PROTOCOL = 0,
HDFF_MSG_REMOTE_SET_ADDRESS_FILTER,

View File

@ -48,9 +48,11 @@ int HdffCmdHdmiSetVideoMode(int OsdDevice, HdffVideoMode_t VideoMode)
int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config)
{
uint8_t cmdData[8];
uint8_t cmdData[24];
BitBuffer_t cmdBuf;
osd_raw_cmd_t osd_cmd;
size_t nameLen;
int i;
BitBuffer_Init(&cmdBuf, cmdData, sizeof(cmdData));
memset(&osd_cmd, 0, sizeof(osd_raw_cmd_t));
@ -61,6 +63,14 @@ int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config)
BitBuffer_SetBits(&cmdBuf, 1, Config->ForceDviMode ? 1 : 0);
BitBuffer_SetBits(&cmdBuf, 1, Config->CecEnabled ? 1 : 0);
BitBuffer_SetBits(&cmdBuf, 3, Config->VideoModeAdaption);
BitBuffer_SetBits(&cmdBuf, 6, 0); // reserved
nameLen = strlen(Config->CecDeviceName);
if (nameLen > 13)
nameLen = 13;
BitBuffer_SetBits(&cmdBuf, 4, nameLen);
for (i = 0; i < nameLen; i++)
BitBuffer_SetBits(&cmdBuf, 8, Config->CecDeviceName[i]);
osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf);
return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd);
}
@ -80,3 +90,31 @@ int HdffCmdHdmiSendCecCommand(int OsdDevice, HdffCecCommand_t Command)
osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf);
return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd);
}
int HdffCmdHdmiSendRawCecCommand(int OsdDevice, uint8_t Destination,
uint8_t Opcode, const uint8_t * Operand,
uint8_t OperandLength)
{
uint8_t cmdData[24];
BitBuffer_t cmdBuf;
osd_raw_cmd_t osd_cmd;
int i;
if (OperandLength > 14)
OperandLength = 14;
BitBuffer_Init(&cmdBuf, cmdData, sizeof(cmdData));
memset(&osd_cmd, 0, sizeof(osd_raw_cmd_t));
osd_cmd.cmd_data = cmdData;
HdffCmdBuildHeader(&cmdBuf, HDFF_MSG_TYPE_COMMAND, HDFF_MSG_GROUP_HDMI,
HDFF_MSG_HDMI_SEND_RAW_CEC_COMMAND);
BitBuffer_SetBits(&cmdBuf, 4, 0); // reserved
BitBuffer_SetBits(&cmdBuf, 4, Destination);
BitBuffer_SetBits(&cmdBuf, 8, Opcode);
BitBuffer_SetBits(&cmdBuf, 8, OperandLength);
for (i = 0; i < OperandLength; i++)
BitBuffer_SetBits(&cmdBuf, 8, Operand[i]);
osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf);
return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd);
}

View File

@ -47,14 +47,15 @@ typedef struct HdffHdmiConfig_t
int ForceDviMode;
int CecEnabled;
HdffVideoModeAdaption_t VideoModeAdaption;
char CecDeviceName[14];
} HdffHdmiConfig_t;
typedef enum HdffCecCommand_t
{
HDFF_CEC_COMMAND_TV_ON,
HDFF_CEC_COMMAND_TV_OFF,
HDFF_CEC_COMMAND_TV_ACTIVE_SOURCE,
HDFF_CEC_COMMAND_TV_INACTIVE_SOURCE
HDFF_CEC_COMMAND_ACTIVE_SOURCE,
HDFF_CEC_COMMAND_INACTIVE_SOURCE
} HdffCecCommand_t;
@ -64,4 +65,8 @@ int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config);
int HdffCmdHdmiSendCecCommand(int OsdDevice, HdffCecCommand_t Command);
int HdffCmdHdmiSendRawCecCommand(int OsdDevice, uint8_t Destination,
uint8_t Opcode, const uint8_t * Operand,
uint8_t OperandLength);
#endif /* HDFFCMD_HDMI_H */

View File

@ -0,0 +1,65 @@
/*
* menu.c: The DVB HD Full Featured device main menu
*
* See the README file for copyright information and how to reach the author.
*/
#include "menu.h"
#include "setup.h"
cHdffMenu::cHdffMenu(HDFF::cHdffCmdIf * pHdffCmdIf)
: cOsdMenu("dvbhddevice"),
mHdffCmdIf(pHdffCmdIf)
{
mVideoConversionItem = new cOsdItem("", osUnknown, false);
Add(mVideoConversionItem);
SetHelp(tr("Video Conversion"), tr("TV on"));
SetVideoConversion();
}
cHdffMenu::~cHdffMenu()
{
}
eOSState cHdffMenu::ProcessKey(eKeys key)
{
eOSState state = cOsdMenu::ProcessKey(key);
if (state == osUnknown)
{
switch (key)
{
case kRed:
gHdffSetup.SetNextVideoConversion();
SetVideoConversion();
break;
case kGreen:
mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON);
state = osEnd;
break;
case kOk:
state = osEnd;
break;
default:
break;
}
}
return state;
}
void cHdffMenu::SetVideoConversion(void)
{
HdffVideoFormat_t videoFormat;
videoFormat.AutomaticEnabled = true;
videoFormat.AfdEnabled = false;
videoFormat.TvFormat = (HdffTvFormat_t) gHdffSetup.TvFormat;
videoFormat.VideoConversion = (HdffVideoConversion_t) gHdffSetup.VideoConversion;
mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat);
char str[128];
sprintf(str, "%s: %s", tr("Video Conversion"), gHdffSetup.GetVideoConversionString());
mVideoConversionItem->SetText(str);
Display();
}

View File

@ -0,0 +1,29 @@
/*
* menu.h: The DVB HD Full Featured device main menu
*
* See the README file for copyright information and how to reach the author.
*/
#ifndef _HDFF_MENU_H_
#define _HDFF_MENU_H_
#include <vdr/osd.h>
#include <vdr/plugin.h>
#include "hdffcmd.h"
class cHdffMenu : public cOsdMenu
{
private:
HDFF::cHdffCmdIf * mHdffCmdIf;
cOsdItem * mVideoConversionItem;
void SetVideoConversion(void);
public:
cHdffMenu(HDFF::cHdffCmdIf * pHdffCmdIf);
virtual ~cHdffMenu();
virtual eOSState ProcessKey(eKeys Key);
};
#endif

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2011-08-21 14:02+0200\n"
"POT-Creation-Date: 2012-02-07 20:13+0100\n"
"PO-Revision-Date: 2011-04-25 21:44+0200\n"
"Last-Translator: Christoph Haubrich\n"
"Language-Team: <see README>\n"
@ -19,17 +19,11 @@ msgstr ""
msgid "HD Full Featured DVB device"
msgstr "HD Full Featured DVB device"
msgid "Off"
msgstr "aus"
msgid "Video Conversion"
msgstr "Bildanpassung"
msgid "Frame rate"
msgstr "passende Framerate"
msgid "HD Only"
msgstr "nur bei HD"
msgid "Always"
msgstr "immer"
msgid "TV on"
msgstr "TV ein"
msgid "Automatic"
msgstr "automatisch"
@ -49,11 +43,26 @@ msgstr "CentreCutOut"
msgid "Always 16/9"
msgstr "immer 16:9"
msgid "Zoom 16/9"
msgstr "Zoome 16:9"
msgid "Off"
msgstr "aus"
msgid "Frame rate"
msgstr "passende Framerate"
msgid "HD Only"
msgstr "nur bei HD"
msgid "Always"
msgstr "immer"
msgid "Disabled"
msgstr "abgeschaltet"
msgid "Analogue only"
msgstr "nur Analoge Ausgänge"
msgstr "nur analoge Ausgänge"
msgid "HDMI only"
msgstr "nur HDMI"
@ -73,9 +82,6 @@ msgstr "Auflösungsanpassung"
msgid "TV format"
msgstr "TV-Format"
msgid "Video Conversion"
msgstr "Videokonvertierung"
msgid "Analogue Video"
msgstr "Analoges Video"
@ -91,6 +97,12 @@ msgstr "OSD Größe"
msgid "HDMI CEC"
msgstr "HDMI CEC"
msgid "CEC: Switch TV on"
msgstr "CEC: TV einschalten"
msgid "CEC: Switch TV off"
msgstr "CEC: TV ausschalten"
msgid "Remote Control Protocol"
msgstr "Fernbedienungsprotokoll"
@ -102,3 +114,6 @@ msgstr "High Level OSD"
msgid "Allow True Color OSD"
msgstr "Erlaube True Color OSD"
msgid "Hide mainmenu entry"
msgstr "Hauptmenüeintrag verstecken"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2011-08-21 14:02+0200\n"
"POT-Creation-Date: 2012-02-07 20:13+0100\n"
"PO-Revision-Date: 2011-04-25 21:44+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@ -19,17 +19,11 @@ msgstr ""
msgid "HD Full Featured DVB device"
msgstr "DVB-laite HD-ulostulolla"
msgid "Off"
msgstr "ei"
msgid "Video Conversion"
msgstr "Näyttömuoto"
msgid "Frame rate"
msgstr "kuvataajuuden mukaan"
msgid "HD Only"
msgstr "vain HD-resoluutiolla"
msgid "Always"
msgstr "aina"
msgid "TV on"
msgstr ""
msgid "Automatic"
msgstr "automaattinen"
@ -49,6 +43,21 @@ msgstr "center cut out"
msgid "Always 16/9"
msgstr "aina 16:9"
msgid "Zoom 16/9"
msgstr ""
msgid "Off"
msgstr "ei"
msgid "Frame rate"
msgstr "kuvataajuuden mukaan"
msgid "HD Only"
msgstr "vain HD-resoluutiolla"
msgid "Always"
msgstr "aina"
msgid "Disabled"
msgstr "ei käytössä"
@ -73,9 +82,6 @@ msgstr "Sovita näyttömoodi"
msgid "TV format"
msgstr "Näytön kuvasuhde"
msgid "Video Conversion"
msgstr "Näyttömuoto"
msgid "Analogue Video"
msgstr "Analoginen kuvalähtö"
@ -91,6 +97,12 @@ msgstr "Kuvaruutunäytön koko"
msgid "HDMI CEC"
msgstr "Käytä HDMI CEC-toimintoa"
msgid "CEC: Switch TV on"
msgstr ""
msgid "CEC: Switch TV off"
msgstr ""
msgid "Remote Control Protocol"
msgstr "Kaukosäätimen protokolla"
@ -102,3 +114,6 @@ msgstr "Käytä korkean tason kuvaruutunäyttöä"
msgid "Allow True Color OSD"
msgstr "Salli tosivärit kuvaruutunäytölle"
msgid "Hide mainmenu entry"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2011-08-21 14:02+0200\n"
"POT-Creation-Date: 2012-02-07 20:13+0100\n"
"PO-Revision-Date: 2011-07-10 00:23+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <see README>\n"
@ -22,18 +22,12 @@ msgstr ""
msgid "HD Full Featured DVB device"
msgstr ""
msgid "Off"
msgstr ""
msgid "Video Conversion"
msgstr "Conversione video"
msgid "Frame rate"
msgid "TV on"
msgstr ""
msgid "HD Only"
msgstr ""
msgid "Always"
msgstr "Sempre"
msgid "Automatic"
msgstr "Automatica"
@ -52,6 +46,21 @@ msgstr "CentreCutOut"
msgid "Always 16/9"
msgstr "Sempre 16:9"
msgid "Zoom 16/9"
msgstr ""
msgid "Off"
msgstr ""
msgid "Frame rate"
msgstr ""
msgid "HD Only"
msgstr ""
msgid "Always"
msgstr "Sempre"
msgid "Disabled"
msgstr "Disabilitata"
@ -76,9 +85,6 @@ msgstr ""
msgid "TV format"
msgstr "Formato TV"
msgid "Video Conversion"
msgstr "Conversione video"
msgid "Analogue Video"
msgstr "Video analogico"
@ -94,6 +100,12 @@ msgstr "Dimensione OSD"
msgid "HDMI CEC"
msgstr "HDMI CEC"
msgid "CEC: Switch TV on"
msgstr ""
msgid "CEC: Switch TV off"
msgstr ""
msgid "Remote Control Protocol"
msgstr "Protocollo controllo remoto"
@ -105,3 +117,6 @@ msgstr "OSD alto livello"
msgid "Allow True Color OSD"
msgstr "Permetti OSD True Color"
msgid "Hide mainmenu entry"
msgstr ""

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: setup.c 1.14 2011/12/04 15:31:58 kls Exp $
* $Id: setup.c 1.17 2012/02/08 15:14:01 kls Exp $
*/
#include "setup.h"
@ -28,10 +28,13 @@ cHdffSetup::cHdffSetup(void)
AudioDownmix = HDFF_AUDIO_DOWNMIX_AUTOMATIC;
OsdSize = 0;
CecEnabled = 1;
CecTvOn = 1;
CecTvOff = 0;
RemoteProtocol = 1;
RemoteAddress = -1;
HighLevelOsd = 1;
TrueColorOsd = 1;
HideMainMenu = 0;
}
bool cHdffSetup::SetupParse(const char *Name, const char *Value)
@ -45,10 +48,13 @@ bool cHdffSetup::SetupParse(const char *Name, const char *Value)
else if (strcmp(Name, "AudioDownmix") == 0) AudioDownmix = atoi(Value);
else if (strcmp(Name, "OsdSize") == 0) OsdSize = atoi(Value);
else if (strcmp(Name, "CecEnabled") == 0) CecEnabled = atoi(Value);
else if (strcmp(Name, "CecTvOn") == 0) CecTvOn = atoi(Value);
else if (strcmp(Name, "CecTvOff") == 0) CecTvOff = atoi(Value);
else if (strcmp(Name, "RemoteProtocol") == 0) RemoteProtocol = atoi(Value);
else if (strcmp(Name, "RemoteAddress") == 0) RemoteAddress = atoi(Value);
else if (strcmp(Name, "HighLevelOsd") == 0) HighLevelOsd = atoi(Value);
else if (strcmp(Name, "TrueColorOsd") == 0) TrueColorOsd = atoi(Value);
else if (strcmp(Name, "HideMainMenu") == 0) HideMainMenu = atoi(Value);
else return false;
return true;
}
@ -112,12 +118,74 @@ HdffVideoMode_t cHdffSetup::GetVideoMode(void)
}
}
void cHdffSetup::SetNextVideoConversion(void)
{
int nextVideoConversion = HDFF_VIDEO_CONVERSION_AUTOMATIC;
if (TvFormat == HDFF_TV_FORMAT_16_BY_9)
{
switch (VideoConversion)
{
case HDFF_VIDEO_CONVERSION_PILLARBOX:
nextVideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT;
break;
case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT:
nextVideoConversion = HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9;
break;
case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9:
nextVideoConversion = HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9;
break;
case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9:
nextVideoConversion = HDFF_VIDEO_CONVERSION_PILLARBOX;
break;
}
}
else
{
switch (VideoConversion)
{
case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9:
nextVideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9;
break;
case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9:
nextVideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT;
break;
case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT:
nextVideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9;
break;
}
}
VideoConversion = nextVideoConversion;
}
const char * cHdffSetup::GetVideoConversionString(void)
{
switch (VideoConversion)
{
case HDFF_VIDEO_CONVERSION_AUTOMATIC:
default:
return tr("Automatic");
case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9:
return tr("Letterbox 16/9");
case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9:
return tr("Letterbox 14/9");
case HDFF_VIDEO_CONVERSION_PILLARBOX:
return tr("Pillarbox");
case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT:
return tr("CentreCutOut");
case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9:
return tr("Always 16/9");
case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9:
return tr("Zoom 16/9");
}
}
cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf)
{
const int kResolutions = 4;
const int kVideoModeAdaptions = 4;
const int kTvFormats = 2;
const int kVideoConversions = 6;
const int kAnalogueVideos = 4;
const int kAudioDownmixes = 5;
const int kOsdSizes = 5;
@ -145,17 +213,6 @@ cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf)
"16/9",
};
static const char * VideoConversionItems[kVideoConversions] =
{
tr("Automatic"),
tr("Letterbox 16/9"),
tr("Letterbox 14/9"),
tr("Pillarbox"),
tr("CentreCutOut"),
tr("Always 16/9"),
};
static const char * AnalogueVideoItems[kAnalogueVideos] =
{
tr("Disabled"),
@ -194,25 +251,133 @@ cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf)
Add(new cMenuEditStraItem(tr("Resolution"), &mNewHdffSetup.Resolution, kResolutions, ResolutionItems));
Add(new cMenuEditStraItem(tr("Video Mode Adaption"), &mNewHdffSetup.VideoModeAdaption, kVideoModeAdaptions, VideoModeAdaptionItems));
Add(new cMenuEditStraItem(tr("TV format"), &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems));
Add(new cMenuEditStraItem(tr("Video Conversion"), &mNewHdffSetup.VideoConversion, kVideoConversions, VideoConversionItems));
mTvFormatItem = new cMenuEditStraItem(tr("TV format"), &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems);
Add(mTvFormatItem);
Add(new cMenuEditStraItem(tr("Analogue Video"), &mNewHdffSetup.AnalogueVideo, kAnalogueVideos, AnalogueVideoItems));
Add(new cMenuEditIntItem(tr("Audio Delay (ms)"), &mNewHdffSetup.AudioDelay, 0, 500));
Add(new cMenuEditStraItem(tr("Audio Downmix"), &mNewHdffSetup.AudioDownmix, kAudioDownmixes, AudioDownmixItems));
Add(new cMenuEditStraItem(tr("OSD Size"), &mNewHdffSetup.OsdSize, kOsdSizes, OsdSizeItems));
Add(new cMenuEditBoolItem(tr("HDMI CEC"), &mNewHdffSetup.CecEnabled));
Add(new cMenuEditBoolItem(tr("CEC: Switch TV on"), &mNewHdffSetup.CecTvOn));
Add(new cMenuEditBoolItem(tr("CEC: Switch TV off"), &mNewHdffSetup.CecTvOff));
Add(new cMenuEditStraItem(tr("Remote Control Protocol"), &mNewHdffSetup.RemoteProtocol, kRemoteProtocols, RemoteProtocolItems));
Add(new cMenuEditIntItem(tr("Remote Control Address"), &mNewHdffSetup.RemoteAddress, -1, 31));
Add(new cMenuEditBoolItem(tr("High Level OSD"), &mNewHdffSetup.HighLevelOsd));
Add(new cMenuEditBoolItem(tr("Allow True Color OSD"), &mNewHdffSetup.TrueColorOsd));
Add(new cMenuEditBoolItem(tr("Hide mainmenu entry"), &mNewHdffSetup.HideMainMenu));
mVideoConversion = 0;
if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9)
{
switch (mNewHdffSetup.VideoConversion)
{
case HDFF_VIDEO_CONVERSION_PILLARBOX:
mVideoConversion = 0;
break;
case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT:
mVideoConversion = 1;
break;
case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9:
mVideoConversion = 2;
break;
case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9:
mVideoConversion = 3;
break;
}
}
else
{
switch (mNewHdffSetup.VideoConversion)
{
case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9:
mVideoConversion = 0;
break;
case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9:
mVideoConversion = 1;
break;
case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT:
mVideoConversion = 2;
break;
}
}
BuildVideoConversionItem();
}
cHdffSetupPage::~cHdffSetupPage(void)
{
}
void cHdffSetupPage::BuildVideoConversionItem(void)
{
const int kVideoConversions4by3 = 3;
const int kVideoConversions16by9 = 4;
static const char * VideoConversionItems4by3[kVideoConversions4by3] =
{
tr("Letterbox 16/9"),
tr("Letterbox 14/9"),
tr("CentreCutOut")
};
static const char * VideoConversionItems16by9[kVideoConversions16by9] =
{
tr("Pillarbox"),
tr("CentreCutOut"),
tr("Always 16/9"),
tr("Zoom 16/9")
};
cOsdItem * item;
cList<cOsdItem>::Del(mTvFormatItem->Next());
if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9)
{
item = new cMenuEditStraItem(tr("Video Conversion"), &mVideoConversion,
kVideoConversions16by9, VideoConversionItems16by9);
}
else
{
item = new cMenuEditStraItem(tr("Video Conversion"), &mVideoConversion,
kVideoConversions4by3, VideoConversionItems4by3);
}
Add(item, false, mTvFormatItem);
}
void cHdffSetupPage::Store(void)
{
if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9)
{
switch (mVideoConversion)
{
case 0:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_PILLARBOX;
break;
case 1:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT;
break;
case 2:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9;
break;
case 3:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9;
break;
}
}
else
{
switch (mVideoConversion)
{
case 0:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9;
break;
case 1:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9;
break;
case 2:
mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT;
break;
}
}
SetupStore("Resolution", mNewHdffSetup.Resolution);
SetupStore("VideoModeAdaption", mNewHdffSetup.VideoModeAdaption);
SetupStore("TvFormat", mNewHdffSetup.TvFormat);
@ -222,10 +387,13 @@ void cHdffSetupPage::Store(void)
SetupStore("AudioDownmix", mNewHdffSetup.AudioDownmix);
SetupStore("OsdSize", mNewHdffSetup.OsdSize);
SetupStore("CecEnabled", mNewHdffSetup.CecEnabled);
SetupStore("CecTvOn", mNewHdffSetup.CecTvOn);
SetupStore("CecTvOff", mNewHdffSetup.CecTvOff);
SetupStore("RemoteProtocol", mNewHdffSetup.RemoteProtocol);
SetupStore("RemoteAddress", mNewHdffSetup.RemoteAddress);
SetupStore("HighLevelOsd", mNewHdffSetup.HighLevelOsd);
SetupStore("TrueColorOsd", mNewHdffSetup.TrueColorOsd);
SetupStore("HideMainMenu", mNewHdffSetup.HideMainMenu);
if (mHdffCmdIf)
{
@ -237,7 +405,7 @@ void cHdffSetupPage::Store(void)
HdffHdmiConfig_t hdmiConfig;
videoFormat.AutomaticEnabled = true;
videoFormat.AfdEnabled = true;
videoFormat.AfdEnabled = false;
videoFormat.TvFormat = (HdffTvFormat_t) mNewHdffSetup.TvFormat;
videoFormat.VideoConversion = (HdffVideoConversion_t) mNewHdffSetup.VideoConversion;
mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat);
@ -247,6 +415,7 @@ void cHdffSetupPage::Store(void)
mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) mNewHdffSetup.AnalogueVideo);
memset(&hdmiConfig, 0, sizeof(hdmiConfig));
hdmiConfig.TransmitAudio = true;
hdmiConfig.ForceDviMode = false;
hdmiConfig.CecEnabled = mNewHdffSetup.CecEnabled;
@ -259,3 +428,29 @@ void cHdffSetupPage::Store(void)
gHdffSetup = mNewHdffSetup;
}
eOSState cHdffSetupPage::ProcessKey(eKeys key)
{
eOSState state = cMenuSetupPage::ProcessKey(key);
if (state == osContinue)
{
cOsdItem * item;
switch (key)
{
case kLeft:
case kRight:
item = Get(Current());
if (item == mTvFormatItem)
{
mVideoConversion = 0;
BuildVideoConversionItem();
Display();
}
break;
default:
break;
}
}
return state;
}

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: setup.h 1.10 2011/12/04 15:32:13 kls Exp $
* $Id: setup.h 1.12 2012/02/08 15:14:56 kls Exp $
*/
#ifndef _HDFF_SETUP_H_
@ -18,6 +18,8 @@ struct cHdffSetup
bool SetupParse(const char * Name, const char * Value);
void GetOsdSize(int &Width, int &Height, double &PixelAspect);
HdffVideoMode_t GetVideoMode(void);
void SetNextVideoConversion(void);
const char * GetVideoConversionString(void);
int Resolution;
int VideoModeAdaption;
@ -28,11 +30,15 @@ struct cHdffSetup
int AudioDownmix;
int OsdSize;
int CecEnabled;
int CecTvOn;
int CecTvOff;
int RemoteProtocol;
int RemoteAddress;
int HighLevelOsd;
int TrueColorOsd;
int HideMainMenu;
};
extern cHdffSetup gHdffSetup;
@ -42,6 +48,10 @@ class cHdffSetupPage : public cMenuSetupPage
private:
HDFF::cHdffCmdIf * mHdffCmdIf;
cHdffSetup mNewHdffSetup;
cOsdItem * mTvFormatItem;
int mVideoConversion;
void BuildVideoConversionItem(void);
protected:
virtual void Store(void);
@ -49,6 +59,7 @@ protected:
public:
cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf);
virtual ~cHdffSetupPage(void);
virtual eOSState ProcessKey(eKeys Key);
};
#endif

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.7 2011/05/21 12:25:37 kls Exp $
# $Id: Makefile 1.8 2012/01/18 12:28:43 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbsdffdevice.c 2.30 2011/08/27 11:33:57 kls Exp $
* $Id: dvbsdffdevice.c 2.31 2012/02/15 13:15:05 kls Exp $
*/
#include "dvbsdffdevice.h"
@ -66,10 +66,6 @@ cDvbSdFfDevice::cDvbSdFfDevice(int Adapter, int Frontend, bool OutputOnly)
fclose(f);
}
devVideoIndex = devVideoOffset >= 0 ? devVideoOffset++ : -1;
// Video format:
SetVideoFormat(Setup.VideoFormat);
}
cDvbSdFfDevice::~cDvbSdFfDevice()

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.7 2011/05/21 12:25:41 kls Exp $
# $Id: Makefile 2.8 2012/01/18 12:29:09 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.3 2011/02/27 10:05:01 kls Exp $
# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so
# Dependencies:
MAKEDEP = g++ -MM -MG
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@

View File

@ -63,3 +63,7 @@ VDR Plugin 'pictures' Revision History
2012-01-08:
- Added option -o to pic2mpg.
2012-02-17:
- cReadDir::Next() now skips directory entries "." and "..".

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.7 2011/05/21 12:25:45 kls Exp $
# $Id: Makefile 2.8 2012/01/18 12:30:05 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: entry.c 2.0 2008/02/17 13:42:34 kls Exp $
* $Id: entry.c 2.1 2012/02/17 14:00:28 kls Exp $
*/
#include "entry.h"
@ -48,13 +48,11 @@ void cPictureEntry::Load(void) const
if (d.Ok()) {
struct dirent *e;
while ((e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
struct stat ds;
if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
if (!entries)
entries = new cList<cPictureEntry>;
entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode)));
}
struct stat ds;
if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
if (!entries)
entries = new cList<cPictureEntry>;
entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode)));
}
}
if (entries)

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: pictures.c 2.3 2011/02/20 16:50:01 kls Exp $
* $Id: pictures.c 2.4 2012/02/17 14:00:48 kls Exp $
*/
#include <getopt.h>
@ -11,7 +11,7 @@
#include "menu.h"
#include "player.h"
static const char *VERSION = "0.1.0";
static const char *VERSION = "0.1.1";
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
static const char *MAINMENUENTRY = trNOOP("Pictures");

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.3 2011/02/27 10:05:04 kls Exp $
# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@ -64,7 +64,7 @@ all: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so
# Dependencies:
MAKEDEP = g++ -MM -MG
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.7 2011/05/21 12:25:49 kls Exp $
# $Id: Makefile 2.8 2012/01/18 12:30:52 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.3 2011/02/27 10:05:08 kls Exp $
# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so
# Dependencies:
MAKEDEP = g++ -MM -MG
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@

View File

@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 2.3 2011/02/27 10:05:10 kls Exp $
# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 2.39 2012/01/14 13:03:53 kls Exp $
* $Id: config.h 2.40 2012/01/16 09:50:03 kls Exp $
*/
#ifndef __CONFIG_H
@ -22,13 +22,13 @@
// VDR's own version number:
#define VDRVERSION "1.7.23"
#define VDRVERSNUM 10723 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.7.24"
#define VDRVERSNUM 10724 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
#define APIVERSION "1.7.23"
#define APIVERSNUM 10723 // Version * 10000 + Major * 100 + Minor
#define APIVERSION "1.7.24"
#define APIVERSNUM 10724 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to

View File

@ -4,10 +4,11 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: cutter.c 2.10 2011/12/04 12:55:53 kls Exp $
* $Id: cutter.c 2.11 2012/02/16 12:08:39 kls Exp $
*/
#include "cutter.h"
#include "menu.h"
#include "recording.h"
#include "remux.h"
#include "videodir.h"
@ -197,7 +198,8 @@ void cCuttingThread::Action(void)
// --- cCutter ---------------------------------------------------------------
cMutex cCutter::mutex;
char *cCutter::editedVersionName = NULL;
cString cCutter::originalVersionName;
cString cCutter::editedVersionName;
cCuttingThread *cCutter::cuttingThread = NULL;
bool cCutter::error = false;
bool cCutter::ended = false;
@ -208,6 +210,7 @@ bool cCutter::Start(const char *FileName)
if (!cuttingThread) {
error = false;
ended = false;
originalVersionName = FileName;
cRecording Recording(FileName);
cMarks FromMarks;
@ -229,7 +232,7 @@ bool cCutter::Start(const char *FileName)
}
free(s);
// XXX
editedVersionName = strdup(evn);
editedVersionName = evn;
Recording.WriteInfo();
Recordings.AddByName(editedVersionName, false);
cuttingThread = new cCuttingThread(FileName, editedVersionName);
@ -246,27 +249,29 @@ void cCutter::Stop(void)
const char *Error = cuttingThread ? cuttingThread->Error() : NULL;
delete cuttingThread;
cuttingThread = NULL;
if ((Interrupted || Error) && editedVersionName) {
if ((Interrupted || Error) && *editedVersionName) {
if (Interrupted)
isyslog("editing process has been interrupted");
if (Error)
esyslog("ERROR: '%s' during editing process", Error);
RemoveVideoFile(editedVersionName); //XXX what if this file is currently being replayed?
if (cReplayControl::NowReplaying() && strcmp(cReplayControl::NowReplaying(), editedVersionName) == 0)
cControl::Shutdown();
RemoveVideoFile(editedVersionName);
Recordings.DelByName(editedVersionName);
}
}
bool cCutter::Active(void)
bool cCutter::Active(const char *FileName)
{
cMutexLock MutexLock(&mutex);
if (cuttingThread) {
if (cuttingThread->Active())
return true;
return !FileName || strcmp(FileName, originalVersionName) == 0 || strcmp(FileName, editedVersionName) == 0;
error = cuttingThread->Error();
Stop();
if (!error)
cRecordingUserCommand::InvokeCommand(RUC_EDITEDRECORDING, editedVersionName);
free(editedVersionName);
originalVersionName = NULL;
editedVersionName = NULL;
ended = true;
}

View File

@ -4,27 +4,32 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: cutter.h 2.2 2010/08/29 13:32:33 kls Exp $
* $Id: cutter.h 2.3 2012/02/16 12:05:33 kls Exp $
*/
#ifndef __CUTTER_H
#define __CUTTER_H
#include "thread.h"
#include "tools.h"
class cCuttingThread;
class cCutter {
private:
static cMutex mutex;
static char *editedVersionName;
static cString originalVersionName;
static cString editedVersionName;
static cCuttingThread *cuttingThread;
static bool error;
static bool ended;
public:
static bool Start(const char *FileName);
static void Stop(void);
static bool Active(void);
static bool Active(const char *FileName = NULL);
///< Returns true if the cutter is currently active.
///< If a FileName is given, true is only returned if either the
///< original or the edited file name is equal to FileName.
static bool Error(void);
static bool Ended(void);
};

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 2.44 2011/10/16 14:36:43 kls Exp $
* $Id: device.c 2.49 2012/02/15 13:15:19 kls Exp $
*/
#include "device.h"
@ -41,7 +41,8 @@ cLiveSubtitle::~cLiveSubtitle()
void cLiveSubtitle::Receive(uchar *Data, int Length)
{
cDevice::PrimaryDevice()->PlayTs(Data, Length);
if (cDevice::PrimaryDevice())
cDevice::PrimaryDevice()->PlayTs(Data, Length);
}
// --- cDeviceHook -----------------------------------------------------------
@ -81,8 +82,6 @@ cDevice::cDevice(void)
SetDescription("receiver on device %d", CardIndex() + 1);
SetVideoFormat(Setup.VideoFormat);
mute = false;
volume = Setup.CurrentVolume;
@ -270,7 +269,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true))
continue; // CAM slot can't be used with this device
bool ndr;
if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job
if (device[i]->ProvidesChannel(Channel, (LiveView && device[i]->IsPrimaryDevice()) ? Setup.PrimaryLimit : Priority, &ndr)) { // this device is basicly able to do the job
if (NumUsableSlots && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
ndr = true; // using a different CAM slot requires detaching receivers
// Put together an integer number that reflects the "impact" using
@ -335,6 +334,7 @@ void cDevice::SetCamSlot(cCamSlot *CamSlot)
void cDevice::Shutdown(void)
{
deviceHooks.Clear();
primaryDevice = NULL;
for (int i = 0; i < numDevices; i++) {
delete device[i];
@ -531,6 +531,14 @@ bool cDevice::SetPid(cPidHandle *Handle, int Type, bool On)
return false;
}
void cDevice::DelLivePids(void)
{
for (int i = ptAudio; i < ptOther; i++) {
if (pidHandles[i].pid)
DelPid(pidHandles[i].pid, ePidType(i));
}
}
void cDevice::StartSectionHandler(void)
{
if (!sectionHandler) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.h 2.30 2011/12/04 13:38:17 kls Exp $
* $Id: device.h 2.33 2012/02/14 14:42:42 kls Exp $
*/
#ifndef __DEVICE_H
@ -354,6 +354,9 @@ protected:
///< Handle->used indicates how many receivers are using this PID.
///< Type indicates some special types of PIDs, which the device may
///< need to set in a specific way.
public:
void DelLivePids(void);
///< Deletes the live viewing PIDs.
// Section filter facilities
@ -436,14 +439,14 @@ public:
///< Returns the video system of the currently displayed material
///< (default is PAL).
virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect);
///< Returns the With, Height and VideoAspect ratio of the currently
///< Returns the Width, Height and VideoAspect ratio of the currently
///< displayed video material. Width and Height are given in pixel
///< (e.g. 720x576) and VideoAspect is e.g. 1.33333 for a 4:3 broadcast,
///< or 1.77778 for 16:9.
///< The default implementation returns 0 for Width and Height
///< and 1.0 for VideoAspect.
virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect);
///< Returns the With, Height and PixelAspect ratio the OSD should use
///< Returns the Width, Height and PixelAspect ratio the OSD should use
///< to best fit the resolution of the output device. If PixelAspect
///< is not 1.0, the OSD may take this as a hint to scale its
///< graphics in a way that, e.g., a circle will actually
@ -495,11 +498,11 @@ public:
///< is more than one audio track.
int NumSubtitleTracks(void) const;
///< Returns the number of subtitle tracks that are currently available.
eTrackType GetCurrentAudioTrack(void) { return currentAudioTrack; }
eTrackType GetCurrentAudioTrack(void) const { return currentAudioTrack; }
bool SetCurrentAudioTrack(eTrackType Type);
///< Sets the current audio track to the given Type.
///< \return Returns true if Type is a valid audio track, false otherwise.
eTrackType GetCurrentSubtitleTrack(void) { return currentSubtitleTrack; }
eTrackType GetCurrentSubtitleTrack(void) const { return currentSubtitleTrack; }
bool SetCurrentSubtitleTrack(eTrackType Type, bool Manual = false);
///< Sets the current subtitle track to the given Type.
///< IF Manual is true, no automatic preferred subtitle language selection

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 2.56 2012/01/15 14:31:47 kls Exp $
* $Id: dvbdevice.c 2.62 2012/02/17 12:20:34 kls Exp $
*/
#include "dvbdevice.h"
@ -502,6 +502,8 @@ void cDvbTuner::SetChannel(const cChannel *Channel)
tunerStatus = tsIdle;
ResetToneAndVoltage();
}
if (bondedTuner && device->IsPrimaryDevice())
cDevice::PrimaryDevice()->DelLivePids(); // 'device' is const, so we must do it this way
}
bool cDvbTuner::Locked(int TimeoutMs)
@ -857,6 +859,7 @@ void cDvbTuner::Action(void)
if (GetFrontendStatus(NewStatus))
Status = NewStatus;
cMutexLock MutexLock(&mutex);
int WaitTime = 1000;
switch (tunerStatus) {
case tsIdle:
break;
@ -877,6 +880,7 @@ void cDvbTuner::Action(void)
bondedMasterFailed = true; // give an other tuner a chance in case the sat cable was disconnected
continue;
}
WaitTime = 100; // allows for a quick change from tsTuned to tsLocked
case tsLocked:
if (Status & FE_REINIT) {
tunerStatus = tsSet;
@ -905,9 +909,7 @@ void cDvbTuner::Action(void)
break;
default: esyslog("ERROR: unknown tuner status %d", tunerStatus);
}
if (tunerStatus != tsTuned)
newSet.TimedWait(mutex, 1000);
newSet.TimedWait(mutex, WaitTime);
}
}
@ -1006,6 +1008,7 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend)
numModulations = 0;
bondedDevice = NULL;
needsDetachBondedReceivers = false;
tsBuffer = NULL;
// Devices that are present on all card types:
@ -1045,7 +1048,7 @@ cDvbDevice::~cDvbDevice()
cString cDvbDevice::DvbName(const char *Name, int Adapter, int Frontend)
{
return cString::sprintf("%s%d/%s%d", DEV_DVB_ADAPTER, Adapter, Name, Frontend);
return cString::sprintf("%s/%s%d/%s%d", DEV_DVB_BASE, DEV_DVB_ADAPTER, Adapter, Name, Frontend);
}
int cDvbDevice::DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError)
@ -1093,28 +1096,47 @@ bool cDvbDevice::Initialize(void)
new cDvbSourceParam('C', "DVB-C");
new cDvbSourceParam('S', "DVB-S");
new cDvbSourceParam('T', "DVB-T");
cStringList Nodes;
cReadDir DvbDir(DEV_DVB_BASE);
if (DvbDir.Ok()) {
struct dirent *a;
while ((a = DvbDir.Next()) != NULL) {
if (strstr(a->d_name, DEV_DVB_ADAPTER) == a->d_name) {
int Adapter = strtol(a->d_name + strlen(DEV_DVB_ADAPTER), NULL, 10);
cReadDir AdapterDir(AddDirectory(DEV_DVB_BASE, a->d_name));
if (AdapterDir.Ok()) {
struct dirent *f;
while ((f = AdapterDir.Next()) != NULL) {
if (strstr(f->d_name, DEV_DVB_FRONTEND) == f->d_name) {
int Frontend = strtol(f->d_name + strlen(DEV_DVB_FRONTEND), NULL, 10);
Nodes.Append(strdup(cString::sprintf("%2d %2d", Adapter, Frontend)));
}
}
}
}
}
}
int Checked = 0;
int Found = 0;
for (int Adapter = 0; ; Adapter++) {
for (int Frontend = 0; ; Frontend++) {
if (Exists(Adapter, Frontend)) {
if (Checked++ < MAXDVBDEVICES) {
if (UseDevice(NextCardIndex())) {
if (Probe(Adapter, Frontend))
Found++;
}
else
NextCardIndex(1); // skips this one
}
}
else if (Frontend == 0)
goto LastAdapter;
else
goto NextAdapter;
}
NextAdapter: ;
}
LastAdapter:
if (Nodes.Size() > 0) {
Nodes.Sort();
for (int i = 0; i < Nodes.Size(); i++) {
int Adapter;
int Frontend;
if (2 == sscanf(Nodes[i], "%d %d", &Adapter, &Frontend)) {
if (Exists(Adapter, Frontend)) {
if (Checked++ < MAXDVBDEVICES) {
if (UseDevice(NextCardIndex())) {
if (Probe(Adapter, Frontend))
Found++;
}
else
NextCardIndex(1); // skips this one
}
}
}
}
}
NextCardIndex(MAXDVBDEVICES - Checked); // skips the rest
if (Found > 0)
isyslog("found %d DVB device%s", Found, Found > 1 ? "s" : "");
@ -1130,7 +1152,7 @@ bool cDvbDevice::QueryDeliverySystems(int fd_frontend)
LOG_ERROR;
return false;
}
#if DVB_API_VERSION > 5 || DVB_API_VERSION_MINOR >= 5
#if (DVB_API_VERSION << 8 | DVB_API_VERSION_MINOR) >= 0x0505
dtv_property Frontend[1];
memset(&Frontend, 0, sizeof(Frontend));
dtv_properties CmdSeq;
@ -1440,7 +1462,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
}
else
needsDetachReceivers = true;
needsDetachReceivers = Receiving(true);
}
if (result) {
if (!BondingOk(Channel)) {
@ -1452,7 +1474,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
}
}
needsDetachBondedReceivers = true;
needsDetachReceivers = true;
needsDetachReceivers = Receiving(true);
}
}
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.h 2.21 2012/01/13 11:32:45 kls Exp $
* $Id: dvbdevice.h 2.23 2012/02/17 11:18:55 kls Exp $
*/
#ifndef __DVBDEVICE_H
@ -14,7 +14,7 @@
#include <linux/dvb/version.h>
#include "device.h"
#if DVB_API_VERSION < 5 || (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 3)
#if (DVB_API_VERSION << 8 | DVB_API_VERSION_MINOR) < 0x0503
#error VDR requires Linux DVB driver API version 5.3 or higher!
#endif
@ -22,7 +22,8 @@
#define MAXDELIVERYSYSTEMS 8
#define DEV_VIDEO "/dev/video"
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
#define DEV_DVB_BASE "/dev/dvb"
#define DEV_DVB_ADAPTER "adapter"
#define DEV_DVB_OSD "osd"
#define DEV_DVB_FRONTEND "frontend"
#define DEV_DVB_DVR "dvr"

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 2.21 2010/03/07 14:24:26 kls Exp $
* $Id: dvbplayer.c 2.23 2012/02/19 10:48:02 kls Exp $
*/
#include "dvbplayer.h"
@ -87,6 +87,7 @@ class cNonBlockingFileReader : public cThread {
private:
cUnbufferedFile *f;
uchar *buffer;
uchar *result;
int wanted;
int length;
cCondWait newSet;
@ -100,7 +101,7 @@ public:
void Clear(void);
void Request(cUnbufferedFile *File, int Length);
int Result(uchar **Buffer);
bool Reading(void) { return buffer; }
bool Reading(void) { return result; }
bool WaitForDataMs(int msToWait);
};
@ -109,6 +110,7 @@ cNonBlockingFileReader::cNonBlockingFileReader(void)
{
f = NULL;
buffer = NULL;
result = NULL;
wanted = length = 0;
Start();
}
@ -118,6 +120,7 @@ cNonBlockingFileReader::~cNonBlockingFileReader()
newSet.Signal();
Cancel(3);
free(buffer);
free(result);
}
void cNonBlockingFileReader::Clear(void)
@ -126,6 +129,8 @@ void cNonBlockingFileReader::Clear(void)
f = NULL;
free(buffer);
buffer = NULL;
free(result);
result = NULL;
wanted = length = 0;
Unlock();
}
@ -137,18 +142,18 @@ void cNonBlockingFileReader::Request(cUnbufferedFile *File, int Length)
wanted = Length;
buffer = MALLOC(uchar, wanted);
f = File;
Unlock();
newSet.Signal();
Unlock();
}
int cNonBlockingFileReader::Result(uchar **Buffer)
{
LOCK_THREAD;
if (buffer && length == wanted) {
*Buffer = buffer;
buffer = NULL;
if (result && length == wanted) {
*Buffer = result;
result = NULL;
return wanted;
}
}
errno = EAGAIN;
return -1;
}
@ -172,6 +177,8 @@ void cNonBlockingFileReader::Action(void)
length = wanted = r; // this will forward the error status to the caller
}
if (length == wanted) {
result = buffer;
buffer = NULL;
cMutexLock NewDataLock(&newDataMutex);
newDataCond.Broadcast();
}
@ -183,9 +190,9 @@ void cNonBlockingFileReader::Action(void)
bool cNonBlockingFileReader::WaitForDataMs(int msToWait)
{
cMutexLock NewDataLock(&newDataMutex);
if (buffer && length == wanted)
if (result && length == wanted)
return true;
cMutexLock NewDataLock(&newDataMutex);
return newDataCond.TimedWait(newDataMutex, msToWait);
}
@ -209,6 +216,7 @@ private:
cUnbufferedFile *replayFile;
double framesPerSecond;
bool isPesRecording;
bool pauseLive;
bool eof;
bool firstPacket;
ePlayModes playMode;
@ -228,7 +236,7 @@ protected:
virtual void Activate(bool On);
virtual void Action(void);
public:
cDvbPlayer(const char *FileName);
cDvbPlayer(const char *FileName, bool PauseLive);
virtual ~cDvbPlayer();
bool Active(void) { return cThread::Running(); }
void Pause(void);
@ -249,7 +257,7 @@ public:
#define SPEED_MULT 12 // the speed multiplier
int cDvbPlayer::Speeds[] = { 0, -2, -4, -8, 1, 2, 4, 12, 0 };
cDvbPlayer::cDvbPlayer(const char *FileName)
cDvbPlayer::cDvbPlayer(const char *FileName, bool PauseLive)
:cThread("dvbplayer")
{
nonBlockingFileReader = NULL;
@ -258,6 +266,7 @@ cDvbPlayer::cDvbPlayer(const char *FileName)
cRecording Recording(FileName);
framesPerSecond = Recording.FramesPerSecond();
isPesRecording = Recording.IsPesRecording();
pauseLive = PauseLive;
eof = false;
firstPacket = true;
playMode = pmPlay;
@ -275,7 +284,7 @@ cDvbPlayer::cDvbPlayer(const char *FileName)
return;
ringBuffer = new cRingBufferFrame(PLAYERBUFSIZE);
// Create the index file:
index = new cIndexFile(FileName, false, isPesRecording);
index = new cIndexFile(FileName, false, isPesRecording, pauseLive);
if (!index)
esyslog("ERROR: can't allocate index");
else if (!index->Ok()) {
@ -400,15 +409,17 @@ void cDvbPlayer::Action(void)
int LastReadIFrame = -1;
int SwitchToPlayFrame = 0;
if (pauseLive)
Goto(0, true);
while (Running()) {
if (WaitingForData)
nonBlockingFileReader->WaitForDataMs(3); // this keeps the CPU load low, but reacts immediately on new data
nonBlockingFileReader->WaitForDataMs(10); // this keeps the CPU load low, but reacts immediately on new data
else if (Sleep) {
cPoller Poller;
DevicePoll(Poller, 10);
Sleep = false;
if (playMode == pmStill || playMode==pmPause)
cCondWait::SleepMs(3);
if (playMode == pmStill || playMode == pmPause)
cCondWait::SleepMs(10);
}
{
LOCK_THREAD;
@ -470,7 +481,15 @@ void cDvbPlayer::Action(void)
}
if (!eof) {
uchar *b = NULL;
int r = nonBlockingFileReader->Result(&b);
int Retries = 5;
int r;
while (true) {
r = nonBlockingFileReader->Result(&b);
if (r == -1 && errno == EAGAIN && --Retries)
nonBlockingFileReader->WaitForDataMs(10);
else
break;
}
if (r > 0) {
WaitingForData = false;
uint32_t Pts = 0;
@ -821,8 +840,8 @@ bool cDvbPlayer::GetReplayMode(bool &Play, bool &Forward, int &Speed)
// --- cDvbPlayerControl -----------------------------------------------------
cDvbPlayerControl::cDvbPlayerControl(const char *FileName)
:cControl(player = new cDvbPlayer(FileName))
cDvbPlayerControl::cDvbPlayerControl(const char *FileName, bool PauseLive)
:cControl(player = new cDvbPlayer(FileName, PauseLive))
{
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.h 2.0 2002/06/23 10:13:51 kls Exp $
* $Id: dvbplayer.h 2.1 2012/02/19 11:40:36 kls Exp $
*/
#ifndef __DVBPLAYER_H
@ -19,8 +19,11 @@ class cDvbPlayerControl : public cControl {
private:
cDvbPlayer *player;
public:
cDvbPlayerControl(const char *FileName);
cDvbPlayerControl(const char *FileName, bool PauseLive = false);
// Sets up a player for the given file.
// If PauseLive is true, special care is taken to make sure the index
// file of the recording is long enough to allow the player to display
// the first frame in still picture mode.
virtual ~cDvbPlayerControl();
bool Active(void);
void Stop(void);

View File

@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
* $Id: dvbsubtitle.c 2.21 2012/01/11 10:34:07 kls Exp $
* $Id: dvbsubtitle.c 2.22 2012/02/13 09:48:18 kls Exp $
*/
@ -620,7 +620,7 @@ void cDvbSubtitlePage::SetState(int State)
case 0: // normal case - page update
dbgpages("page update\n");
break;
case 1: // aquisition point - page refresh
case 1: // acquisition point - page refresh
dbgpages("page refresh\n");
regions.Clear();
break;
@ -1049,7 +1049,6 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
page->SetVersion(pageVersion);
page->SetTimeout(pageTimeout);
page->SetState(bs.GetBits(2));
page->regions.Clear();
bs.SkipBits(2); // reserved
dbgpages("Update page id %d version %d pts %"PRId64" timeout %d state %d\n", pageId, page->Version(), page->Pts(), page->Timeout(), page->State());
while (!bs.IsEOF()) {

35
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
* $Id: epg.c 2.9 2012/01/12 14:31:46 kls Exp $
* $Id: epg.c 2.11 2012/02/13 14:58:19 kls Exp $
*/
#include "epg.h"
@ -424,7 +424,7 @@ cString cEvent::GetVpsString(void) const
{
char buf[25];
struct tm tm_r;
strftime(buf, sizeof(buf), "%d.%m %R", localtime_r(&vps, &tm_r));
strftime(buf, sizeof(buf), "%d.%m. %R", localtime_r(&vps, &tm_r));
return buf;
}
@ -587,7 +587,7 @@ void ReportEpgBugFixStats(bool Reset)
bool GotHits = false;
char buffer[1024];
for (int i = 0; i < MAXEPGBUGFIXSTATS; i++) {
const char *delim = "\t";
const char *delim = " ";
tEpgBugFixStats *p = &EpgBugFixStats[i];
if (p->hits) {
bool PrintedStats = false;
@ -604,11 +604,11 @@ void ReportEpgBugFixStats(bool Reset)
dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEvent::FixEpgBugs()");
dsyslog("IN VDR/epg.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!");
dsyslog("=====================");
dsyslog("Fix\tHits\tChannels");
dsyslog("Fix Hits Channels");
GotHits = true;
}
if (!PrintedStats) {
q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
q += snprintf(q, sizeof(buffer) - (q - buffer), "%-3d %-4d", i, p->hits);
PrintedStats = true;
}
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name());
@ -1029,15 +1029,10 @@ void cSchedule::Cleanup(void)
void cSchedule::Cleanup(time_t Time)
{
cEvent *Event = events.First();
while (Event) {
if (Event->HasTimer())
Event = (cEvent *)Event->Next();
else if (Event->EndTime() + Setup.EPGLinger * 60 + 3600 < Time) { // adding one hour for safety
cEvent *e = Event;
Event = (cEvent *)Event->Next();
DelEvent(e);
}
cEvent *Event;
while ((Event = events.First()) != NULL) {
if (!Event->HasTimer() && Event->EndTime() + Setup.EPGLinger * 60 + 3600 < Time) // adding one hour for safety
DelEvent(Event);
else
break;
}
@ -1289,3 +1284,15 @@ const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMiss
}
return Channel->schedule != &DummySchedule? Channel->schedule : NULL;
}
// --- cEpgDataReader --------------------------------------------------------
cEpgDataReader::cEpgDataReader(void)
:cThread("epg data reader")
{
}
void cEpgDataReader::Action(void)
{
cSchedules::Read();
}

8
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
* $Id: epg.h 2.5 2011/02/25 14:14:38 kls Exp $
* $Id: epg.h 2.6 2012/02/11 12:29:55 kls Exp $
*/
#ifndef __EPG_H
@ -213,6 +213,12 @@ public:
const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const;
};
class cEpgDataReader : public cThread {
public:
cEpgDataReader(void);
virtual void Action(void);
};
void ReportEpgBugFixStats(bool Reset = false);
#endif //__EPG_H

View File

@ -1,15 +1,15 @@
#
# Makefile for a libsi
#
# $Id: Makefile 2.2 2011/12/04 14:18:38 kls Exp $
# $Id: Makefile 2.3 2012/01/18 12:31:40 kls Exp $
### The C++ compiler and options:
CXX ?= g++
CXXFLAGS ?= -O2 -g -Wall -Woverloaded-virtual
AR = ar
ARFLAGS = ru
RANLIB = ranlib
AR ?= ar
ARFLAGS ?= ru
RANLIB ?= ranlib
include ../Make.global
-include ../Make.config

23
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 2.35 2012/01/14 13:06:03 kls Exp $
* $Id: menu.c 2.37 2012/02/19 11:37:55 kls Exp $
*/
#include "menu.h"
@ -2383,9 +2383,19 @@ eOSState cMenuRecordings::Delete(void)
}
cRecording *recording = GetRecording(ri);
if (recording) {
if (cCutter::Active(ri->FileName())) {
if (Interface->Confirm(tr("Recording is being edited - really delete?"))) {
cCutter::Stop();
recording = Recordings.GetByName(ri->FileName()); // cCutter::Stop() might have deleted it if it was the edited version
// we continue with the code below even if recording is NULL,
// in order to have the menu updated etc.
}
else
return osContinue;
}
if (cReplayControl::NowReplaying() && strcmp(cReplayControl::NowReplaying(), ri->FileName()) == 0)
cControl::Shutdown();
if (recording->Delete()) {
if (!recording || recording->Delete()) {
cReplayControl::ClearLastReplayed(ri->FileName());
Recordings.DelByName(ri->FileName());
cOsdMenu::Del(Current());
@ -4319,13 +4329,10 @@ bool cRecordControls::PauseLiveVideo(void)
Skins.Message(mtStatus, tr("Pausing live video..."));
cReplayControl::SetRecording(NULL, NULL); // make sure the new cRecordControl will set cReplayControl::LastReplayed()
if (Start(NULL, true)) {
cCondWait::SleepMs(2000); // allow recorded file to fill up enough to start replaying
cReplayControl *rc = new cReplayControl;
cReplayControl *rc = new cReplayControl(true);
cControl::Launch(rc);
cControl::Attach();
cCondWait::SleepMs(1000); // allow device to replay some frames, so we have a picture
Skins.Message(mtStatus, NULL);
rc->ProcessKey(kPause); // pause, allowing replay mode display
return true;
}
Skins.Message(mtStatus, NULL);
@ -4415,8 +4422,8 @@ cReplayControl *cReplayControl::currentReplayControl = NULL;
char *cReplayControl::fileName = NULL;
char *cReplayControl::title = NULL;
cReplayControl::cReplayControl(void)
:cDvbPlayerControl(fileName)
cReplayControl::cReplayControl(bool PauseLive)
:cDvbPlayerControl(fileName, PauseLive)
{
currentReplayControl = this;
displayReplay = NULL;

4
menu.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.h 2.3 2010/03/06 16:15:59 kls Exp $
* $Id: menu.h 2.4 2012/02/19 10:51:56 kls Exp $
*/
#ifndef __MENU_H
@ -276,7 +276,7 @@ private:
void EditCut(void);
void EditTest(void);
public:
cReplayControl(void);
cReplayControl(bool PauseLive = false);
virtual ~cReplayControl();
void Stop(void);
virtual cOsdObject *GetInfo(void);

View File

@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: newplugin 2.6 2011/02/27 10:06:06 kls Exp $
# $Id: newplugin 2.7 2012/01/18 12:32:31 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@ -81,9 +81,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-10-16 11:16-0400\n"
"Last-Translator: Osama Alrawab <alrawab@hotmail.com>\n"
"Language-Team: Arabic <ar@li.org>\n"
@ -756,6 +756,9 @@ msgstr "حدث خطاء عند محاولة الوصول لتسجيلات"
msgid "Delete recording?"
msgstr "حذف التسجيل"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "حدث خطاء عند محاولة حذف التسجيل"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-03-02 19:02+0100\n"
"Last-Translator: Luca Olivetti <luca@ventoso.org>\n"
"Language-Team: Catalan <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "Error a l'accedir a la gravaci
msgid "Delete recording?"
msgstr "Esborrar gravació?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Error a l'esborrar la gravació!"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.14\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-05-06 11:00+0200\n"
"Last-Translator: Radek Šťastný <dedkus@gmail.com>\n"
"Language-Team: Czech <vdr@linuxtv.org>\n"
@ -746,6 +746,9 @@ msgstr "Chyba při přístupu k nahrávkám!"
msgid "Delete recording?"
msgstr "Smazat nahrávku?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Chyba při mazání nahrávky!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Mogens Elneff <mogens@elneff.dk>\n"
"Language-Team: Danish <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Fejl ved l
msgid "Delete recording?"
msgstr "Slet optagelse?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Fejl ved sletning af optagelse!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-01-16 16:46+0100\n"
"Last-Translator: Klaus Schmidinger <kls@tvdr.de>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Fehler beim Ansprechen der Aufzeichnung!"
msgid "Delete recording?"
msgstr "Aufzeichnung löschen?"
msgid "Recording is being edited - really delete?"
msgstr "Aufzeichnung wird geschnitten - trotzdem löschen?"
msgid "Error while deleting recording!"
msgstr "Fehler beim Löschen der Aufzeichnung!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Dimitrios Dimitrakos <mail@dimitrios.de>\n"
"Language-Team: Greek <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "
msgid "Delete recording?"
msgstr "ÄéáãñáöÞ åããñáöÞò?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "ËÜèïò êáôÜ ôÞí äéáãñáöÞ ôïõ áñ÷åßïõ!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-03-02 19:02+0100\n"
"Last-Translator: Luca Olivetti <luca@ventoso.org>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "
msgid "Delete recording?"
msgstr "¿Eliminar grabacion?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "¡Error al borrar la grabación!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Arthur Konovalov <artlov@gmail.com>\n"
"Language-Team: Estonian <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Salvestuse taasesitus nurjus!"
msgid "Delete recording?"
msgstr "Kustutada salvestus?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Salvestuse kustutamine nurjus!"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2007-08-15 15:52+0200\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "Tallenteen toistaminen epäonnistui!"
msgid "Delete recording?"
msgstr "Poistetaanko tallenne?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Tallenteen poistaminen epäonnistui!"
@ -1084,7 +1087,7 @@ msgid "Setup.Replay$Show replay mode"
msgstr "Näytä toiston tila"
msgid "Setup.Replay$Show remaining time"
msgstr ""
msgstr "Näytä jäljellä oleva aika"
msgid "Setup.Replay$Resume ID"
msgstr "Tallenteen paluutunniste"

View File

@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-02-27 18:14+0100\n"
"Last-Translator: Jean-Claude Repetto <jc@repetto.org>\n"
"Language-Team: French <vdr@linuxtv.org>\n"
@ -750,6 +750,9 @@ msgstr "Impossible d'acc
msgid "Delete recording?"
msgstr "Supprimer l'enregistrement ?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Erreur de suppression de l'enregistrement !"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-03-17 19:00+0100\n"
"Last-Translator: Adrian Caval <anrxc@sysphere.org>\n"
"Language-Team: Croatian <vdr@linuxtv.org>\n"
@ -746,6 +746,9 @@ msgstr "Gre
msgid "Delete recording?"
msgstr "Obrisati snimku?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Gre¹ka pri brisanju snimke!"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2012-01-02 11:54+0200\n"
"Last-Translator: István Füley <ifuley@tigercomp.ro>\n"
"Language-Team: Hungarian <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "Hiba a felv
msgid "Delete recording?"
msgstr "Felvétel törlése?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Hiba a felvétel törlésénél!"

View File

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"PO-Revision-Date: 2010-06-13 00:30+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2012-01-15 19:11+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr@linuxtv.org>\n"
"Language: it\n"
@ -81,7 +81,7 @@ msgid "Rolloff"
msgstr "Rolloff"
msgid "PlpId"
msgstr ""
msgstr "PlpId"
msgid "Starting EPG scan"
msgstr "Inizio scansione EPG"
@ -751,6 +751,9 @@ msgstr "Errore accesso alla registrazione!"
msgid "Delete recording?"
msgstr "Eliminare la registrazione?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Errore eliminazione registrazione!"
@ -974,10 +977,10 @@ msgstr "Freq HI LNB (MHz)"
#, c-format
msgid "Setup.LNB$Device %d connected to sat cable"
msgstr ""
msgstr "Periferica %d connessa al cavo sat"
msgid "Setup.LNB$own"
msgstr ""
msgstr "propria"
msgid "CAM reset"
msgstr "Reimposta la CAM"
@ -1088,7 +1091,7 @@ msgid "Setup.Replay$Show replay mode"
msgstr "Mostra modalità riproduzione"
msgid "Setup.Replay$Show remaining time"
msgstr ""
msgstr "Mostra tempo rimanente"
msgid "Setup.Replay$Resume ID"
msgstr "ID di ripristino"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.16\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-10-30 11:55+0200\n"
"Last-Translator: Valdemaras Pipiras <varas@ambernet.lt>\n"
"Language-Team: Lithuanian <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Klaida atidarant įrašą!"
msgid "Delete recording?"
msgstr "Ištrinti įrašą?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Klaida trinant įrašą!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR-1.7.14\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-03-11 00:54+0100\n"
"Last-Translator: Dimitar Petrovski <dimeptr@gmail.com>\n"
"Language-Team: Macedonian <en@li.org>\n"
@ -745,6 +745,9 @@ msgstr "Грешка при пристап до снимката!"
msgid "Delete recording?"
msgstr "Избриши снимка?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Грешка при бришење на снимката!"

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-02-26 17:20+0100\n"
"Last-Translator: Johan Schuring <johan.schuring@vetteblei.nl>\n"
"Language-Team: Dutch <vdr@linuxtv.org>\n"
@ -748,6 +748,9 @@ msgstr "Fout bij lezen opname!"
msgid "Delete recording?"
msgstr "Opname verwijderen?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Fout bij verwijderen opname!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Truls Slevigen <truls@slevigen.no>\n"
"Language-Team: Norwegian Nynorsk <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "Feil under lesing av opptak!"
msgid "Delete recording?"
msgstr "Slette opptak?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Feil under sletting av opptak!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-03-09 12:59+0100\n"
"Last-Translator: Michael Rakowski <mrak@gmx.de>\n"
"Language-Team: Polish <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "Bl
msgid "Delete recording?"
msgstr "Usun±æ nagranie?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Bl±d podczas usuwania nagrania!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.15\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-03-28 22:49+0100\n"
"Last-Translator: Cris Silva <hudokkow@gmail.com>\n"
"Language-Team: Portuguese <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "Erro a aceder
msgid "Delete recording?"
msgstr "Eliminar gravação?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Erro a eliminar gravação!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.12\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2011-03-10 23:52+0100\n"
"Last-Translator: Lucian Muresan <lucianm@users.sourceforge.net>\n"
"Language-Team: Romanian <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "Eroare la accesarea
msgid "Delete recording?"
msgstr "ªterg înregistrarea?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Eroare la ºtergerea înregistrãrii!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-12-15 14:37+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: Russian <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "
msgid "Delete recording?"
msgstr "ÁâÕàÕâì ×ÐßØáì?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "¾èØÑÚÐ ãÔÐÛÕÝØï ×ÐßØáØ!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.16\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2011-02-15 16:29+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: Slovak <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Chyba pri pr
msgid "Delete recording?"
msgstr "Zmaza» nahrávku?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Pri vymazávaní nahrávky pri¹lo k chybe!"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-02-28 19:44+0100\n"
"Last-Translator: Matjaz Thaler <matjaz.thaler@guest.arnes.si>\n"
"Language-Team: Slovenian <vdr@linuxtv.org>\n"
@ -745,6 +745,9 @@ msgstr "Napaka pri dostopu do posnetka!"
msgid "Delete recording?"
msgstr "Izbri¹i posnetek?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Napaka pri brisanju posnetka!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.1\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2011-01-09 15:57+0100\n"
"Last-Translator: Milan Cvijanoviæ <elcom_cvijo@hotmail.com>\n"
"Language-Team: Serbian <vdr@linuxtv.org>\n"
@ -753,6 +753,9 @@ msgstr "Gre
msgid "Delete recording?"
msgstr "Obri¹i snimku?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Gre¹ka prilikom brisanja snimke!"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-03-12 18:25+0100\n"
"Last-Translator: Magnus Andersson <svankan@bahnhof.se>\n"
"Language-Team: Swedish <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "Inspelningen g
msgid "Delete recording?"
msgstr "Ta bort inspelningen?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Inspelningen går inte att ta bort!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2008-02-28 00:33+0100\n"
"Last-Translator: Oktay Yolgeçen <oktay_73@yahoo.de>\n"
"Language-Team: Turkish <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Kay
msgid "Delete recording?"
msgstr "Kayýtý sil?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Kayýt silme hatasý!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.7.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2010-04-25 16:35+0200\n"
"Last-Translator: Yarema aka Knedlyk <yupadmin@gmail.com>\n"
"Language-Team: Ukrainian <vdr@linuxtv.org>\n"
@ -744,6 +744,9 @@ msgstr "Помилка доступу до запису!"
msgid "Delete recording?"
msgstr "Витерти запис?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "Помилка видалення запису!"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.6.0\n"
"Report-Msgid-Bugs-To: <vdr-bugs@tvdr.de>\n"
"POT-Creation-Date: 2012-01-14 14:06+0100\n"
"POT-Creation-Date: 2012-02-16 13:18+0100\n"
"PO-Revision-Date: 2009-09-23 23:50+0800\n"
"Last-Translator: Nan Feng <nfgx@21cn.com>\n"
"Language-Team: Chinese (simplified) <vdr@linuxtv.org>\n"
@ -747,6 +747,9 @@ msgstr "存取录像错误!"
msgid "Delete recording?"
msgstr "是否删除录像?"
msgid "Recording is being edited - really delete?"
msgstr ""
msgid "Error while deleting recording!"
msgstr "删除录像错误!"

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 2.43 2012/01/15 11:04:24 kls Exp $
* $Id: recording.c 2.50 2012/02/19 10:44:45 kls Exp $
*/
#include "recording.h"
@ -875,11 +875,11 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) cons
s = name;
cString Length("");
if (NewIndicator) {
int Seconds = max(0, LengthInSeconds());
int Minutes = max(0, (LengthInSeconds() + 30) / 60);
Length = cString::sprintf("%c%d:%02d",
Delimiter,
Seconds / 3600,
Seconds / 60 % 60
Minutes / 60,
Minutes % 60
);
}
titleBuffer = strdup(cString::sprintf("%02d.%02d.%02d%c%02d:%02d%s%c%c%s",
@ -1059,7 +1059,7 @@ int cRecording::LengthInSeconds(void) const
{
int nf = NumFrames();
if (nf >= 0)
return int((nf / FramesPerSecond() + 30) / 60) * 60;
return int(nf / FramesPerSecond());
return -1;
}
@ -1109,43 +1109,38 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
cReadDir d(DirName);
struct dirent *e;
while ((Foreground || Running()) && (e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
cString buffer = AddDirectory(DirName, e->d_name);
struct stat st;
if (lstat(buffer, &st) == 0) {
int Link = 0;
if (S_ISLNK(st.st_mode)) {
if (LinkLevel > MAX_LINK_LEVEL) {
isyslog("max link level exceeded - not scanning %s", *buffer);
continue;
}
Link = 1;
buffer = ReadLink(buffer);
if (!*buffer)
continue;
if (stat(buffer, &st) != 0)
continue;
cString buffer = AddDirectory(DirName, e->d_name);
struct stat st;
if (lstat(buffer, &st) == 0) {
int Link = 0;
if (S_ISLNK(st.st_mode)) {
if (LinkLevel > MAX_LINK_LEVEL) {
isyslog("max link level exceeded - not scanning %s", *buffer);
continue;
}
if (S_ISDIR(st.st_mode)) {
if (endswith(buffer, deleted ? DELEXT : RECEXT)) {
cRecording *r = new cRecording(buffer);
if (r->Name()) {
r->NumFrames(); // initializes the numFrames member
Lock();
Add(r);
ChangeState();
Unlock();
if (deleted) {
r->fileSizeMB = DirSizeMB(buffer);
r->deleted = time(NULL);
}
Link = 1;
if (stat(buffer, &st) != 0)
continue;
}
if (S_ISDIR(st.st_mode)) {
if (endswith(buffer, deleted ? DELEXT : RECEXT)) {
cRecording *r = new cRecording(buffer);
if (r->Name()) {
r->NumFrames(); // initializes the numFrames member
Lock();
Add(r);
ChangeState();
Unlock();
if (deleted) {
r->fileSizeMB = DirSizeMB(buffer);
r->deleted = time(NULL);
}
else
delete r;
}
else
ScanVideoDir(buffer, Foreground, LinkLevel + Link);
delete r;
}
else
ScanVideoDir(buffer, Foreground, LinkLevel + Link);
}
}
}
@ -1220,12 +1215,14 @@ void cRecordings::DelByName(const char *FileName)
char *ext = strrchr(recording->fileName, '.');
if (ext) {
strncpy(ext, DELEXT, strlen(ext));
recording->fileSizeMB = DirSizeMB(recording->FileName());
recording->deleted = time(NULL);
DeletedRecordings.Add(recording);
if (access(recording->FileName(), F_OK) == 0) {
recording->fileSizeMB = DirSizeMB(recording->FileName());
recording->deleted = time(NULL);
DeletedRecordings.Add(recording);
recording = NULL; // to prevent it from being deleted below
}
}
else
delete recording;
delete recording;
ChangeState();
TouchUpdate();
}
@ -1558,8 +1555,9 @@ struct tIndexTs {
#define MAXWAITFORINDEXFILE 10 // max. time to wait for the regenerated index file (seconds)
#define INDEXFILECHECKINTERVAL 500 // ms between checks for existence of the regenerated index file
#define INDEXFILETESTINTERVAL 10 // ms between tests for the size of the index file in case of pausing live video
cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording)
cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording, bool PauseLive)
:resumeFile(FileName, IsPesRecording)
{
f = -1;
@ -1570,6 +1568,12 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording)
indexFileGenerator = NULL;
if (FileName) {
fileName = IndexFileName(FileName, isPesRecording);
if (!Record && PauseLive) {
// Wait until the index file contains at least two frames:
time_t tmax = time(NULL) + MAXWAITFORINDEXFILE;
while (time(NULL) < tmax && FileSize(fileName) < 2 * sizeof(tIndexTs))
cCondWait::SleepMs(INDEXFILETESTINTERVAL);
}
int delta = 0;
if (!Record && access(fileName, R_OK) != 0) {
// Index file doesn't exist, so try to regenerate it:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.h 2.26 2011/12/04 13:38:17 kls Exp $
* $Id: recording.h 2.27 2012/02/19 10:44:53 kls Exp $
*/
#ifndef __RECORDING_H
@ -279,7 +279,7 @@ private:
void ConvertToPes(tIndexTs *IndexTs, int Count);
bool CatchUp(int Index = -1);
public:
cIndexFile(const char *FileName, bool Record, bool IsPesRecording = false);
cIndexFile(const char *FileName, bool Record, bool IsPesRecording = false, bool PauseLive = false);
~cIndexFile();
bool Ok(void) { return index != NULL; }
bool Write(bool Independent, uint16_t FileNumber, off_t FileOffset);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remote.c 2.4 2011/08/15 13:41:40 kls Exp $
* $Id: remote.c 2.5 2012/01/16 16:57:00 kls Exp $
*/
#include "remote.h"
@ -317,38 +317,38 @@ uint64_t cKbdRemote::ReadKeySequence(void)
if ((key1 = ReadKey()) >= 0) {
k = key1;
if (key1 == 0x1B) {
// Start of escape sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
switch (key1) {
case 0x4F: // 3-byte sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
}
break;
case 0x5B: // 3- or more-byte sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
switch (key1) {
case 0x31 ... 0x3F: // more-byte sequence
case 0x5B: // strange, may apparently occur
do {
if ((key1 = ReadKey()) < 0)
break; // Sequence ends here
k <<= 8;
k |= key1 & 0xFF;
} while (key1 != 0x7E);
break;
default: ;
}
}
break;
default: ;
}
}
// Start of escape sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
switch (key1) {
case 0x4F: // 3-byte sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
}
break;
case 0x5B: // 3- or more-byte sequence
if ((key1 = ReadKey()) >= 0) {
k <<= 8;
k |= key1 & 0xFF;
switch (key1) {
case 0x31 ... 0x3F: // more-byte sequence
case 0x5B: // strange, may apparently occur
do {
if ((key1 = ReadKey()) < 0)
break; // Sequence ends here
k <<= 8;
k |= key1 & 0xFF;
} while (key1 != 0x7E);
break;
default: ;
}
}
break;
default: ;
}
}
}
}
return k;

23
svdrp.c
View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
* $Id: svdrp.c 2.13 2012/01/12 15:02:46 kls Exp $
* $Id: svdrp.c 2.15 2012/02/16 12:38:19 kls Exp $
*/
#include "svdrp.h"
@ -256,8 +256,6 @@ const char *HelpPages[] = {
" used to easily activate or deactivate a timer.",
"MOVC <number> <to>\n"
" Move a channel to a new position.",
"MOVT <number> <to>\n"
" Move a timer to a new position.",
"NEWC <settings>\n"
" Create a new channel. Settings must be in the same format as returned\n"
" by the LSTC command.",
@ -664,12 +662,16 @@ void cSVDRP::CmdDELR(const char *Option)
if (recording) {
cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName());
if (!rc) {
if (recording->Delete()) {
Reply(250, "Recording \"%s\" deleted", Option);
::Recordings.DelByName(recording->FileName());
if (!cCutter::Active(recording->FileName())) {
if (recording->Delete()) {
Reply(250, "Recording \"%s\" deleted", Option);
::Recordings.DelByName(recording->FileName());
}
else
Reply(554, "Error while deleting recording!");
}
else
Reply(554, "Error while deleting recording!");
Reply(550, "Recording \"%s\" is being edited", Option);
}
else
Reply(550, "Recording \"%s\" is in use by timer %d", Option, rc->Timer()->Index() + 1);
@ -1283,12 +1285,6 @@ void cSVDRP::CmdMOVC(const char *Option)
Reply(501, "Missing channel number");
}
void cSVDRP::CmdMOVT(const char *Option)
{
//TODO combine this with menu action
Reply(502, "MOVT not yet implemented");
}
void cSVDRP::CmdNEWC(const char *Option)
{
if (*Option) {
@ -1632,7 +1628,6 @@ void cSVDRP::Execute(char *Cmd)
else if (CMD("MODC")) CmdMODC(s);
else if (CMD("MODT")) CmdMODT(s);
else if (CMD("MOVC")) CmdMOVC(s);
else if (CMD("MOVT")) CmdMOVT(s);
else if (CMD("NEWC")) CmdNEWC(s);
else if (CMD("NEWT")) CmdNEWT(s);
else if (CMD("NEXT")) CmdNEXT(s);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: svdrp.h 2.1 2011/12/04 13:51:44 kls Exp $
* $Id: svdrp.h 2.2 2012/02/16 12:37:53 kls Exp $
*/
#ifndef __SVDRP_H
@ -71,7 +71,6 @@ private:
void CmdMODC(const char *Option);
void CmdMODT(const char *Option);
void CmdMOVC(const char *Option);
void CmdMOVT(const char *Option);
void CmdNEWC(const char *Option);
void CmdNEWT(const char *Option);
void CmdNEXT(const char *Option);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: themes.c 2.1 2011/02/25 14:45:18 kls Exp $
* $Id: themes.c 2.2 2012/02/17 13:57:32 kls Exp $
*/
#include "themes.h"
@ -243,37 +243,35 @@ bool cThemes::Load(const char *SkinName)
cReadDir d(themesDirectory);
struct dirent *e;
while ((e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
if (strstr(e->d_name, SkinName) == e->d_name && e->d_name[strlen(SkinName)] == '-') {
cString FileName = AddDirectory(themesDirectory, e->d_name);
cTheme Theme;
if (Theme.Load(*FileName, true)) {
if (char **NewBuffer = (char **)realloc(names, (numThemes + 1) * sizeof(char *))) {
names = NewBuffer;
names[numThemes] = strdup(Theme.Name());
}
else {
esyslog("ERROR: out of memory");
break;
}
if (char **NewBuffer = (char **)realloc(fileNames, (numThemes + 1) * sizeof(char *))) {
fileNames = NewBuffer;
fileNames[numThemes] = strdup(*FileName);
}
else {
esyslog("ERROR: out of memory");
break;
}
if (char **NewBuffer = (char **)realloc(descriptions, (numThemes + 1) * sizeof(char *))) {
descriptions = NewBuffer;
descriptions[numThemes] = strdup(Theme.Description());
}
else {
esyslog("ERROR: out of memory");
break;
}
numThemes++;
if (strstr(e->d_name, SkinName) == e->d_name && e->d_name[strlen(SkinName)] == '-') {
cString FileName = AddDirectory(themesDirectory, e->d_name);
cTheme Theme;
if (Theme.Load(*FileName, true)) {
if (char **NewBuffer = (char **)realloc(names, (numThemes + 1) * sizeof(char *))) {
names = NewBuffer;
names[numThemes] = strdup(Theme.Name());
}
else {
esyslog("ERROR: out of memory");
break;
}
if (char **NewBuffer = (char **)realloc(fileNames, (numThemes + 1) * sizeof(char *))) {
fileNames = NewBuffer;
fileNames[numThemes] = strdup(*FileName);
}
else {
esyslog("ERROR: out of memory");
break;
}
if (char **NewBuffer = (char **)realloc(descriptions, (numThemes + 1) * sizeof(char *))) {
descriptions = NewBuffer;
descriptions[numThemes] = strdup(Theme.Description());
}
else {
esyslog("ERROR: out of memory");
break;
}
numThemes++;
}
}
}

116
tools.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.c 2.20 2012/01/11 11:21:43 kls Exp $
* $Id: tools.c 2.22 2012/02/18 15:30:35 kls Exp $
*/
#include "tools.h"
@ -384,37 +384,35 @@ bool RemoveFileOrDir(const char *FileName, bool FollowSymlinks)
if (d.Ok()) {
struct dirent *e;
while ((e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
cString buffer = AddDirectory(FileName, e->d_name);
if (FollowSymlinks) {
struct stat st2;
if (lstat(buffer, &st2) == 0) {
if (S_ISLNK(st2.st_mode)) {
int size = st2.st_size + 1;
char *l = MALLOC(char, size);
int n = readlink(buffer, l, size - 1);
if (n < 0) {
if (errno != EINVAL)
LOG_ERROR_STR(*buffer);
}
else {
l[n] = 0;
dsyslog("removing %s", l);
if (remove(l) < 0)
LOG_ERROR_STR(l);
}
free(l);
cString buffer = AddDirectory(FileName, e->d_name);
if (FollowSymlinks) {
struct stat st2;
if (lstat(buffer, &st2) == 0) {
if (S_ISLNK(st2.st_mode)) {
int size = st2.st_size + 1;
char *l = MALLOC(char, size);
int n = readlink(buffer, l, size - 1);
if (n < 0) {
if (errno != EINVAL)
LOG_ERROR_STR(*buffer);
}
}
else if (errno != ENOENT) {
LOG_ERROR_STR(FileName);
return false;
else {
l[n] = 0;
dsyslog("removing %s", l);
if (remove(l) < 0)
LOG_ERROR_STR(l);
}
free(l);
}
}
dsyslog("removing %s", *buffer);
if (remove(buffer) < 0)
LOG_ERROR_STR(*buffer);
else if (errno != ENOENT) {
LOG_ERROR_STR(FileName);
return false;
}
}
dsyslog("removing %s", *buffer);
if (remove(buffer) < 0)
LOG_ERROR_STR(*buffer);
}
}
else {
@ -442,7 +440,7 @@ bool RemoveEmptyDirectories(const char *DirName, bool RemoveThis)
bool empty = true;
struct dirent *e;
while ((e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..") && strcmp(e->d_name, "lost+found")) {
if (strcmp(e->d_name, "lost+found")) {
cString buffer = AddDirectory(DirName, e->d_name);
struct stat st;
if (stat(buffer, &st) == 0) {
@ -480,24 +478,22 @@ int DirSizeMB(const char *DirName)
int size = 0;
struct dirent *e;
while (size >= 0 && (e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
cString buffer = AddDirectory(DirName, e->d_name);
struct stat st;
if (stat(buffer, &st) == 0) {
if (S_ISDIR(st.st_mode)) {
int n = DirSizeMB(buffer);
if (n >= 0)
size += n;
else
size = -1;
}
cString buffer = AddDirectory(DirName, e->d_name);
struct stat st;
if (stat(buffer, &st) == 0) {
if (S_ISDIR(st.st_mode)) {
int n = DirSizeMB(buffer);
if (n >= 0)
size += n;
else
size += st.st_size / MEGABYTE(1);
}
else {
LOG_ERROR_STR(*buffer);
size = -1;
size = -1;
}
else
size += st.st_size / MEGABYTE(1);
}
else {
LOG_ERROR_STR(*buffer);
size = -1;
}
}
return size;
@ -567,6 +563,14 @@ time_t LastModifiedTime(const char *FileName)
return 0;
}
off_t FileSize(const char *FileName)
{
struct stat fs;
if (stat(FileName, &fs) == 0)
return fs.st_size;
return -1;
}
// --- cTimeMs ---------------------------------------------------------------
cTimeMs::cTimeMs(int Ms)
@ -1320,7 +1324,13 @@ cReadDir::~cReadDir()
struct dirent *cReadDir::Next(void)
{
return directory && readdir_r(directory, &u.d, &result) == 0 ? result : NULL;
if (directory) {
while (readdir_r(directory, &u.d, &result) == 0 && result) {
if (strcmp(result->d_name, ".") && strcmp(result->d_name, ".."))
return result;
}
}
return NULL;
}
// --- cStringList -----------------------------------------------------------
@ -1362,16 +1372,14 @@ bool cFileNameList::Load(const char *Directory, bool DirsOnly)
struct dirent *e;
if (d.Ok()) {
while ((e = d.Next()) != NULL) {
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
if (DirsOnly) {
struct stat ds;
if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
if (!S_ISDIR(ds.st_mode))
continue;
}
if (DirsOnly) {
struct stat ds;
if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
if (!S_ISDIR(ds.st_mode))
continue;
}
Append(strdup(e->d_name));
}
Append(strdup(e->d_name));
}
Sort();
return true;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.h 2.14 2011/12/04 14:48:03 kls Exp $
* $Id: tools.h 2.15 2012/02/18 15:29:50 kls Exp $
*/
#ifndef __TOOLS_H
@ -224,6 +224,7 @@ char *ReadLink(const char *FileName); ///< returns a new string allocated on the
bool SpinUpDisk(const char *FileName);
void TouchFile(const char *FileName);
time_t LastModifiedTime(const char *FileName);
off_t FileSize(const char *FileName); ///< returns the size of the given file, or -1 in case of an error (e.g. if the file doesn't exist)
cString WeekDayName(int WeekDay);
cString WeekDayName(time_t t);
cString WeekDayNameFull(int WeekDay);

6
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
* $Id: vdr.c 2.27 2011/12/03 15:35:09 kls Exp $
* $Id: vdr.c 2.29 2012/02/19 11:37:35 kls Exp $
*/
#include <getopt.h>
@ -569,6 +569,7 @@ int main(int argc, char *argv[])
// Main program loop variables - need to be here to have them initialized before any EXIT():
cEpgDataReader EpgDataReader;
cOsdObject *Menu = NULL;
int LastChannel = 0;
int LastTimerChannel = -1;
@ -633,7 +634,7 @@ int main(int argc, char *argv[])
cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName));
else
cSchedules::SetEpgDataFileName(EpgDataFileName);
cSchedules::Read();
EpgDataReader.Start();
}
// DVB interfaces:
@ -1159,7 +1160,6 @@ int main(int argc, char *argv[])
}
switch (state) {
case osPause: DELETE_MENU;
cControl::Shutdown(); // just in case
if (!cRecordControls::PauseLiveVideo())
Skins.Message(mtError, tr("No free DVB device to record!"));
break;