summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-04-26 12:19:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-04-26 12:19:00 +0200
commit733a2becc44a02daf10b97d24b8a9c8b00de3964 (patch)
tree18b2ce735f7932228d09e27570588fd86a94186c /svdrp.c
parent1aadb31fb355550bb415ed971322a9bcb80f9325 (diff)
downloadvdr-patch-lnbsharing-0a13635d4412a532c6f6a1b3caadc4a8310ea9a9.tar.gz
vdr-patch-lnbsharing-0a13635d4412a532c6f6a1b3caadc4a8310ea9a9.tar.bz2
Version 1.7.6vdr-1.7.6
- cDevice::PlayTs() now syncs on the TS packet sync bytes. - Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets. - No longer resetting the patPmtParser in cDevice::PlayTs(), because this caused the selected audio and subtitle tracks to fall back to the default. - The SVDRP command PUTE now supports reading the EPG data from a given file (thanks to Helmut Auer). - Added cThread::SetIOPriority() and using it in cRemoveDeletedRecordingsThread (thanks to Rolf Ahrenberg). - Fixed the MEGABYTE() macro to make it correctly handle parameters resulting in values larger than 2GB. - Added cDevice::NumProvidedSystems() to PLUGINS.html (was missing since it had been implemented). - Fixed distortions when switching to the next file during replay. - Fixed detecting the frame rate for streams with PTS distances of 1800, which apparently split one frame over two payload units. - Added missing 'const' to cRecording::FramesPerSecond() (thanks to Joachim Wilke). - Any TS packets in the first "frame" after a cut in an edited recording that don't belong to a payload unit that started in that frame now get their TEI flag set, so that a decoder will ignore them together with any PES data collected for that PID so far (thanks to Oliver Endriss for reporting chirping sound disturbences at editing points in TS recordings). - cDvbPlayer::Empty() subtracts 1 from readIndex, because Action() will first increment it. - Only storing non-zero Pts values in ptsIndex. - Added a note to the INSTALL file about using subdirectories to split a large disk into separate areas for VDR's video data and other stuff (suggested by Udo Richter).
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/svdrp.c b/svdrp.c
index 69b3e21..cc2f712 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -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.2 2009/01/06 14:35:45 kls Exp $
+ * $Id: svdrp.c 2.3 2009/04/13 13:35:29 kls Exp $
*/
#include "svdrp.h"
@@ -288,11 +288,14 @@ const char *HelpPages[] = {
" If 'help' is followed by a command, the detailed help for that command is\n"
" given. The keyword 'main' initiates a call to the main menu function of the\n"
" given plugin.\n",
- "PUTE\n"
+ "PUTE [ file ]\n"
" Put data into the EPG list. The data entered has to strictly follow the\n"
" format defined in vdr(5) for the 'epg.data' file. A '.' on a line\n"
" by itself terminates the input and starts processing of the data (all\n"
- " entered data is buffered until the terminating '.' is seen).",
+ " entered data is buffered until the terminating '.' is seen).\n"
+ " If a file name is given, epg data will be read from this file (which\n"
+ " must be accessible under the given name from the machine VDR is running\n"
+ " on). In case of file input, no terminating '.' shall be given.\n",
"REMO [ on | off ]\n"
" Turns the remote control on or off. Without a parameter, the current\n"
" status of the remote control is reported.",
@@ -1435,11 +1438,27 @@ void cSVDRP::CmdPLUG(const char *Option)
void cSVDRP::CmdPUTE(const char *Option)
{
- delete PUTEhandler;
- PUTEhandler = new cPUTEhandler;
- Reply(PUTEhandler->Status(), "%s", PUTEhandler->Message());
- if (PUTEhandler->Status() != 354)
- DELETENULL(PUTEhandler);
+ if (*Option) {
+ FILE *f = fopen(Option, "r");
+ if (f) {
+ if (cSchedules::Read(f)) {
+ cSchedules::Cleanup(true);
+ Reply(250, "EPG data processed from \"%s\"", Option);
+ }
+ else
+ Reply(451, "Error while processing EPG from \"%s\"", Option);
+ fclose(f);
+ }
+ else
+ Reply(501, "Cannot open file \"%s\"", Option);
+ }
+ else {
+ delete PUTEhandler;
+ PUTEhandler = new cPUTEhandler;
+ Reply(PUTEhandler->Status(), "%s", PUTEhandler->Message());
+ if (PUTEhandler->Status() != 354)
+ DELETENULL(PUTEhandler);
+ }
}
void cSVDRP::CmdREMO(const char *Option)