summaryrefslogtreecommitdiff
path: root/dvd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-24 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-24 18:00:00 +0100
commitfb8e7fa302ef8a73feb6958b0cb32cc54f76e677 (patch)
tree74cf9dd5cd1892aaf1c05db32796eb356d7bc860 /dvd.c
parenta1da0e5c5de55009716e2c327dda16c61c1dae83 (diff)
downloadvdr-patch-lnbsharing-fb8e7fa302ef8a73feb6958b0cb32cc54f76e677.tar.gz
vdr-patch-lnbsharing-fb8e7fa302ef8a73feb6958b0cb32cc54f76e677.tar.bz2
Version 1.0.0pre1vdr-1.0.0pre1
- Added scanning for EPG data for another 4 days on channels that support this (thanks to Oleg Assovski). - Removed '#define VFAT 1' from recording.c (was a leftover from testing). - Fixed the "Low disk space!" message (thanks to Sergei Haller). - Added the TPID to Hessen-3 in 'channels.conf' (thanks to Sergei Haller). - Fixed a crash when replaying with DEBUG_OSD=1 (thanks to Stefan Huelswitt). - Implemented the "First day" parameter for repeating timers. See FORMATS for information about the enhanced 'timers.conf' file format, and MANUAL for a description of the new item in the "Edit Timer" menu and the enhanced functionality of the "Blue" button in the "Timers" menu. - When deleting a recording that is currently still being recorded, the related timer will now automatically be terminated. If this is a repeating timer, it will receive a "First day" setting that skips the timer for this day. - Fixed closing all unused file descriptors when opening a pipe (thanks to Werner Fink). - Instant recordings now take the EPG data from the point in time at 5 minutes from the start time of the recording. In order for this to work the 'active' parameter of a timer now uses the second bit to indicate that this is an "instant" recording (see FORMATS for details). - Fixed the SVDRP GRAB command in case the video device can't be opened (thanks to Adrian Stabiszewski). - At startup the data written into 'epg.data' is now read into the EPG data structures. In order for this to work, the 'E' record has been extended to (optionally) contain the 'table ID' (see FORMATS for details). - The new SVDRP command PUTE can be used to put EPG data into the EPG list. See FORMATS for details about the required data format. - Taking the German umlauts 'as is' when compiled with VFAT. - The new Setup parameter RecordDolbyDigital can be used to generally turn off recording the Dolby Digital audio channels in case you want to save disk space or don't have the equipment to replay Dolby Digital audio. - Reading the 'setup.conf' file no longer terminates in case of an error, but rather attempts to read the rest of the file. - Removed DVD support from the core VDR source, since the current version from Andreas Schultz is already much further developed (DVD menu navigation) and the concept of "additional players" in VDR is going to change in version 1.1.0, where a new "plugin" interface shall allow the easy implementation of new players without having to patch the core VDR source. Until then, Andreas has agreed to provide his DVD support as a completely external patch. - The contents of the distribution archive now contains the directory name with the current version number, as in 'vdr-1.0.0pre1/...' in order to avoid inadvertently overwriting an existing VDR directory with a new version. - Added a missing error message in SVDRP command LSTC in case the given channel can't be found.
Diffstat (limited to 'dvd.c')
-rw-r--r--dvd.c169
1 files changed, 0 insertions, 169 deletions
diff --git a/dvd.c b/dvd.c
deleted file mode 100644
index e061b14..0000000
--- a/dvd.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * dvd.c: Functions for handling DVDs
- *
- * See the main source file 'vdr.c' for copyright information and
- * how to reach the author.
- *
- * Initially written by Andreas Schultz <aschultz@warp10.net>
- *
- * $Id: dvd.c 1.4 2001/11/10 13:38:50 kls Exp $
- */
-
-#ifdef DVDSUPPORT
-
-//#define DVDSUPPORTDEBUG 1
-//#define DEBUG_BUFFER 1
-
-#include <fcntl.h>
-#include <linux/cdrom.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-
-#include "dvd.h"
-#include "tools.h"
-
-// --- cDVD ----------------------------------------------------------------------------
-
-const char *cDVD::deviceName = "/dev/dvd";
-cDVD *cDVD::dvdInstance = NULL;
-
-cDVD *cDVD::getDVD(void)
-{
- if (!dvdInstance)
- new cDVD;
- return dvdInstance;
-}
-
-cDVD::cDVD(void)
-{
- dvd = NULL;
- title = NULL;
- vmg_file = NULL;
- vts_file = NULL;
- dvdInstance = this;
-}
-
-cDVD::~cDVD()
-{
- Close();
-}
-
-int cDVD::Command(int Cmd)
-{
- int result = -1;
- int f;
- if ((f = open(deviceName, O_RDONLY | O_NONBLOCK)) > 0) {
- result = ioctl(f, Cmd, 0);
- close(f);
- }
- return result;
-}
-
-void cDVD::SetDeviceName(const char *DeviceName)
-{
- deviceName = strdup(DeviceName);
-}
-
-const char *cDVD::DeviceName(void)
-{
- return deviceName;
-}
-
-bool cDVD::DriveExists(void)
-{
- return access(deviceName, F_OK) == 0;
-}
-
-bool cDVD::DiscOk(void)
-{
- return Command(CDROM_DRIVE_STATUS) == CDS_DISC_OK;
-}
-
-void cDVD::Eject(void)
-{
- if (dvdInstance)
- dvdInstance->Close();
- Command(CDROMEJECT);
-}
-
-void cDVD::Open(void)
-{
- if (!dvd)
- dvd = DVDOpen(deviceName);
-}
-
-void cDVD::Close(void)
-{
-#ifdef DVDSUPPORTDEBUG
- dsyslog(LOG_INFO, "DVD: cDVD::Close(%p): vts: %p, vmg: %p, title: %p, dvd: %p", this, vts_file, vmg_file, title, dvd);
-#endif
- if (vts_file)
- ifoClose(vts_file);
- if (vmg_file)
- ifoClose(vmg_file);
- if (title)
- DVDCloseFile(title);
- if (dvd)
- DVDClose(dvd);
- vts_file = NULL;
- vmg_file = NULL;
- title = NULL;
- dvd = NULL;
-}
-
-ifo_handle_t *cDVD::openVMG(void)
-{
- if (!isValid())
- return NULL;
- if (!vmg_file)
- vmg_file = ifoOpen(dvd, 0);
- return vmg_file;
-}
-
-ifo_handle_t *cDVD::openVTS(int TitleSet)
-{
- if (!isValid())
- return NULL;
- if (vts_file && (titleset != TitleSet)) {
- ifoClose(vts_file);
- vts_file = NULL;
- }
- if (!vts_file) {
- titleset = TitleSet;
- vts_file = ifoOpen(dvd, TitleSet);
- }
- return vts_file;
-}
-
-dvd_file_t *cDVD::openTitle(int Title, dvd_read_domain_t domain)
-{
- if (!isValid())
- return NULL;
- if (title)
- DVDCloseFile(title);
- title = DVDOpenFile(dvd, Title, domain);
- return title;
-}
-
-int cDVD::getAudioTrack(int stream)
-{
- if (getVTS()) {
- switch (getVTS()->vtsi_mat->vts_audio_attr[stream].audio_format) {
- case 0: // ac3
- return aAC3;
- case 2: // mpeg1
- case 3: // mpeg2ext
- return aMPEG;
- case 4: // lpcm
- return aLPCM;
- case 6: // dts
- return aDTS;
- default:
- esyslog(LOG_ERR, "ERROR: unknown Audio stream info");
- }
- }
- return 0;
-}
-
-#endif //DVDSUPPORT