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

Threads updated for vdr-1.3.29.

This commit is contained in:
Rolf Ahrenberg 2005-08-15 04:20:00 +03:00
parent 7c948cde72
commit 713f9e652a
7 changed files with 13 additions and 22 deletions

View File

@ -167,3 +167,7 @@ VDR Plugin 'femon' Revision History
- Fixed AC3-info flickering (Thanks to Pasi Juppo for reporting this one). - Fixed AC3-info flickering (Thanks to Pasi Juppo for reporting this one).
- Added "Analog" type CA system. - Added "Analog" type CA system.
- Plugin is now stripped by default. - Plugin is now stripped by default.
2005-08-15: Version 0.9.2
- Threads updated for vdr-1.3.29.

View File

@ -12,7 +12,7 @@
#include "femonosd.h" #include "femonosd.h"
#include "femon.h" #include "femon.h"
#if VDRVERSNUM && VDRVERSNUM < 10321 #if VDRVERSNUM && VDRVERSNUM < 10329
#error "You don't exist! Go away!" #error "You don't exist! Go away!"
#endif #endif

View File

@ -11,7 +11,7 @@
#include <vdr/plugin.h> #include <vdr/plugin.h>
static const char *VERSION = "0.9.1"; static const char *VERSION = "0.9.2";
static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)"; static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)";
static const char *MAINMENUENTRY = "Signal Information"; static const char *MAINMENUENTRY = "Signal Information";

View File

@ -87,7 +87,6 @@ cFemonOsd::cFemonOsd(void)
m_Osd = NULL; m_Osd = NULL;
m_Receiver = NULL; m_Receiver = NULL;
m_Frontend = -1; m_Frontend = -1;
m_Active = false;
m_Number = 0; m_Number = 0;
m_OldNumber = 0; m_OldNumber = 0;
m_Signal = 0; m_Signal = 0;
@ -110,8 +109,7 @@ cFemonOsd::cFemonOsd(void)
cFemonOsd::~cFemonOsd(void) cFemonOsd::~cFemonOsd(void)
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
if (m_Active) { if (Running()) {
m_Active = false;
Cancel(3); Cancel(3);
} }
if (m_Receiver) if (m_Receiver)
@ -847,8 +845,7 @@ void cFemonOsd::Action(void)
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
cTimeMs t; cTimeMs t;
m_Active = true; while (Running()) {
while (m_Active) {
t.Set(0); t.Set(0);
if (m_Frontend != -1) { if (m_Frontend != -1) {
CHECK(ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus)); CHECK(ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus));

View File

@ -21,7 +21,6 @@
class cFemonOsd : public cOsdObject, public cThread, public cStatus { class cFemonOsd : public cOsdObject, public cThread, public cStatus {
private: private:
bool m_Active;
cOsd *m_Osd; cOsd *m_Osd;
cFemonReceiver *m_Receiver; cFemonReceiver *m_Receiver;
int m_Frontend; int m_Frontend;

View File

@ -21,7 +21,6 @@ cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[])
:cReceiver(Ca, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver") :cReceiver(Ca, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver")
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
m_Active = false;
m_VideoPid = Vpid; m_VideoPid = Vpid;
m_AudioPid = Apid[0]; m_AudioPid = Apid[0];
m_AC3Pid = Dpid[0]; m_AC3Pid = Dpid[0];
@ -60,11 +59,9 @@ cFemonReceiver::~cFemonReceiver(void)
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
Detach(); Detach();
if (m_Active) { if (Running())
m_Active = false;
Cancel(); Cancel();
} }
}
/* The following function originates from libdvbmpeg: */ /* The following function originates from libdvbmpeg: */
void cFemonReceiver::GetVideoInfo(uint8_t *mbuf, int count) void cFemonReceiver::GetVideoInfo(uint8_t *mbuf, int count)
@ -253,15 +250,11 @@ void cFemonReceiver::GetAC3Info(uint8_t *mbuf, int count)
void cFemonReceiver::Activate(bool On) void cFemonReceiver::Activate(bool On)
{ {
Dprintf("%s(%d)\n", __PRETTY_FUNCTION__, On); Dprintf("%s(%d)\n", __PRETTY_FUNCTION__, On);
if (On) { if (On)
if (!m_Active)
Start(); Start();
} else
else if (m_Active) {
m_Active = false;
Cancel(); Cancel();
} }
}
void cFemonReceiver::Receive(uchar *Data, int Length) void cFemonReceiver::Receive(uchar *Data, int Length)
{ {
@ -309,8 +302,7 @@ void cFemonReceiver::Action(void)
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
cTimeMs t; cTimeMs t;
m_Active = true; while (Running()) {
while (m_Active) {
t.Set(0); t.Set(0);
// TS packet 188 bytes - 4 byte header; MPEG standard defines 1Mbit = 1000000bit // TS packet 188 bytes - 4 byte header; MPEG standard defines 1Mbit = 1000000bit
m_VideoBitrate = (8.0 * 184.0 * m_VideoPacketCount) / (femonConfig.calcinterval * 100000.0); m_VideoBitrate = (8.0 * 184.0 * m_VideoPacketCount) / (femonConfig.calcinterval * 100000.0);

View File

@ -53,7 +53,6 @@ enum eDolbySurroundMode {
class cFemonReceiver : public cReceiver, public cThread { class cFemonReceiver : public cReceiver, public cThread {
private: private:
bool m_Active;
int m_VideoPid; int m_VideoPid;
int m_AudioPid; int m_AudioPid;
int m_AC3Pid; int m_AC3Pid;