diff --git a/HISTORY b/HISTORY index 7a821c8..c1fa328 100644 --- a/HISTORY +++ b/HISTORY @@ -122,3 +122,7 @@ VDR Plugin 'femon' Revision History 2005-01-23: Version 0.7.9 - Some minor cosmetic fixes. + +2005-01-23: Version 0.8.0 + +- Updated for vdr-1.3.19. diff --git a/femon.c b/femon.c index ee3b4fa..0d5e248 100644 --- a/femon.c +++ b/femon.c @@ -12,7 +12,7 @@ #include "femonosd.h" #include "femon.h" -#if VDRVERSNUM && VDRVERSNUM < 10318 +#if VDRVERSNUM && VDRVERSNUM < 10319 #error "You don't exist! Go away!" #endif diff --git a/femon.h b/femon.h index 375a913..2edead6 100644 --- a/femon.h +++ b/femon.h @@ -11,7 +11,7 @@ #include -static const char *VERSION = "0.7.9"; +static const char *VERSION = "0.8.0"; static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)"; static const char *MAINMENUENTRY = "Signal Information"; diff --git a/femonosd.c b/femonosd.c index 4506b1d..abfbf42 100644 --- a/femonosd.c +++ b/femonosd.c @@ -842,7 +842,8 @@ void cFemonOsd::Action(void) void cFemonOsd::Show(void) { debug(printf("cFemonOsd::Show()\n")); - int apid = 0, dpid = 0; + int apid[2] = {0, 0}; + int dpid[2] = {0, 0}; char *dev = NULL; eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); asprintf(&dev, FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0); @@ -876,10 +877,10 @@ void cFemonOsd::Show(void) if (m_Receiver) delete m_Receiver; if (femonConfig.analyzestream) { - if (IS_AUDIO_TRACK(track)) apid = int(track - ttAudioFirst); - else if (IS_DOLBY_TRACK(track)) dpid = int(track - ttDolbyFirst); cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), channel->Apid(apid), channel->Dpid(dpid)); + IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0); + IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0); + m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid); cDevice::ActualDevice()->AttachReceiver(m_Receiver); } Start(); @@ -889,7 +890,8 @@ void cFemonOsd::Show(void) void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber) { debug(printf("cFemonOsd::ChannelSwitch()\n")); - int apid = 0, dpid = 0; + int apid[2] = {0, 0}; + int dpid[2] = {0, 0}; char *dev = NULL; eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); if (!device->IsPrimaryDevice() || !channelNumber || cDevice::PrimaryDevice()->CurrentChannel() != channelNumber) @@ -912,10 +914,10 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber) if (m_Receiver) delete m_Receiver; if (femonConfig.analyzestream) { - if (IS_AUDIO_TRACK(track)) apid = int(track - ttAudioFirst); - else if (IS_DOLBY_TRACK(track)) dpid = int(track - ttDolbyFirst); cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), channel->Apid(apid), channel->Dpid(dpid)); + IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0); + IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0); + m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid); cDevice::ActualDevice()->AttachReceiver(m_Receiver); } } @@ -923,15 +925,16 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber) void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks) { debug(printf("cFemonOsd::SetAudioTrack()\n")); - int apid = 0, dpid = 0; + int apid[2] = {0, 0}; + int dpid[2] = {0, 0}; eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); if (m_Receiver) delete m_Receiver; if (femonConfig.analyzestream) { - if (IS_AUDIO_TRACK(track)) apid = int(track - ttAudioFirst); - else if (IS_DOLBY_TRACK(track)) dpid = int(track - ttDolbyFirst); cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); - m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), channel->Apid(apid), channel->Dpid(dpid)); + IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0); + IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0); + m_Receiver = new cFemonReceiver(channel->Ca(), channel->Vpid(), apid, dpid); cDevice::ActualDevice()->AttachReceiver(m_Receiver); } } diff --git a/femonreceiver.c b/femonreceiver.c index 0ffb14c..85f6b94 100644 --- a/femonreceiver.c +++ b/femonreceiver.c @@ -17,14 +17,14 @@ #define PAYLOAD 0x10 #define PTS_DTS_FLAGS 0xC0 -cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid, int Dpid) -:cReceiver(Ca, -1, 3, Vpid, Apid, Dpid), cThread("femon receiver") +cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[]) +:cReceiver(Ca, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver") { debug(printf("cFemonReceiver::cFemonReceiver()\n")); m_Active = false; m_VideoPid = Vpid; - m_AudioPid = Apid; - m_AC3Pid = Dpid; + m_AudioPid = Apid[0]; + m_AC3Pid = Dpid[0]; m_VideoValid = false; m_VideoPacketCount = 0; m_VideoHorizontalSize = 0; diff --git a/femonreceiver.h b/femonreceiver.h index 1b0b117..4659584 100644 --- a/femonreceiver.h +++ b/femonreceiver.h @@ -95,7 +95,7 @@ protected: virtual void Action(void); public: - cFemonReceiver(int Ca, int Vpid, int Apid, int Dpid); + cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[]); virtual ~cFemonReceiver(); bool VideoValid(void) { return m_VideoValid; }; // boolean