neu:
- positions- und dimensionsparameter (x/y/x1/y1/x2/y2; width/height) werden nun zur laufzeit ausgewertet und nicht mehr wie bisher nur beim parsen
- unterstuetzung fuer plugin 'span' (siehe screenshot und beispiel-xml-fetzen dazu)
achtung: die verwendung der kombination span/music-plugins ist (zumindest bei mir) sehr instabil (bei vdr-restart oder beim wechsel von einem anderen mediaplayer (zb. xinelibout) zum music-plugin kann ein segfault auftreten. problem: ein thread, der (annahme von mir) im music-plugin gestartet wird nach beendigung eines anderen threads verwendet noch einen bereits invalidierten zeiger auf ein VDR player-object weiter. wenn dem so ist und das span-plugin dann noch daten abfraegt: BUMM. habe mit einem untergriff (abfrage, ob cControl-object gueltig ist) zumindest verhindern koennen, dass das music-plugin bei hin-und-herspringen v. musikauswahl und abspielmodus das span-plugin zum crashen bringt, aber weiter kann ich nicht eingreifen (zumindest habe ich nix weiter gefunden).
anmerkung:
initialisert wird das span-plugin mit der allerersten ServiceIsAvailable-abfrage!
-> zb: {ServiceIsAvailable:span,bands=20,delay=250,falloff=4} legt fest, dass 20 baender angelegt werden sollen, der delay zwischen 2 abfragen auf 250 ms und der falloff auf 4 eingestellt werden.
diese auswertung der parameter erfolgt nur ein einziges mal! (performance)
beispiel:
<variable id="SpanX" value="10"/>
<variable id="SpanY" value="100"/>
<variable id="SpanVolY" value="sub(#SpanY,18)"/>
<variable id="SpanH" value="64"/>
<variable id="SpanBarGap" value="2"/>
<variable id="SpanBarW" value="5"/>
<variable id="SpanPadding" value="2"/>
<variable id="SpanBarX" value="add(#SpanX,#SpanPadding)"/>
<variable id="SpanBarY" value="add(#SpanY,#SpanPadding)"/>
<variable id="SpanBarH" value="sub(#SpanH,#SpanPadding,#SpanPadding)"/>
<variable id="SpanBarTotW" value="add(#SpanBarW,#SpanBarGap)"/>
<variable id="SpanBarCol" value="'white'"/>
<variable id="SpanPeakCol" value="'0xFF777777'"/>
<variable id="SpanW" value="add(mul(#SpanBarW,{ServiceItem:span,bands}),mul(#SpanBarGap,sub({ServiceItem:span,bands},1)),#SpanPadding,#SpanPadding)"/>
<block condition="{ServiceIsAvailable:span,bands=20,delay=250,falloff=4}">
<rectangle x="#SpanX" y="#SpanVolY" width="#SpanW" height="15" color="0x773333FF" filled="yes"/>
<rectangle x="#SpanX" y="#SpanVolY" width="#SpanW" height="15" color="blue"/>
<text x="add(#SpanX,3)" y="add(#SpanVolY,2)" color="white" align="left" font="FontSpanLabel">L</text>
<text x="add(#SpanX,3)" y="add(#SpanVolY,8)" color="white" align="left" font="FontSpanLabel">R</text>
<progress x="add(#SpanX,18)" y="add(#SpanVolY,2)" width="sub(#SpanW,14)" height="11" color="0x77777733" direction="0" current="{ServiceItem:span,volume}" total="100"/>
<progress x="add(#SpanX,18)" y="add(#SpanVolY,2)" width="sub(#SpanW,14)" height="5" color="0xAA55FF55" direction="0" current="{ServiceItem:span,volumel}" total="100"/>
<progress x="add(#SpanX,18)" y="add(#SpanVolY,8)" width="sub(#SpanW,14)" height="5" color="0xAA55FF55" direction="0" current="{ServiceItem:span,volumer}" total="100"/>
<rectangle x="#SpanX" y="#SpanY" width="#SpanW" height="#SpanH" color="0x773333FF" filled="yes"/>
<rectangle x="#SpanX" y="#SpanY" width="#SpanW" height="#SpanH" color="blue" />
<progress x="add(#SpanBarX,mul(#SpanBarTotW,0))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,0}" peak="{ServiceItem:span,peak,0}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,1))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,1}" peak="{ServiceItem:span,peak,1}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,2))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,2}" peak="{ServiceItem:span,peak,2}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,3))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,3}" peak="{ServiceItem:span,peak,3}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,4))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,4}" peak="{ServiceItem:span,peak,4}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,5))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,5}" peak="{ServiceItem:span,peak,5}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,6))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,6}" peak="{ServiceItem:span,peak,6}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,7))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,7}" peak="{ServiceItem:span,peak,7}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,8))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,8}" peak="{ServiceItem:span,peak,8}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,9))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,9}" peak="{ServiceItem:span,peak,9}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,10))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,10}" peak="{ServiceItem:span,peak,10}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,11))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,11}" peak="{ServiceItem:span,peak,11}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,12))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,12}" peak="{ServiceItem:span,peak,12}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,13))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,13}" peak="{ServiceItem:span,peak,13}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,14))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,14}" peak="{ServiceItem:span,peak,14}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,15))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,15}" peak="{ServiceItem:span,peak,15}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,16))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,16}" peak="{ServiceItem:span,peak,16}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,17))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,17}" peak="{ServiceItem:span,peak,17}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,18))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,18}" peak="{ServiceItem:span,peak,18}" peakcolor="#SpanPeakCol" total="100"/>
<progress x="add(#SpanBarX,mul(#SpanBarTotW,19))" y="#SpanBarY" height="#SpanBarH" width="#SpanBarW" color="#SpanBarCol" direction="3" current="{ServiceItem:span,height,19}" peak="{ServiceItem:span,peak,19}" peakcolor="#SpanPeakCol" total="100"/>
</block>
Alles anzeigen