summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.c18
-rw-r--r--device.h8
2 files changed, 20 insertions, 6 deletions
diff --git a/device.c b/device.c
index c79d75b1..287b4353 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.22 2006-09-09 23:09:56 phintuka Exp $
+ * $Id: device.c,v 1.23 2006-10-13 04:41:03 phintuka Exp $
*
*/
@@ -516,6 +516,7 @@ void cXinelibDevice::StopOutput(void)
Clear();
ForEach(m_clients, &cXinelibThread::QueueBlankDisplay);
ForEach(m_clients, &cXinelibThread::SetNoVideo, false);
+ ClrAvailableDvdSpuTracks();
}
void cXinelibDevice::SetTvMode(cChannel *Channel)
@@ -928,7 +929,7 @@ int cXinelibDevice::PlaySpu(const uchar *buf, int length, uchar Id)
if(!m_spuPresent) {
TRACE("cXinelibDevice::PlaySpu first DVD SPU frame");
- Skins.QueueMessage(mtInfo,"DVD SPU");
+ Skins.QueueMessage(mtInfo,"DVD Subtitles");
m_spuPresent = true;
ForEach(m_clients, &cXinelibThread::SpuStreamChanged, (int)Id);
@@ -1317,11 +1318,22 @@ void cXinelibDevice::ClrAvailableDvdSpuTracks(void)
}
}
-bool cXinelibDevice::SetAvailableDvdSpuTrack(int Type)
+const char *cXinelibDevice::GetDvdSpuLang(int Type)
+{
+ if(Type >= 0 && Type < 64 &&
+ m_DvdSpuTrack[Type])
+ return m_DvdSpuLang[Type][0] ? m_DvdSpuLang[Type] : NULL;
+ return NULL;
+}
+
+bool cXinelibDevice::SetAvailableDvdSpuTrack(int Type, const char *lang)
{
if(Type >= 0 && Type < 64 &&
! m_DvdSpuTrack[Type]) {
m_DvdSpuTrack[Type] = true;
+ m_DvdSpuLang[Type][0] = 0;
+ if(lang)
+ strn0cpy(m_DvdSpuLang[Type], lang, 32);
m_DvdSpuTracks++;
return true;
}
diff --git a/device.h b/device.h
index 573841d8..562b80a7 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h,v 1.10 2006-08-25 04:03:11 phintuka Exp $
+ * $Id: device.h,v 1.11 2006-10-13 04:41:03 phintuka Exp $
*
*/
@@ -148,10 +148,12 @@ class cXinelibDevice : public cDevice
int m_DvdSpuTracks;
int m_CurrentDvdSpuTrack;
bool m_DvdSpuTrack[64];
- void ClrAvailableDvdSpuTracks(void);
- bool SetAvailableDvdSpuTrack(int Type);
+ char m_DvdSpuLang[64][64];
public:
+ void ClrAvailableDvdSpuTracks(void);
+ bool SetAvailableDvdSpuTrack(int Type, const char *lang = NULL);
+ const char *GetDvdSpuLang(int Type);
int NumDvdSpuTracks(void) const { return m_DvdSpuTracks; }
int GetCurrentDvdSpuTrack(void) { return m_CurrentDvdSpuTrack; }
bool SetCurrentDvdSpuTrack(int Type);