mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Optimized receiver thread termination.
This commit is contained in:
parent
0b19b7b31d
commit
1570cf80f8
1
HISTORY
1
HISTORY
@ -302,3 +302,4 @@ VDR Plugin 'femon' Revision History
|
||||
2008-xx-xx: Version 1.6.2
|
||||
|
||||
- Converted HISTORY and fi_FI.po to UTF-8.
|
||||
- Optimized receiver thread termination.
|
||||
|
@ -58,6 +58,7 @@ cFemonReceiver::cFemonReceiver(tChannelID ChannelID, int Ca, int Vpid, int Apid[
|
||||
cFemonReceiver::~cFemonReceiver(void)
|
||||
{
|
||||
Dprintf("%s()\n", __PRETTY_FUNCTION__);
|
||||
m_Sleep.Signal();
|
||||
if (Running())
|
||||
Cancel(3);
|
||||
Detach();
|
||||
@ -362,6 +363,6 @@ void cFemonReceiver::Action(void)
|
||||
m_AudioPacketCount = 0;
|
||||
m_AC3Bitrate = (10.0 * 8.0 * 184.0 * m_AC3PacketCount) / femonConfig.calcinterval;
|
||||
m_AC3PacketCount = 0;
|
||||
cCondWait::SleepMs(100 * femonConfig.calcinterval - t.Elapsed());
|
||||
m_Sleep.Wait(max((int)(100 * femonConfig.calcinterval - t.Elapsed()), 3));
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ enum eDolbySurroundMode {
|
||||
DSM_RESERVED = 3,
|
||||
};
|
||||
|
||||
enum eReveiverCodes {
|
||||
enum eReceiverCodes {
|
||||
FR_RESERVED = -1,
|
||||
FR_FREE = -2,
|
||||
FR_NOTVALID = -3
|
||||
@ -55,6 +55,7 @@ enum eReveiverCodes {
|
||||
|
||||
class cFemonReceiver : public cReceiver, public cThread {
|
||||
private:
|
||||
cCondWait m_Sleep;
|
||||
int m_VideoPid;
|
||||
int m_AudioPid;
|
||||
int m_AC3Pid;
|
||||
|
Loading…
Reference in New Issue
Block a user