Added getVideoStream() and getAudioStream() functions.

This commit is contained in:
Rolf Ahrenberg 2008-11-11 00:30:00 +02:00
parent 99244a136e
commit 6eb4329fff
3 changed files with 25 additions and 2 deletions

View File

@ -367,7 +367,7 @@ void cFemonOsd::DrawInfoWindow(void)
case eFemonModeStream:
OSDDRAWINFOTITLEBAR(tr("Stream Information"));
offset += OSDROWHEIGHT;
OSDDRAWINFOACTIVE( tr("Video Stream"), *cString::sprintf("#%d", channel->Vpid()));
OSDDRAWINFOACTIVE( tr("Video Stream"), *getVideoStream(channel->Vpid()));
offset += OSDROWHEIGHT;
OSDDRAWINFOINACTIVE(tr("Codec"), *getVideoCodec(m_Receiver ? m_Receiver->VideoCodec() : VIDEO_CODEC_INVALID));
offset += OSDROWHEIGHT;
@ -381,7 +381,7 @@ void cFemonOsd::DrawInfoWindow(void)
offset += OSDROWHEIGHT;
OSDDRAWINFOINACTIVE(tr("Resolution"), *getResolution(m_Receiver ? m_Receiver->VideoHorizontalSize() : 0, m_Receiver ? m_Receiver->VideoVerticalSize() : 0, m_Receiver ? m_Receiver->VideoScan() : VIDEO_SCAN_INVALID));
offset += OSDROWHEIGHT;
OSDDRAWINFOACTIVE( tr("Audio Stream"), *cString::sprintf("#%d (%s)", IS_AUDIO_TRACK(track) ? channel->Apid(int(track - ttAudioFirst)) : channel->Apid(0), IS_AUDIO_TRACK(track) ? channel->Alang(int(track - ttAudioFirst)) : channel->Alang(0)));
OSDDRAWINFOACTIVE( tr("Audio Stream"), *getAudioStream(track, channel));
offset += OSDROWHEIGHT;
OSDDRAWINFOINACTIVE(tr("Codec"), *getAudioCodec(m_Receiver ? m_Receiver->AudioCodec() : AUDIO_CODEC_INVALID));
offset += OSDROWHEIGHT;

View File

@ -199,6 +199,27 @@ cString getCA(int value)
return cString::sprintf("%X", value);
}
cString getVideoStream(int value)
{
if (value != 0)
return cString::sprintf("#%d", value);
return cString::sprintf("---");
}
cString getAudioStream(int value, const cChannel *channel)
{
int pid = 0;
if (IS_AUDIO_TRACK(value))
pid = int(value - ttAudioFirst);
if (channel && channel->Apid(pid)) {
if (channel->Alang(pid))
return cString::sprintf("#%d (%s)", channel->Apid(pid), channel->Alang(pid));
else
return cString::sprintf("#%d", channel->Apid(pid));
}
return cString::sprintf("---");
}
cString getVideoCodec(int value)
{
switch (value) {

View File

@ -37,7 +37,9 @@ cString getDpids(const cChannel *channel);
cString getSpids(const cChannel *channel);
cString getCAids(const cChannel *channel, bool identify = false);
cString getCA(int value);
cString getVideoStream(int value);
cString getVideoCodec(int value);
cString getAudioStream(int value, const cChannel *channel);
cString getAudioCodec(int value);
cString getAudioChannelMode(int value);
cString getCoderate(int value);