diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-04-12 22:29:35 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-04-12 11:39:00 +0200 |
commit | 1aadb31fb355550bb415ed971322a9bcb80f9325 (patch) | |
tree | 6a6fb763f2c56073e91e3052d20aa20695fa2667 /device.c | |
parent | 084e16c057ab195a76c2117c631a2fe10a904238 (diff) | |
download | vdr-patch-lnbsharing-1aadb31fb355550bb415ed971322a9bcb80f9325.tar.gz vdr-patch-lnbsharing-1aadb31fb355550bb415ed971322a9bcb80f9325.tar.bz2 |
Version 1.7.5vdr-1.7.5
- Fixed a hangup when replaying a TS recording with subtitles activated (reported
by Timo Helkio).
- Fixed handling the 'new' indicator in the recordings menu for TS recordings
(thanks to Derek Kelly).
- Added cap_sys_nice to the capabilities that are not dropped (thanks to Rolf
Ahrenberg).
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Added cRecordingInfo::GetEvent() (thanks to Marcel Unbehaun).
- Improved synchronizing the progress display, trick modes and subtitle display
to the actual audio/video. This now works independent of any buffer sizes the
output device might use.
+ The cBackTrace class has been replaced with cPtsIndex, which keeps track
of the PTS timestamps of recently played frames.
+ cDevice::GetSTC() is now required to deliver the STC even in trick modes.
It is sufficient if it returns the PTS of the most recently presented
audio/video frame.
+ The full-featured DVB cards need an improved firmware in order to return
proper STC values in trick modes (thanks to Oliver Endriss for enhancing the
av7110 firmware).
- Adapted cFrameDetector::Analyze() to HD NTSC broadcasts that split frames over
several payload units (thanks to Derek Kelly for reporting this and helping in
testing).
- Modified cFrameDetector::Analyze() to make it process whole frames at once, so
that file I/O overhead is minimized during recording (reported by Günter
Niedermeier).
- Added command line help for the '-i' option.
- Fixed cDvbPlayer::NextFile() to handle files larger than 2GB (thanks to Jose
Alberto Reguero).
- Improved replay at the begin and end of a recording. The very first and very last
frame is now sent to the output device repeatedly until GetSTC() reports that it
has been played. cDvbPlayer::Action() no longer calls DeviceFlush() (thanks to
Reinhard Nissl for making sure vdr-xine no longer needs this).
- Added missing '[]' to the delete operator in cMenuEditStrItem::~cMenuEditStrItem().
- Added missing virtual destructor to cPalette.
- Now freeing configDirectory before setting it to a new value in
cPlugin::SetConfigDirectory().
- Fixed a crash when jumping to an editing mark in an audio recording.
- Fixed the 'VideoOnly' condition in the PlayPes() and PlayTs() calls in
cDvbPlayer::Action() (thanks to Reinhard Nissl).
- cDevice::PlayTs() now plays as many TS packets as possible in one call.
- Making sure any floating point numbers written use a decimal point (thanks to
Oliver Endriss for pointing out a problem with the F record in the info file of
a recording).
- Fixed detecting the frame rate for radio recordings.
- Added missing AUDIO_PAUSE/AUDIO_CONTINUE calls to cDvbDevice (thanks to Oliver
Endriss).
- No longer writing the video type into channels.conf if VPID is 0 (thanks to
Oliver Endriss for reporting this).
- Improved efficiency of cEIT::cEIT() (thanks to Tobias Bratfisch).
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 82 |
1 files changed, 47 insertions, 35 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.11 2009/01/25 11:10:56 kls Exp $ + * $Id: device.c 2.13 2009/04/05 12:15:41 kls Exp $ */ #include "device.h" @@ -1304,8 +1304,9 @@ int cDevice::PlayTsSubtitle(const uchar *Data, int Length) if (!dvbSubtitleConverter) dvbSubtitleConverter = new cDvbSubtitleConverter; tsToPesSubtitle.PutTs(Data, Length); - if (const uchar *p = tsToPesSubtitle.GetPes(Length)) { - dvbSubtitleConverter->Convert(p, Length); + int l; + if (const uchar *p = tsToPesSubtitle.GetPes(l)) { + dvbSubtitleConverter->Convert(p, l); tsToPesSubtitle.Reset(); } return Length; @@ -1314,43 +1315,54 @@ int cDevice::PlayTsSubtitle(const uchar *Data, int Length) //TODO detect and report continuity errors? int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) { - if (Length == TS_SIZE) { - if (!TsHasPayload(Data)) - return Length; // silently ignore TS packets w/o payload - int PayloadOffset = TsPayloadOffset(Data); - if (PayloadOffset < Length) { - cMutexLock MutexLock(&mutexCurrentAudioTrack); - int Pid = TsPid(Data); - if (Pid == 0) - patPmtParser.ParsePat(Data, Length); - else if (Pid == patPmtParser.PmtPid()) - patPmtParser.ParsePmt(Data, Length); - else if (Pid == patPmtParser.Vpid()) { - isPlayingVideo = true; - return PlayTsVideo(Data, Length); - } - else if (Pid == availableTracks[currentAudioTrack].id) { - if (!VideoOnly || HasIBPTrickSpeed()) { - int w = PlayTsAudio(Data, Length); - if (w > 0) - Audios.PlayTsAudio(Data, Length); - return w; - } - } - else if (Pid == availableTracks[currentSubtitleTrack].id) { - if (!VideoOnly || HasIBPTrickSpeed()) - return PlayTsSubtitle(Data, Length); - } - return Length; - } - } - else if (Data == NULL) { + int Played = 0; + if (Data == NULL) { patPmtParser.Reset(); tsToPesVideo.Reset(); tsToPesAudio.Reset(); tsToPesSubtitle.Reset(); } - return -1; + else { + cMutexLock MutexLock(&mutexCurrentAudioTrack); + while (Length >= TS_SIZE) { + if (TsHasPayload(Data)) { // silently ignore TS packets w/o payload + int PayloadOffset = TsPayloadOffset(Data); + if (PayloadOffset < TS_SIZE) { + int Pid = TsPid(Data); + if (Pid == 0) + patPmtParser.ParsePat(Data, TS_SIZE); + else if (Pid == patPmtParser.PmtPid()) + patPmtParser.ParsePmt(Data, TS_SIZE); + else if (Pid == patPmtParser.Vpid()) { + isPlayingVideo = true; + int w = PlayTsVideo(Data, TS_SIZE); + if (w < 0) + return Played ? Played : w; + if (w == 0) + break; + } + else if (Pid == availableTracks[currentAudioTrack].id) { + if (!VideoOnly || HasIBPTrickSpeed()) { + int w = PlayTsAudio(Data, TS_SIZE); + if (w < 0) + return Played ? Played : w; + if (w == 0) + break; + Audios.PlayTsAudio(Data, TS_SIZE); + } + } + else if (Pid == availableTracks[currentSubtitleTrack].id) { + if (!VideoOnly || HasIBPTrickSpeed()) + PlayTsSubtitle(Data, TS_SIZE); + } + } + } + Played += TS_SIZE; + Length -= TS_SIZE; + Data += TS_SIZE; + } + } + return Played; } int cDevice::Priority(void) const |