diff --git a/HISTORY b/HISTORY index 3c3d859b..3f880fce 100644 --- a/HISTORY +++ b/HISTORY @@ -7943,3 +7943,26 @@ Video Disk Recorder Revision History respectively, during replay (reported by Thomas Maass). - The Yellow button in the main menu no longer acts as "Pause" if "Pause key handling" is set to "do not pause live video" (suggested by Ulf Kiener). +- The code for distributing recordings over several video directories has been + removed. VDR now by default assumes that the video directory is one big disk. + If you absolutely need to use several separate disks to store recordings, you can + write a plugin that uses the new cVideoDirectory API to implement the necessary + functionality (see PLUGINS.html, section "The video directory"). You can copy the + respective code from previous versions of videodir.c. + IMPORTANT NOTE: If you write a plugin that implements a distributed video directory, + =============== be sure to make cVideoDirectory::Rename() follow symbolic links! + This functionality was never implemented in VDR and it therefore + used a workaround in cutter.c. See the section marked with + // XXX this can be removed once RenameVideoFile() follows symlinks + in previous versions of cutter.c. + + CloseVideoFile() is obsolete and has been removed. + + The functions OpenVideoFile(), RenameVideoFile(), RemoveVideoFile(), VideoFileSpaceAvailable(), + VideoDiskSpace(), RemoveEmptyVideoDirectories(), IsOnVideoDirectoryFileSystem() and + PrefixVideoFileName() are now static members of cVideoDirectory and need to be called + with the proper prefix. + + The name of the video directory is now available through cVideoDirectory::Name(). + The former global variable VideoDirectory is still there for backwards compatibility, + but will be removed in a future version. Comment out the line + #define DEPRECATED_VIDEODIR + in videodir.h and recompile your plugins to see whether your code will work without + this variable. If you get a compile error, replace it with cVideoDirectory::Name(). diff --git a/PLUGINS.html b/PLUGINS.html index 5260c4bf..71d840ea 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -104,6 +104,7 @@ structures and allows it to hook itself into specific areas to perform special a
See VDR/epg.h for details. +
+ +By default VDR assumes that the video directory consists of one large +volume, on which it can store its recordings. If you want to distribute your +recordings over several physical drives, you can derive from cVideoDirectory, +as in + +
+#include <vdr/videodir.h> + +class cMyVideoDirectory : public cVideoDirectory { +public: + cMyVideoDirectory(void); + virtual ~cMyVideoDirectory(); + virtual int FreeMB(int *UsedMB = NULL); + virtual bool Register(const char *FileName); + virtual bool Rename(const char *OldName, const char *NewName); + virtual bool Move(const char *FromName, const char *ToName); + virtual bool Remove(const char *Name); + virtual void Cleanup(const char *IgnoreFiles[] = NULL); + virtual bool Contains(const char *Name); + }; + |
+ +See the description in videodir.h for details. +
+You should create your derived video directory object in the +Start() function of your plugin. +Note that the object has to be created on the heap (using new), +and you shall not delete it at any point (it will be deleted automatically +when the program ends). +