mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Threads updated for vdr-1.3.29.
This commit is contained in:
parent
7c948cde72
commit
713f9e652a
4
HISTORY
4
HISTORY
@ -167,3 +167,7 @@ VDR Plugin 'femon' Revision History
|
||||
- Fixed AC3-info flickering (Thanks to Pasi Juppo for reporting this one).
|
||||
- Added "Analog" type CA system.
|
||||
- Plugin is now stripped by default.
|
||||
|
||||
2005-08-15: Version 0.9.2
|
||||
|
||||
- Threads updated for vdr-1.3.29.
|
||||
|
2
femon.c
2
femon.c
@ -12,7 +12,7 @@
|
||||
#include "femonosd.h"
|
||||
#include "femon.h"
|
||||
|
||||
#if VDRVERSNUM && VDRVERSNUM < 10321
|
||||
#if VDRVERSNUM && VDRVERSNUM < 10329
|
||||
#error "You don't exist! Go away!"
|
||||
#endif
|
||||
|
||||
|
2
femon.h
2
femon.h
@ -11,7 +11,7 @@
|
||||
|
||||
#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 *MAINMENUENTRY = "Signal Information";
|
||||
|
||||
|
@ -87,7 +87,6 @@ cFemonOsd::cFemonOsd(void)
|
||||
m_Osd = NULL;
|
||||
m_Receiver = NULL;
|
||||
m_Frontend = -1;
|
||||
m_Active = false;
|
||||
m_Number = 0;
|
||||
m_OldNumber = 0;
|
||||
m_Signal = 0;
|
||||
@ -110,8 +109,7 @@ cFemonOsd::cFemonOsd(void)
|
||||
cFemonOsd::~cFemonOsd(void)
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
if (m_Active) {
|
||||
m_Active = false;
|
||||
if (Running()) {
|
||||
Cancel(3);
|
||||
}
|
||||
if (m_Receiver)
|
||||
@ -847,8 +845,7 @@ void cFemonOsd::Action(void)
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
cTimeMs t;
|
||||
m_Active = true;
|
||||
while (m_Active) {
|
||||
while (Running()) {
|
||||
t.Set(0);
|
||||
if (m_Frontend != -1) {
|
||||
CHECK(ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus));
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
class cFemonOsd : public cOsdObject, public cThread, public cStatus {
|
||||
private:
|
||||
bool m_Active;
|
||||
cOsd *m_Osd;
|
||||
cFemonReceiver *m_Receiver;
|
||||
int m_Frontend;
|
||||
|
@ -21,7 +21,6 @@ cFemonReceiver::cFemonReceiver(int Ca, int Vpid, int Apid[], int Dpid[])
|
||||
:cReceiver(Ca, -1, Vpid, Apid, Dpid, NULL), cThread("femon receiver")
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
m_Active = false;
|
||||
m_VideoPid = Vpid;
|
||||
m_AudioPid = Apid[0];
|
||||
m_AC3Pid = Dpid[0];
|
||||
@ -60,10 +59,8 @@ cFemonReceiver::~cFemonReceiver(void)
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
Detach();
|
||||
if (m_Active) {
|
||||
m_Active = false;
|
||||
if (Running())
|
||||
Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
/* The following function originates from libdvbmpeg: */
|
||||
@ -253,14 +250,10 @@ void cFemonReceiver::GetAC3Info(uint8_t *mbuf, int count)
|
||||
void cFemonReceiver::Activate(bool On)
|
||||
{
|
||||
Dprintf("%s(%d)\n", __PRETTY_FUNCTION__, On);
|
||||
if (On) {
|
||||
if (!m_Active)
|
||||
Start();
|
||||
}
|
||||
else if (m_Active) {
|
||||
m_Active = false;
|
||||
if (On)
|
||||
Start();
|
||||
else
|
||||
Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void cFemonReceiver::Receive(uchar *Data, int Length)
|
||||
@ -309,8 +302,7 @@ void cFemonReceiver::Action(void)
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
cTimeMs t;
|
||||
m_Active = true;
|
||||
while (m_Active) {
|
||||
while (Running()) {
|
||||
t.Set(0);
|
||||
// TS packet 188 bytes - 4 byte header; MPEG standard defines 1Mbit = 1000000bit
|
||||
m_VideoBitrate = (8.0 * 184.0 * m_VideoPacketCount) / (femonConfig.calcinterval * 100000.0);
|
||||
|
@ -53,7 +53,6 @@ enum eDolbySurroundMode {
|
||||
|
||||
class cFemonReceiver : public cReceiver, public cThread {
|
||||
private:
|
||||
bool m_Active;
|
||||
int m_VideoPid;
|
||||
int m_AudioPid;
|
||||
int m_AC3Pid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user