mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
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).
125 lines
3.8 KiB
C
125 lines
3.8 KiB
C
/*
|
|
* pictures.c: A plugin for the Video Disk Recorder
|
|
*
|
|
* See the README file for copyright information and how to reach the author.
|
|
*
|
|
* $Id: pictures.c 2.4 2012/02/17 14:00:48 kls Exp $
|
|
*/
|
|
|
|
#include <getopt.h>
|
|
#include <vdr/plugin.h>
|
|
#include "menu.h"
|
|
#include "player.h"
|
|
|
|
static const char *VERSION = "0.1.1";
|
|
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
|
|
static const char *MAINMENUENTRY = trNOOP("Pictures");
|
|
|
|
// --- cMenuSetupPictures ----------------------------------------------------
|
|
|
|
class cMenuSetupPictures : public cMenuSetupPage {
|
|
private:
|
|
char newPictureDirectory[PATH_MAX];
|
|
int newSlideShowDelay;
|
|
protected:
|
|
virtual void Store(void);
|
|
public:
|
|
cMenuSetupPictures(void);
|
|
};
|
|
|
|
cMenuSetupPictures::cMenuSetupPictures(void)
|
|
{
|
|
strn0cpy(newPictureDirectory, PictureDirectory, sizeof(newPictureDirectory));
|
|
newSlideShowDelay = SlideShowDelay;
|
|
Add(new cMenuEditStrItem(tr("Picture directory"), newPictureDirectory, sizeof(newPictureDirectory)));
|
|
Add(new cMenuEditIntItem(tr("Slide show delay (s)"), &newSlideShowDelay));
|
|
}
|
|
|
|
void cMenuSetupPictures::Store(void)
|
|
{
|
|
SetupStore("PictureDirectory", strn0cpy(PictureDirectory, newPictureDirectory, sizeof(PictureDirectory)));
|
|
SetupStore("SlideShowDelay", SlideShowDelay = newSlideShowDelay);
|
|
}
|
|
|
|
// --- cPluginPictures -------------------------------------------------------
|
|
|
|
class cPluginPictures : public cPlugin {
|
|
private:
|
|
// Add any member variables or functions you may need here.
|
|
public:
|
|
cPluginPictures(void);
|
|
virtual ~cPluginPictures();
|
|
virtual const char *Version(void) { return VERSION; }
|
|
virtual const char *Description(void) { return tr(DESCRIPTION); }
|
|
virtual const char *CommandLineHelp(void);
|
|
virtual bool ProcessArgs(int argc, char *argv[]);
|
|
virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
|
|
virtual cOsdObject *MainMenuAction(void);
|
|
virtual cMenuSetupPage *SetupMenu(void);
|
|
virtual bool SetupParse(const char *Name, const char *Value);
|
|
};
|
|
|
|
cPluginPictures::cPluginPictures(void)
|
|
{
|
|
// Initialize any member variables here.
|
|
// DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
|
|
// VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
|
|
}
|
|
|
|
cPluginPictures::~cPluginPictures()
|
|
{
|
|
// Clean up after yourself!
|
|
}
|
|
|
|
const char *cPluginPictures::CommandLineHelp(void)
|
|
{
|
|
// Return a string that describes all known command line options.
|
|
return " -d DIR, --dir=DIR set the picture directory to DIR\n";
|
|
}
|
|
|
|
bool cPluginPictures::ProcessArgs(int argc, char *argv[])
|
|
{
|
|
// Implement command line argument processing here if applicable.
|
|
static struct option long_options[] = {
|
|
{ "dir", required_argument, NULL, 'd' },
|
|
{ NULL, no_argument, NULL, 0 }
|
|
};
|
|
|
|
int c;
|
|
while ((c = getopt_long(argc, argv, "d:s:", long_options, NULL)) != -1) {
|
|
switch (c) {
|
|
case 'd': strn0cpy(PictureDirectory, optarg, sizeof(PictureDirectory));
|
|
break;
|
|
default: return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
cOsdObject *cPluginPictures::MainMenuAction(void)
|
|
{
|
|
// Perform the action when selected from the main VDR menu.
|
|
if (*PictureDirectory)
|
|
return cPictureMenu::CreatePictureMenu();
|
|
Skins.Message(mtWarning, tr("No picture directory has been defined!"));
|
|
return NULL;
|
|
}
|
|
|
|
cMenuSetupPage *cPluginPictures::SetupMenu(void)
|
|
{
|
|
// Return a setup menu in case the plugin supports one.
|
|
return new cMenuSetupPictures;
|
|
}
|
|
|
|
bool cPluginPictures::SetupParse(const char *Name, const char *Value)
|
|
{
|
|
// Parse your own setup parameters and store their values.
|
|
if (!strcasecmp(Name, "PictureDirectory")) strn0cpy(PictureDirectory, Value, sizeof(PictureDirectory));
|
|
else if (!strcasecmp(Name, "SlideShowDelay")) SlideShowDelay = atoi(Value);
|
|
else
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
VDRPLUGINCREATOR(cPluginPictures); // Don't touch this!
|