mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Updated for vdr-1.7.12.
This commit is contained in:
parent
38f4d3d9b8
commit
60386835dd
3
HISTORY
3
HISTORY
@ -384,7 +384,8 @@ VDR Plugin 'femon' Revision History
|
|||||||
- Removed bitstream parsing from Receive() method.
|
- Removed bitstream parsing from Receive() method.
|
||||||
- Added Chinese translation (Thanks to NanFeng).
|
- Added Chinese translation (Thanks to NanFeng).
|
||||||
|
|
||||||
2009-xx-xx: Version 1.7.6
|
2010-02-01: Version 1.7.6
|
||||||
|
|
||||||
|
- Updated for vdr-1.7.12.
|
||||||
- Updated Estonian translation (Thanks to Arthur Konovalov).
|
- Updated Estonian translation (Thanks to Arthur Konovalov).
|
||||||
- Added Lithuanian translation (Thanks to Valdemaras Pipiras).
|
- Added Lithuanian translation (Thanks to Valdemaras Pipiras).
|
||||||
|
4
femon.c
4
femon.c
@ -14,8 +14,8 @@
|
|||||||
#include "femonservice.h"
|
#include "femonservice.h"
|
||||||
#include "femontools.h"
|
#include "femontools.h"
|
||||||
|
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM < 10700
|
#if defined(APIVERSNUM) && APIVERSNUM < 10712
|
||||||
#error "VDR-1.7.0 API version or greater is required!"
|
#error "VDR-1.7.12 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char VERSION[] = "1.7.6";
|
static const char VERSION[] = "1.7.6";
|
||||||
|
20
femonosd.c
20
femonosd.c
@ -575,8 +575,6 @@ void cFemonOsd::Action(void)
|
|||||||
void cFemonOsd::Show(void)
|
void cFemonOsd::Show(void)
|
||||||
{
|
{
|
||||||
debug("%s()\n", __PRETTY_FUNCTION__);
|
debug("%s()\n", __PRETTY_FUNCTION__);
|
||||||
int apid[2] = {0, 0};
|
|
||||||
int dpid[2] = {0, 0};
|
|
||||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||||
cString dev = cString::sprintf(FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
cString dev = cString::sprintf(FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
||||||
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
||||||
@ -621,9 +619,7 @@ void cFemonOsd::Show(void)
|
|||||||
if (femonConfig.analyzestream) {
|
if (femonConfig.analyzestream) {
|
||||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
if (channel) {
|
if (channel) {
|
||||||
IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
|
m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0));
|
||||||
IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
|
|
||||||
m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vtype(), channel->Vpid(), apid, dpid);
|
|
||||||
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -634,8 +630,6 @@ void cFemonOsd::Show(void)
|
|||||||
void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
||||||
{
|
{
|
||||||
debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber);
|
debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber);
|
||||||
int apid[2] = {0, 0};
|
|
||||||
int dpid[2] = {0, 0};
|
|
||||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||||
if (!device->IsPrimaryDevice() || !channelNumber || cDevice::PrimaryDevice()->CurrentChannel() != channelNumber)
|
if (!device->IsPrimaryDevice() || !channelNumber || cDevice::PrimaryDevice()->CurrentChannel() != channelNumber)
|
||||||
return;
|
return;
|
||||||
@ -668,9 +662,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
|||||||
if (femonConfig.analyzestream) {
|
if (femonConfig.analyzestream) {
|
||||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
if (channel) {
|
if (channel) {
|
||||||
IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
|
m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0));
|
||||||
IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
|
|
||||||
m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vtype(), channel->Vpid(), apid, dpid);
|
|
||||||
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -679,8 +671,6 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
|||||||
void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks)
|
void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks)
|
||||||
{
|
{
|
||||||
debug("%s()\n", __PRETTY_FUNCTION__);
|
debug("%s()\n", __PRETTY_FUNCTION__);
|
||||||
int apid[2] = {0, 0};
|
|
||||||
int dpid[2] = {0, 0};
|
|
||||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||||
if (m_Receiver) {
|
if (m_Receiver) {
|
||||||
m_Receiver->Deactivate();
|
m_Receiver->Deactivate();
|
||||||
@ -689,9 +679,7 @@ void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks)
|
|||||||
if (femonConfig.analyzestream) {
|
if (femonConfig.analyzestream) {
|
||||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
if (channel) {
|
if (channel) {
|
||||||
IS_AUDIO_TRACK(track) ? apid[0] = channel->Apid(int(track - ttAudioFirst)) : apid[0] = channel->Apid(0);
|
m_Receiver = new cFemonReceiver(channel->Vtype(), channel->Vpid(), channel->Apid(IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0), channel->Dpid(IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0));
|
||||||
IS_DOLBY_TRACK(track) ? dpid[0] = channel->Dpid(int(track - ttDolbyFirst)) : dpid[0] = channel->Dpid(0);
|
|
||||||
m_Receiver = new cFemonReceiver(channel->GetChannelID(), channel->Ca(), channel->Vtype(), channel->Vpid(), apid, dpid);
|
|
||||||
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -721,7 +709,7 @@ bool cFemonOsd::DeviceSwitch(int direction)
|
|||||||
cDevice::GetDevice(device)->SwitchChannel(channel, true);
|
cDevice::GetDevice(device)->SwitchChannel(channel, true);
|
||||||
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
|
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
|
||||||
cDevice::GetDevice(device)->ForceTransferMode();
|
cDevice::GetDevice(device)->ForceTransferMode();
|
||||||
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel->GetChannelID(), channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids()));
|
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
|
||||||
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number());
|
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number());
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,8 @@
|
|||||||
#include "femoncfg.h"
|
#include "femoncfg.h"
|
||||||
#include "femonreceiver.h"
|
#include "femonreceiver.h"
|
||||||
|
|
||||||
cFemonReceiver::cFemonReceiver(tChannelID ChannelID, int Ca, int Vtype, int Vpid, int Apid[], int Dpid[])
|
cFemonReceiver::cFemonReceiver(int Vtype, int Vpid, int Apid, int Dpid)
|
||||||
: cReceiver(ChannelID, -1, Vpid, Apid, Dpid, NULL),
|
: cThread("femon receiver"),
|
||||||
cThread("femon receiver"),
|
|
||||||
m_Mutex(),
|
m_Mutex(),
|
||||||
m_Sleep(),
|
m_Sleep(),
|
||||||
m_Active(false),
|
m_Active(false),
|
||||||
@ -27,18 +26,22 @@ cFemonReceiver::cFemonReceiver(tChannelID ChannelID, int Ca, int Vtype, int Vpid
|
|||||||
m_VideoBitrate(0.0),
|
m_VideoBitrate(0.0),
|
||||||
m_VideoValid(false),
|
m_VideoValid(false),
|
||||||
m_AudioBuffer(KILOBYTE(256), TS_SIZE, false, "Femon audio"),
|
m_AudioBuffer(KILOBYTE(256), TS_SIZE, false, "Femon audio"),
|
||||||
m_AudioPid(Apid[0]),
|
m_AudioPid(Apid),
|
||||||
m_AudioPacketCount(0),
|
m_AudioPacketCount(0),
|
||||||
m_AudioBitrate(0.0),
|
m_AudioBitrate(0.0),
|
||||||
m_AudioValid(false),
|
m_AudioValid(false),
|
||||||
m_AC3Buffer(KILOBYTE(256), TS_SIZE, false, "Femon AC3"),
|
m_AC3Buffer(KILOBYTE(256), TS_SIZE, false, "Femon AC3"),
|
||||||
m_AC3Pid(Dpid[0]),
|
m_AC3Pid(Dpid),
|
||||||
m_AC3PacketCount(0),
|
m_AC3PacketCount(0),
|
||||||
m_AC3Bitrate(0),
|
m_AC3Bitrate(0),
|
||||||
m_AC3Valid(false)
|
m_AC3Valid(false)
|
||||||
{
|
{
|
||||||
debug("%s()\n", __PRETTY_FUNCTION__);
|
debug("%s()\n", __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
|
AddPid(m_VideoPid);
|
||||||
|
AddPid(m_AudioPid);
|
||||||
|
AddPid(m_AC3Pid);
|
||||||
|
|
||||||
m_VideoBuffer.SetTimeouts(0, 100);
|
m_VideoBuffer.SetTimeouts(0, 100);
|
||||||
m_AudioBuffer.SetTimeouts(0, 100);
|
m_AudioBuffer.SetTimeouts(0, 100);
|
||||||
m_AC3Buffer.SetTimeouts(0, 100);
|
m_AC3Buffer.SetTimeouts(0, 100);
|
||||||
|
@ -106,7 +106,7 @@ public:
|
|||||||
m_AC3Info.lfe = onoff; }
|
m_AC3Info.lfe = onoff; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cFemonReceiver(tChannelID ChannelID, int Ca, int Vtype, int Vpid, int Apid[], int Dpid[]);
|
cFemonReceiver(int Vtype, int Vpid, int Apid, int Dpid);
|
||||||
virtual ~cFemonReceiver();
|
virtual ~cFemonReceiver();
|
||||||
void Deactivate(void);
|
void Deactivate(void);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user