mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.7.27
Original announce message:
VDR developer version 1.7.27 is now available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.27.tar.bz2
A 'diff' against the previous version is available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.26-1.7.27.diff
MD5 checksums:
bfeaa79a9e55144bca2b69139c45f1bb vdr-1.7.27.tar.bz2
b23344be51d3e2c2d96cc2dd4e8e564e vdr-1.7.26-1.7.27.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 Finnish OSD texts (thanks to Rolf Ahrenberg).
- Changed the Green button in the "Edit timer" menu from "Once" to "Single"
(suggested by Rolf Ahrenberg).
- Fixed some typos in HISTORY and CONTRIBUTORS (thanks to Ville Skyttä).
- The channel name column in the "What's on now/next" menu now adjusts its width
to display the full short name of each channel (suggested by Dominic Evans).
- Dropped the meanwhile obsolete script 'i18n-to-gettext'.
- Removed the obsolete function cPlugin::RegisterI18n().
- Removed the obsolete typedef tI18nPhrase.
- Adapted menu column widths of 'skincurses' to the wider HD OSD sizes.
- Deactivated definition of __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS (recording.h)
and LEGACY_CRECEIVER (receiver.h) to trigger an error for any plugin that still
uses the respective code. You can reactivate these to quickly make your plugin
compile again, but beware that these code parts will be removed in one of the next
versions.
- Made the "overloaded-virtual" warning an error to detect hidden overloaded
virtual functions (thanks to Anssi Hannula for pointing out -Werror=...).
Plugin authors may want to change -Woverloaded-virtual to -Werror=overloaded-virtual
in their Makefiles.
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Improved fast forwarding to the end of a timeshift recording.
- The new function cDevice::DeviceName() returns a string identifying the name of
the given device.
- When toggling a timer between "Single" and "Repeating", the previous setting is now
retained in case the user toggles back to the original value.
- When estimating the remaining disk space (in hours), the average data rate of all
existing recordings is now taken into account. If this value can't be determined,
the previous value of 25.75 MB/min is taken.
- No longer using GetFont() (which is not thread safe) in the 'osddemo' plugin.
- No longer using GetFont() (which is not thread safe) in cSubtitleRegion::UpdateTextData().
- Fixed a memory leak in cSubtitleRegion::UpdateTextData().
- Moved setting LC_NUMERIC further up to make sure any floating point numbers use a
decimal point (suggested by Tobias Grimm).
- Added missing channel locking to cEIT.
- Fixed reduced bpp support for DVB subtitles (thanks to Rolf Ahrenberg).
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Reverted some improvements to Make.config.template (thanks to Christian Ruppert).
- Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank
Schmirler).
This commit is contained in:
committed by
Dieter Hametner
parent
5117f35938
commit
19b952728e
55
recording.c
55
recording.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 2.51 2012/02/26 13:58:26 kls Exp $
|
||||
* $Id: recording.c 2.53 2012/03/13 13:17:57 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@@ -1063,6 +1063,17 @@ int cRecording::LengthInSeconds(void) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cRecording::FileSizeMB(void) const
|
||||
{
|
||||
if (fileSizeMB < 0) {
|
||||
int fs = DirSizeMB(FileName());
|
||||
if (time(NULL) - LastModifiedTime(FileName()) < MININDEXAGE)
|
||||
return fs; // check again later for ongoing recordings
|
||||
fileSizeMB = fs;
|
||||
}
|
||||
return fileSizeMB;
|
||||
}
|
||||
|
||||
// --- cRecordings -----------------------------------------------------------
|
||||
|
||||
cRecordings Recordings;
|
||||
@@ -1127,14 +1138,13 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
|
||||
cRecording *r = new cRecording(buffer);
|
||||
if (r->Name()) {
|
||||
r->NumFrames(); // initializes the numFrames member
|
||||
r->FileSizeMB(); // initializes the fileSizeMB member
|
||||
if (deleted)
|
||||
r->deleted = time(NULL);
|
||||
Lock();
|
||||
Add(r);
|
||||
ChangeState();
|
||||
Unlock();
|
||||
if (deleted) {
|
||||
r->fileSizeMB = DirSizeMB(buffer);
|
||||
r->deleted = time(NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
delete r;
|
||||
@@ -1216,7 +1226,6 @@ void cRecordings::DelByName(const char *FileName)
|
||||
if (ext) {
|
||||
strncpy(ext, DELEXT, strlen(ext));
|
||||
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
|
||||
@@ -1241,12 +1250,33 @@ int cRecordings::TotalFileSizeMB(void)
|
||||
int size = 0;
|
||||
LOCK_THREAD;
|
||||
for (cRecording *recording = First(); recording; recording = Next(recording)) {
|
||||
if (recording->fileSizeMB > 0 && IsOnVideoDirectoryFileSystem(recording->FileName()))
|
||||
size += recording->fileSizeMB;
|
||||
int FileSizeMB = recording->FileSizeMB();
|
||||
if (FileSizeMB > 0 && IsOnVideoDirectoryFileSystem(recording->FileName()))
|
||||
size += FileSizeMB;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
double cRecordings::MBperMinute(void)
|
||||
{
|
||||
int size = 0;
|
||||
int length = 0;
|
||||
LOCK_THREAD;
|
||||
for (cRecording *recording = First(); recording; recording = Next(recording)) {
|
||||
if (IsOnVideoDirectoryFileSystem(recording->FileName())) {
|
||||
int FileSizeMB = recording->FileSizeMB();
|
||||
if (FileSizeMB > 0) {
|
||||
int LengthInSeconds = recording->LengthInSeconds();
|
||||
if (LengthInSeconds > 0) {
|
||||
size += FileSizeMB;
|
||||
length += LengthInSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (size && length) ? double(size) * 60 / length : -1;
|
||||
}
|
||||
|
||||
void cRecordings::ResetResume(const char *ResumeFileName)
|
||||
{
|
||||
LOCK_THREAD;
|
||||
@@ -1526,9 +1556,6 @@ void cIndexFileGenerator::Action(void)
|
||||
|
||||
#define INDEXFILESUFFIX "/index"
|
||||
|
||||
// The number of frames to stay off the end in case of time shift:
|
||||
#define INDEXSAFETYLIMIT 150 // frames
|
||||
|
||||
// The maximum time to wait before giving up while catching up on an index file:
|
||||
#define MAXINDEXCATCHUP 8 // seconds
|
||||
|
||||
@@ -1728,7 +1755,7 @@ bool cIndexFile::CatchUp(int Index)
|
||||
}
|
||||
else
|
||||
LOG_ERROR_STR(*fileName);
|
||||
if (Index < last - (i ? 2 * INDEXSAFETYLIMIT : 0) || Index > 10 * INDEXSAFETYLIMIT) // keep off the end in case of "Pause live video"
|
||||
if (Index < last)
|
||||
break;
|
||||
cCondWait::SleepMs(1000);
|
||||
}
|
||||
@@ -1775,13 +1802,13 @@ bool cIndexFile::Get(int Index, uint16_t *FileNumber, off_t *FileOffset, bool *I
|
||||
return false;
|
||||
}
|
||||
|
||||
int cIndexFile::GetNextIFrame(int Index, bool Forward, uint16_t *FileNumber, off_t *FileOffset, int *Length, bool StayOffEnd)
|
||||
int cIndexFile::GetNextIFrame(int Index, bool Forward, uint16_t *FileNumber, off_t *FileOffset, int *Length)
|
||||
{
|
||||
if (CatchUp()) {
|
||||
int d = Forward ? 1 : -1;
|
||||
for (;;) {
|
||||
Index += d;
|
||||
if (Index >= 0 && Index < last - ((Forward && StayOffEnd) ? INDEXSAFETYLIMIT : 0)) {
|
||||
if (Index >= 0 && Index < last) {
|
||||
if (index[Index].independent) {
|
||||
uint16_t fn;
|
||||
if (!FileNumber)
|
||||
|
||||
Reference in New Issue
Block a user