Skip to content

Commit

Permalink
Merge branch 'master' into new-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Jun 4, 2011
2 parents 1045d8a + feafcfc commit cbc799c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions mythtv/libs/libmythtv/ringbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,9 @@ uint64_t RingBuffer::UpdateDecoderRate(uint64_t latest)
qint64 oldest = age - 1000;

decoderReadLock.lock();
if (latest)
decoderReads.insert(age, latest);

uint64_t total = 0;
QMutableMapIterator<qint64,uint64_t> it(decoderReads);
while (it.hasNext())
Expand All @@ -1270,9 +1273,6 @@ uint64_t RingBuffer::UpdateDecoderRate(uint64_t latest)
total += it.value();
}

if (latest)
decoderReads.insert(age, latest);

uint64_t average = (uint64_t)((double)total * 8.0);
decoderReadLock.unlock();

Expand All @@ -1293,6 +1293,9 @@ uint64_t RingBuffer::UpdateStorageRate(uint64_t latest)
qint64 oldest = age - 1000;

storageReadLock.lock();
if (latest)
storageReads.insert(age, latest);

uint64_t total = 0;
QMutableMapIterator<qint64,uint64_t> it(storageReads);
while (it.hasNext())
Expand All @@ -1304,9 +1307,6 @@ uint64_t RingBuffer::UpdateStorageRate(uint64_t latest)
total += it.value();
}

if (latest)
storageReads.insert(age, latest);

int size = storageReads.size();
storageReadLock.unlock();

Expand Down
5 changes: 4 additions & 1 deletion mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6900,7 +6900,6 @@ void TV::ToggleOSD(PlayerContext *ctx, bool includeStatusOSD)

void TV::ToggleOSDDebug(PlayerContext *ctx)
{
bool show = false;
OSD *osd = GetOSDLock(ctx);
if (osd && osd->IsWindowVisible("osd_debug"))
{
Expand Down Expand Up @@ -9501,6 +9500,8 @@ void TV::OSDDialogEvent(int result, QString text, QString action)
DoJumpRWND(actx);
else if (action.startsWith("DEINTERLACER"))
HandleDeinterlacer(actx, action);
else if (action == ACTION_TOGGLEOSDDEBUG)
ToggleOSDDebug(actx);
else if (action == "TOGGLEMANUALZOOM")
SetManualZoom(actx, true, tr("Zoom Mode ON"));
else if (action == "TOGGLESTRETCH")
Expand Down Expand Up @@ -10639,6 +10640,8 @@ void TV::FillOSDMenuPlayback(const PlayerContext *ctx, OSD *osd,
}
if (!db_browse_always)
osd->DialogAddButton(tr("Toggle Browse Mode"), "TOGGLEBROWSE");
osd->DialogAddButton(tr("Playback data"),
ACTION_TOGGLEOSDDEBUG, false, false);
}
else if (category == "TIMESTRETCH")
{
Expand Down

0 comments on commit cbc799c

Please sign in to comment.