Merge branch 'master' into plugininterface

This commit is contained in:
louis 2015-02-01 14:48:28 +01:00
commit 00ac852820
6 changed files with 63 additions and 28 deletions

View File

@ -198,3 +198,6 @@ Version 0.2.1
changes of setup parameters are immediately in use
Version 0.2.2
- added replay onpause view in blackhole skin
- implemented SetTitle() in displayreplay

View File

@ -24,13 +24,19 @@ cSDDisplayReplay::~cSDDisplayReplay() {
}
void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
if (!doOutput)
if (!doOutput || !Recording)
return;
replayView->DrawTitle(Recording);
replayView->DrawRecordingInformation(Recording);
replayView->DrawScraperContent(Recording);
}
void cSDDisplayReplay::SetTitle(const char *Title) {
if (!doOutput || !Title)
return;
replayView->DrawTitle(Title);
}
void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
if (!doOutput)
return;

View File

@ -17,7 +17,7 @@ public:
cSDDisplayReplay(cTemplate *replayTemplate, bool ModeOnly);
virtual ~cSDDisplayReplay();
virtual void SetRecording(const cRecording *Recording);
virtual void SetTitle(const char *Title) {};
virtual void SetTitle(const char *Title);
virtual void SetMode(bool Play, bool Forward, int Speed);
virtual void SetProgress(int Current, int Total);
virtual void SetCurrent(const char *Current);

View File

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE displayreplay SYSTEM "../../../dtd/displayreplay.dtd">
<displayreplay x="0" y="70%" width="100%" height="30%" fadetime="{fadetime}">
<displayreplay x="0" y="0" width="100%" height="100%" fadetime="{fadetime}">
<background>
<!-- global background -->
<area x="0" y="0" width="100%" height="100%" layer="1">
<area x="0" y="70%" width="100%" height="30%" layer="2">
<drawimage imagetype="skinpart" path="displaychannelback" x="0" y="0" width="100%" height="100%"/>
</area>
<!-- progressbar background -->
<area x="17%" y="36%" width="67%" height="40%" layer="2">
<area x="17%" y="81%" width="67%" height="12%" layer="3">
<drawimage imagetype="skinpart" path="displaychannelbackepg" x="0" y="0" width="100%" height="100%"/>
</area>
<area x="18%" y="45%" width="65%" height="8%" layer="3">
<area x="18%" y="84%" width="65%" height="{areaheight}*0.024" layer="4">
<drawimage imagetype="skinpart" path="progressbarback_replay" x="0" y="0" width="100%" height="100%"/>
</area>
<!-- watch background -->
<area x="86%" y="20%" width="{areaheight}*0.6" height="{areaheight}*0.6" layer="2">
<area x="86%" y="76%" width="{areaheight}*0.18" height="{areaheight}*0.18" layer="3">
<drawimage imagetype="skinpart" path="watchback" x="0" y="0" width="100%" height="100%"/>
</area>
</background>
<backgroundmodeonly>
<area x="{areawidth}/2 - 2.5*{areaheight}*0.3" y="40%" width="5*{areaheight}*0.3" height="30%" layer="3">
<area x="{areawidth}/2 - 2.5*{areaheight}*0.1" y="82%" width="5*{areaheight}*0.1" height="10%" layer="2">
<fill color="{clrBlackTrans}" />
</area>
</backgroundmodeonly>
@ -39,10 +39,10 @@
{year} year in yyyy
-->
<datetime>
<area x="86%" y="5%" width="{areaheight}*0.6" height="14%" layer="3">
<area x="86%" y="70%" width="{areaheight}*0.18" height="5%" layer="4">
<drawtext align="center" y="0" font="{semibold}" fontsize="100%" color="{clrWhite}" text="{daynameshort} {day}.{month}" />
</area>
<area x="86%" y="80%" width="{areaheight}*0.6" height="16%" layer="3">
<area x="86%" y="94%" width="{areaheight}*0.18" height="5%" layer="4">
<drawtext align="center" y="0" font="{digital}" fontsize="100%" color="{clrWhite}" text="{time}" />
</area>
</datetime>
@ -54,13 +54,13 @@
{hmins} current "hourminutes" to display an hour hand
-->
<time>
<area x="86%" y="20%" width="{areaheight}*0.6" height="{areaheight}*0.6" layer="5">
<area x="86%" y="76%" width="{areaheight}*0.18" height="{areaheight}*0.18" layer="6">
<drawimage imagetype="skinpart" path="watchhands/s_{sec}" x="0" y="0" width="100%" height="100%"/>
</area>
<area x="86%" y="20%" width="{areaheight}*0.6" height="{areaheight}*0.6" layer="4">
<area x="86%" y="76%" width="{areaheight}*0.18" height="{areaheight}*0.18" layer="5">
<drawimage imagetype="skinpart" path="watchhands/m_{min}" x="0" y="0" width="100%" height="100%"/>
</area>
<area x="86%" y="20%" width="{areaheight}*0.6" height="{areaheight}*0.6" layer="3">
<area x="86%" y="76%" width="{areaheight}*0.18" height="{areaheight}*0.18" layer="4">
<drawimage imagetype="skinpart" path="watchhands/h_{hmins}" x="0" y="0" width="100%" height="100%"/>
</area>
</time>
@ -82,10 +82,10 @@
{isbanner} true if image is a banner, false if it is a poster
-->
<scrapercontent>
<area condition="{hasposter}" x="1%" y="15%" width="{areaheight}*0.7*{posterwidth}/{posterheight}" height="70%" layer="2">
<area condition="{hasposter}" x="1%" y="75%" width="{areaheight}*0.21*{posterwidth}/{posterheight}" height="21%" layer="3">
<drawimage imagetype="image" path="{posterpath}" x="0" y="0" width="100%" height="100%"/>
</area>
<area condition="not{hasposter}" x="1%" y="15%" width="14%" height="70%" layer="2">
<area condition="not{hasposter}" x="1%" y="75%" width="14%" height="21%" layer="3">
<drawimage imagetype="icon" path="ico_recording" x="0" y="0" width="100%" height="100%"/>
</area>
</scrapercontent>
@ -97,7 +97,7 @@
{rectime} Time of Recording in hh:mm
-->
<rectitle>
<area x="17%" y="16%" width="67%" height="18%" layer="2">
<area x="17%" y="75%" width="67%" height="6%" layer="3">
<drawtext x="0" y="0" font="{semibold}" width="100%" fontsize="100%" color="{clrWhite}" text="{rectitle} - {recsubtitle}" />
</area>
</rectitle>
@ -111,7 +111,7 @@
{isWideScreen} true if aspect is 16:9 or 21:9
-->
<recinfo>
<area x="17%" y="80%" width="67%" height="15%" layer="4">
<area x="17%" y="94%" width="67%" height="5%" layer="5">
<drawimage imagetype="icon" path="ico_{resolution}" x="0" y="0" width="{areaheight}*3" height="{areaheight}"/>
<drawimage condition="{isWideScreen}" imagetype="icon" path="ico_widescreen" x="{areaheight}*3 + 10" y="0" width="{areaheight}*3" height="{areaheight}"/>
</area>
@ -121,7 +121,7 @@
{reccurrent} Current Time in hh:mm:ss
-->
<currenttime>
<area x="18%" y="61%" width="30%" height="15%" layer="3">
<area x="18%" y="88%" width="30%" height="5%" layer="4">
<drawtext x="0" valign="center" font="{digital}" fontsize="80%" color="{clrWhite}" text="{reccurrent}" />
</area>
</currenttime>
@ -130,7 +130,7 @@
{rectotal} Total Time in hh:mm:ss
-->
<totaltime>
<area x="54%" y="61%" width="29%" height="15%" layer="3">
<area x="54%" y="88%" width="29%" height="5%" layer="4">
<drawtext align="right" valign="center" font="{digital}" fontsize="80%" color="{clrWhite}" text="{rectotal}" />
</area>
</totaltime>
@ -140,7 +140,7 @@
{total} total frames of recording
-->
<progressbar>
<area x="18%" y="45%" width="65%" height="8%" layer="4">
<area x="18%" y="84%" width="65%" height="{areaheight}*0.024" layer="5">
<drawimage imagetype="skinpart" path="progressbar" x="2" y="2" width="{current}/{total}*{areawidth} - {current}/{total}*4" height="{areaheight}-4"/>
</area>
</progressbar>
@ -154,7 +154,7 @@
{marks[startmark]} true if mark is start mark
-->
<cutmarks>
<area x="18%" y="43%" width="65%" height="12%" layer="5" transparency="40">
<area x="18%" y="83%" width="65%" height="{areaheight}*0.044" layer="6" transparency="40">
<loop name="marks" x="0" y="0" orientation="absolute">
<!-- draw mark -->
<drawimage condition="{marks[startmark]}" imagetype="icon" path="ico_cutmark_start" x="{marks[position]}/{marks[total]}*{areawidth} - {areaheight}/3" y="0" width="{areaheight}/3" height="{areaheight}" />
@ -178,7 +178,7 @@
{rewind3x} true if rewinding 3x (with 3 trickspeeds)
-->
<controlicons>
<area x="67%" y="1%" width="25%" height="20%" layer="3">
<area x="67%" y="70%" width="25%" height="6%" layer="4">
<drawimage condition="not{rewind} ++ not{rewind1x} ++ not{rewind2x} ++ not{rewind3x}" imagetype="icon" path="ico_back_inactive" x="0" y="0" width="{areaheight}" height="{areaheight}"/>
<drawimage condition="{rewind}" imagetype="icon" path="ico_back_active" x="{areaheight}" y="0" width="{areaheight}" height="{areaheight}"/>
<drawimage condition="{rewind1x}" imagetype="icon" path="ico_back_active_x1" x="0" y="0" width="{areaheight}" height="{areaheight}"/>
@ -200,7 +200,7 @@
</controlicons>
<controliconsmodeonly>
<area x="{areawidth}/2 - 2*{areaheight}*0.3" y="40%" width="4*{areaheight}*0.3" height="30%" layer="3">
<area x="{areawidth}/2 - 2*{areaheight}*0.1" y="82%" width="4*{areaheight}*0.1" height="10%" layer="3">
<drawimage condition="not{rewind} ++ not{rewind1x} ++ not{rewind2x} ++ not{rewind3x}" imagetype="icon" path="ico_back_inactive" x="0" y="0" width="{areaheight}" height="{areaheight}"/>
<drawimage condition="{rewind}" imagetype="icon" path="ico_back_active" x="{areaheight}" y="0" width="{areaheight}" height="{areaheight}"/>
<drawimage condition="{rewind1x}" imagetype="icon" path="ico_back_active_x1" x="0" y="0" width="{areaheight}" height="{areaheight}"/>
@ -225,7 +225,7 @@
{jump} time to jump to in hh:mm
-->
<jump>
<area x="50%" y="80%" width="30%" height="20%" layer="3">
<area x="50%" y="94%" width="30%" height="6%" layer="4">
<drawtext align="right" valign="center" font="{digital}" fontsize="60%" color="{clrWhite}" text="{jump}" />
</area>
</jump>
@ -237,13 +237,13 @@
{error} true if message is a error message
-->
<message>
<area x="5%" y="25%" width="90%" height="50%" layer="6">
<area x="5%" y="78%" width="90%" height="15%" layer="6">
<drawimage condition="{status}" imagetype="skinpart" path="messageblue" x="0" y="0" width="100%" height="100%" />
<drawimage condition="{info}" imagetype="skinpart" path="messagegreen" x="0" y="0" width="100%" height="100%" />
<drawimage condition="{warning}" imagetype="skinpart" path="messageyellow" x="0" y="0" width="100%" height="100%" />
<drawimage condition="{error}" imagetype="skinpart" path="messagered" x="0" y="0" width="100%" height="100%" />
</area>
<area x="5%" y="25%" width="90%" height="50%" layer="7">
<area x="5%" y="78%" width="90%" height="15%" layer="7">
<drawtext align="center" valign="center" font="{regular}" fontsize="40%" color="{clrWhite}" text="{text}" />
</area>
</message>
@ -358,10 +358,22 @@
-->
<!-- delay (in seconds) defines the time to wait till viewelement is displayed
fadetime in ms -->
<onpause delay="60" fadetime="0">
<onpause delay="30" fadetime="{fadetime}">
<area x="0" y="0" width="100%" height="100%" layer="1">
<fill color="{clrBlackTrans}" />
</area>
<area x="0" y="35%" width="100%" height="30%" layer="2">
<drawtext align="center" valign="center" font="{regular}" fontsize="100%" color="{clrWhite}" text="{tr(pause)}" />
</area>
</onpause>
<onpausemodeonly delay="30" fadetime="0">
<onpausemodeonly delay="30" fadetime="{fadetime}">
<area x="0" y="0" width="100%" height="100%" layer="1">
<fill color="{clrBlackTrans}" />
</area>
<area x="0" y="35%" width="100%" height="30%" layer="2">
<drawtext align="center" valign="center" font="{regular}" fontsize="100%" color="{clrWhite}" text="{tr(pause)}" />
</area>
</onpausemodeonly>
</displayreplay>

View File

@ -96,6 +96,19 @@ void cDisplayReplayView::DrawTitle(const cRecording *recording) {
DrawViewElement(veRecTitle, &stringTokens, &intTokens);
}
void cDisplayReplayView::DrawTitle(const char *title) {
map < string, string > stringTokens;
map < string, int > intTokens;
stringTokens.insert(pair<string,string>("rectitle", title));
stringTokens.insert(pair<string,string>("recsubtitle", ""));
stringTokens.insert(pair<string,string>("recdate", ""));
stringTokens.insert(pair<string,string>("rectime", ""));
DrawViewElement(veRecTitle, &stringTokens, &intTokens);
}
void cDisplayReplayView::DrawRecordingInformation(const cRecording *recording) {
map < string, string > stringTokens;
map < string, int > intTokens;

View File

@ -22,6 +22,7 @@ public:
void DrawDate(void);
void DrawTime(void);
void DrawTitle(const cRecording *recording);
void DrawTitle(const char *title);
void DrawRecordingInformation(const cRecording *recording);
void DrawScraperContent(const cRecording *recording);
void DrawCurrent(const char *current);