mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Some changes for LOCKING
This commit is contained in:
parent
82fb45a088
commit
2ed3344bb9
26
tvguideosd.c
26
tvguideosd.c
@ -73,15 +73,17 @@ void cTvGuideOsd::Show(void) {
|
|||||||
|
|
||||||
void cTvGuideOsd::drawOsd() {
|
void cTvGuideOsd::drawOsd() {
|
||||||
cPixmap::Lock();
|
cPixmap::Lock();
|
||||||
|
int numBack = tvguideConfig.numGrids / 2;
|
||||||
|
int offset = 0;
|
||||||
|
const cChannel *newStartChannel;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cChannel *startChannel = Channels->GetByNumber(cDevice::CurrentChannel());
|
const cChannel *startChannel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||||
#else
|
#else
|
||||||
cChannel *startChannel = Channels.GetByNumber(cDevice::CurrentChannel());
|
cChannel *startChannel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
#endif
|
#endif
|
||||||
int numBack = tvguideConfig.numGrids / 2;
|
newStartChannel = startChannel;
|
||||||
int offset = 0;
|
|
||||||
const cChannel *newStartChannel = startChannel;
|
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
for (; newStartChannel ; newStartChannel = Channels->Prev(newStartChannel)) {
|
for (; newStartChannel ; newStartChannel = Channels->Prev(newStartChannel)) {
|
||||||
#else
|
#else
|
||||||
@ -96,6 +98,7 @@ void cTvGuideOsd::drawOsd() {
|
|||||||
if (!newStartChannel)
|
if (!newStartChannel)
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
newStartChannel = Channels->First();
|
newStartChannel = Channels->First();
|
||||||
|
} //LOCK_CHANNELS_READ
|
||||||
#else
|
#else
|
||||||
newStartChannel = Channels.First();
|
newStartChannel = Channels.First();
|
||||||
#endif
|
#endif
|
||||||
@ -236,6 +239,7 @@ void cTvGuideOsd::channelForward() {
|
|||||||
if (!colRight) {
|
if (!colRight) {
|
||||||
const cChannel *channelRight = activeGrid->column->getChannel();
|
const cChannel *channelRight = activeGrid->column->getChannel();
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
while (channelRight = Channels->Next(channelRight)) {
|
while (channelRight = Channels->Next(channelRight)) {
|
||||||
#else
|
#else
|
||||||
@ -254,6 +258,9 @@ void cTvGuideOsd::channelForward() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
} //LOCK_CHANNELS_READ
|
||||||
|
#endif
|
||||||
if (colRight) {
|
if (colRight) {
|
||||||
colAdded = true;
|
colAdded = true;
|
||||||
if (columns.Count() == tvguideConfig.numGrids) {
|
if (columns.Count() == tvguideConfig.numGrids) {
|
||||||
@ -291,6 +298,7 @@ void cTvGuideOsd::channelBack() {
|
|||||||
if (!colLeft) {
|
if (!colLeft) {
|
||||||
const cChannel *channelLeft = activeGrid->column->getChannel();
|
const cChannel *channelLeft = activeGrid->column->getChannel();
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
while (channelLeft = Channels->Prev(channelLeft)) {
|
while (channelLeft = Channels->Prev(channelLeft)) {
|
||||||
#else
|
#else
|
||||||
@ -306,6 +314,9 @@ void cTvGuideOsd::channelBack() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
} //LOCK_CHANNELS_READ
|
||||||
|
#endif
|
||||||
if (colLeft) {
|
if (colLeft) {
|
||||||
colAdded = true;
|
colAdded = true;
|
||||||
if (columns.Count() == tvguideConfig.numGrids) {
|
if (columns.Count() == tvguideConfig.numGrids) {
|
||||||
@ -677,11 +688,14 @@ void cTvGuideOsd::CheckTimeout(void) {
|
|||||||
int newChannelNum = channelJumper->GetChannel();
|
int newChannelNum = channelJumper->GetChannel();
|
||||||
delete channelJumper;
|
delete channelJumper;
|
||||||
channelJumper = NULL;
|
channelJumper = NULL;
|
||||||
|
const cChannel *newChannel;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
const cChannel *newChannel = Channels->GetByNumber(newChannelNum);
|
newChannel = Channels->GetByNumber(newChannelNum);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
const cChannel *newChannel = Channels.GetByNumber(newChannelNum);
|
newChannel = Channels.GetByNumber(newChannelNum);
|
||||||
#endif
|
#endif
|
||||||
if (newChannel) {
|
if (newChannel) {
|
||||||
readChannels(newChannel);
|
readChannels(newChannel);
|
||||||
@ -767,7 +781,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
|
|||||||
void cTvGuideOsd::dump() {
|
void cTvGuideOsd::dump() {
|
||||||
esyslog("tvguide: ------Dumping Content---------");
|
esyslog("tvguide: ------Dumping Content---------");
|
||||||
activeGrid->debug();
|
activeGrid->debug();
|
||||||
int i=1;
|
// int i=1;
|
||||||
for (cChannelColumn *col = columns.First(); col; col = columns.Next(col)) {
|
for (cChannelColumn *col = columns.First(); col; col = columns.Next(col)) {
|
||||||
col->dumpGrids();
|
col->dumpGrids();
|
||||||
}
|
}
|
||||||
|
2
view.c
2
view.c
@ -121,7 +121,7 @@ void cView::DrawHeader(void) {
|
|||||||
//REC Icon
|
//REC Icon
|
||||||
eTimerMatch timerMatch=tmNone;
|
eTimerMatch timerMatch=tmNone;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
// LOCK_TIMERS_READ;
|
||||||
const cTimer *ti;
|
const cTimer *ti;
|
||||||
#else
|
#else
|
||||||
cTimer *ti;
|
cTimer *ti;
|
||||||
|
Loading…
Reference in New Issue
Block a user