1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Updated for vdr-1.3.19.

This commit is contained in:
Rolf Ahrenberg 2005-01-23 04:20:00 +02:00
parent 995b2567e5
commit ab3f270eed
6 changed files with 26 additions and 19 deletions

View File

@ -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.

View File

@ -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

View File

@ -11,7 +11,7 @@
#include <vdr/plugin.h>
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";

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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