../../gdb/gdb-6.7/gdb/gdb /diskless/nfs/mvp/vompclient /diskless/nfs/mvp/core.*
debug2:
- ../../gdb/gdb-6.7/gdb/gdb /diskless/nfs/wmvp/vompclient /diskless/nfs/wmvp/core.*
+ ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev/core.*
dev: CXXFLAGS := $(CXXFLAGS_DEV)
dev: vompclient
vaudioplayer.o audioplayer.o demuxeraudio.o abstractoption.o \
eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o \
vvideolivetv.o \
- vvideolive.o vlivebanner.o playerlivetv.o playerliveradio.o
+ vvideolive.o vlivebanner.o playerlivetv.o playerliveradio.o \
+ wprogressbar.o
{
logger->log("PlayerLiveTV", Log::DEBUG, "Callback from demuxer");
- if (video->getTVsize() == Video::ASPECT4X3)
- {
- logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching");
- return;
- }
-
int dxCurrentAspect = demuxer->getAspectRatio();
if (dxCurrentAspect == Demuxer::ASPECT_4_3)
{
- logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 4:3 aspect, switching TV");
- video->setAspectRatio(Video::ASPECT4X3);
+ if (video->getTVsize() == Video::ASPECT16X9)
+ {
+ logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 4:3 aspect, switching TV");
+ video->setAspectRatio(Video::ASPECT4X3);
+ }
+ else
+ {
+ logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching");
+ }
Message* m = new Message();
m->from = this;
}
else if (dxCurrentAspect == Demuxer::ASPECT_16_9)
{
- logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 16:9 aspect, switching TV");
- video->setAspectRatio(Video::ASPECT16X9);
+ if (video->getTVsize() == Video::ASPECT16X9)
+ {
+ logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 16:9 aspect, switching TV");
+ video->setAspectRatio(Video::ASPECT16X9);
+ }
+ else
+ {
+ logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching");
+ }
Message* m = new Message();
m->from = this;
{
++preBufferCount;
ULONG percentDone = (ULONG)(preBufferCount / (float)preBufferAmount * 100);
+ logger->log("PlayerLiveTV", Log::DEBUG, "Prebuffering %lu%%", percentDone);
Message* m = new Message();
m->from = this;
bool videoStartup;
bool stopNow;
int preBufferCount;
- const static int preBufferAmount = 3;
+ const static int preBufferAmount = 10;
void clearStreamChunks();
void chunkToDemuxer();
ac->pestype = channel->apids[i].pid;
acl.push_back(ac);
}
- if (Audio::getInstance()->supportsAc3()) {
- for (UINT i = 0; i < channel->numDPids; i++)
- {
- AudioChannel* ac = new AudioChannel();
- ac->type = 1;
- ac->name = new char[strlen(channel->dpids[i].name) + 1];
- strcpy(ac->name, channel->dpids[i].name);
- ac->pestype = channel->dpids[i].pid;
- acl.push_back(ac);
- }
+
+ if (Audio::getInstance()->supportsAc3())
+ {
+ for (UINT i = 0; i < channel->numDPids; i++)
+ {
+ AudioChannel* ac = new AudioChannel();
+ ac->type = 1;
+ ac->name = new char[strlen(channel->dpids[i].name) + 1];
+ strcpy(ac->name, channel->dpids[i].name);
+ ac->pestype = channel->dpids[i].pid;
+ acl.push_back(ac);
+ }
}
int audioChannelListSize = acl.size();
sAspectRatio.setVisible(false);
osd.add(&sAspectRatio);
+ bufferBar.setPosition(osd.getWidth() - 94, 70);
+ bufferBar.setSize(50, 20);
+ bufferBar.setVisible(true);
+ osd.add(&bufferBar);
+
// FIXME painful
Region r1 = summary.getRegionR();
Region r2 = osd.getRegionR();
if (newNowNextData)
{
setNowNextData();
- keying = 0;
+ keying = 0;
}
osd.draw();
player->setChannel(currentChannelIndex);
Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Done Set player to channel %u", currentChannelIndex);
+ // Blank out the symbols
+ sAspectRatio.setVisible(false);
+ bufferBar.setPercent(0);
+
return true;
}
case PlayerLiveTV::ASPECT43:
{
- if (dowss)
+ if ((video->getTVsize() == Video::ASPECT16X9) && dowss)
{
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");
wss.setWide(false);
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43;
sAspectRatio.setVisible(true);
- osd.draw();
- BoxStack::getInstance()->update(this, osd.getRegion());
+
+ if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
+ {
+ osd.draw();
+ BoxStack::getInstance()->update(this, osd.getRegion());
+ }
break;
}
case PlayerLiveTV::ASPECT169:
{
- if (dowss)
+ if ((video->getTVsize() == Video::ASPECT16X9) && dowss)
{
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");
wss.setWide(true);
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169;
sAspectRatio.setVisible(true);
- osd.draw();
- BoxStack::getInstance()->update(this, osd.getRegion());
+
+ if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
+ {
+ osd.draw();
+ BoxStack::getInstance()->update(this, osd.getRegion());
+ }
break;
}
case PlayerLiveTV::PREBUFFERING:
{
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Prebuffering - %u", m->tag);
+ bufferBar.setVisible(true);
+ bufferBar.setPercent(m->tag);
+ bufferBar.draw();
+
+ if (osd.getVisible())
+ {
+ Region r;
+ bufferBar.getRootBoxRegion(&r);
+ BoxStack::getInstance()->update(this, &r);
+ }
}
}
}
#include "wselectlist.h"
#include "timerreceiver.h"
#include "wsymbol.h"
+#include "wprogressbar.h"
class VChannelList;
class Video;
WTextbox textYellow;
WTextbox textBlue;
WSymbol sAspectRatio;
+ WProgressBar bufferBar;
Boxx summary;
WTextbox textSummary;
--- /dev/null
+/*
+ Copyright 2008 Chris Tallon
+
+ This file is part of VOMP.
+
+ VOMP is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ VOMP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with VOMP; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "wprogressbar.h"
+
+#include "colour.h"
+
+WProgressBar::WProgressBar()
+{
+ percent = 0;
+}
+
+WProgressBar::~WProgressBar()
+{
+}
+
+void WProgressBar::setPercent(UINT tpercent)
+{
+ percent = tpercent;
+ if (percent > 100) percent = 0;
+}
+
+void WProgressBar::draw()
+{
+ if (area.w < 5) return;
+ if (area.h < 5) return;
+
+ printf("progress bar: %u\n", percent);
+
+ // Hmm, can't draw two boxes because should not paint on areas
+ // not needing it - this class does not know the background colour
+
+ rectangle(0, 0, area.w, 2, Colour::LIGHTTEXT); // top
+ rectangle(0, area.h - 2, area.w, 2, Colour::LIGHTTEXT); // bottom
+ rectangle(0, 0, 2, area.h, Colour::LIGHTTEXT); // left
+ rectangle(area.w - 2, 0, 2, area.h, Colour::LIGHTTEXT); // right
+
+ int progressWidth = (int)((area.w - 4) * (float)percent / 100);
+ rectangle(2, 2, progressWidth, area.h - 4, Colour::SELECTHIGHLIGHT);
+}
+
--- /dev/null
+/*
+ Copyright 2008 Chris Tallon
+
+ This file is part of VOMP.
+
+ VOMP is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ VOMP is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with VOMP; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/*
+For now this will be a simple progress bar, but in future maybe the
+recording playback bar could be rolled into this class
+*/
+
+#ifndef WPROGRESSBAR_H
+#define WPROGRESSBAR_H
+
+#include <stdio.h>
+#include <string.h>
+
+#include "defines.h"
+#include "boxx.h"
+
+class WProgressBar : public Boxx
+{
+ public:
+ WProgressBar();
+ ~WProgressBar();
+ void setPercent(UINT percent);
+ void draw();
+
+ private:
+ UINT percent;
+};
+
+#endif
+