Implemented handling DVB subtitles

This commit is contained in:
Klaus Schmidinger
2007-10-12 14:52:30 +02:00
parent 3a4b7f065c
commit 0c8cda9bd0
26 changed files with 1774 additions and 85 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.154 2007/06/17 13:10:12 kls Exp $
* $Id: recording.c 1.155 2007/10/12 14:48:20 kls Exp $
*/
#include "recording.h"
@@ -296,6 +296,17 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
strn0cpy(Component->language, s, sizeof(Component->language));
}
}
// The same applies to subtitles:
for (int i = 0; i < MAXSPIDS; i++) {
const char *s = Channel->Slang(i);
if (*s) {
tComponent *Component = Components->GetComponent(i, 3, 3);
if (!Component)
Components->SetComponent(Components->NumComponents(), 3, 3, s, NULL);
else if (strlen(s) > strlen(Component->language))
strn0cpy(Component->language, s, sizeof(Component->language));
}
}
if (Components != event->Components())
((cEvent *)event)->SetComponents(Components);
}