]> git.vomp.tv Git - vompclient.git/commitdiff
Add channel status icons
authorMarten Richter <marten.richter@freenet.de>
Sat, 18 Oct 2014 10:44:16 +0000 (12:44 +0200)
committerMarten Richter <marten.richter@freenet.de>
Sat, 18 Oct 2014 10:44:16 +0000 (12:44 +0200)
GNUmakefile
other/dolbyoff.png [new file with mode: 0644]
other/dolbyon.png [new file with mode: 0644]
other/hd1080i.png [new file with mode: 0644]
other/hd720p.png [new file with mode: 0644]
other/sd576i.png [new file with mode: 0644]
other/txtoff.png [new file with mode: 0644]
other/txton.png [new file with mode: 0644]
staticartwork.h
vvideolivetv.cc
vvideolivetv.h

index 8e1bc46a1ebd5b14aedb542198e9bc1f6cc20292..3b11831c827250401f59f5836f2b0d0dc6e503dd 100644 (file)
@@ -46,6 +46,7 @@ include objects.mk
 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
 OBJECTS = $(OBJECTS1) 
 
+# Pictures for linux builds 
 PICTURES = -Wl,--format=binary 
 PICTURES += -Wl,other/vdrhires.png 
 PICTURES += -Wl,other/wallpaper720p.jpg 
@@ -54,7 +55,14 @@ PICTURES += -Wl,other/radio.png
 PICTURES += -Wl,other/timers.png 
 PICTURES += -Wl,other/tv.png 
 PICTURES += -Wl,other/recordings.png
-PICTURES += -Wl,other/restart.png  
+PICTURES += -Wl,other/restart.png 
+PICTURES += -Wl,other/hd1080i.png  
+PICTURES += -Wl,other/hd720p.png   
+PICTURES += -Wl,other/sd576i.png  
+PICTURES += -Wl,other/txtoff.png  
+PICTURES += -Wl,other/txton.png 
+PICTURES += -Wl,other/dolbyoff.png
+PICTURES += -Wl,other/dolbyon.png  
 PICTURES += -Wl,--format=default 
 
 
diff --git a/other/dolbyoff.png b/other/dolbyoff.png
new file mode 100644 (file)
index 0000000..907d2b3
Binary files /dev/null and b/other/dolbyoff.png differ
diff --git a/other/dolbyon.png b/other/dolbyon.png
new file mode 100644 (file)
index 0000000..2d4971f
Binary files /dev/null and b/other/dolbyon.png differ
diff --git a/other/hd1080i.png b/other/hd1080i.png
new file mode 100644 (file)
index 0000000..8b3b53f
Binary files /dev/null and b/other/hd1080i.png differ
diff --git a/other/hd720p.png b/other/hd720p.png
new file mode 100644 (file)
index 0000000..1ea5d3e
Binary files /dev/null and b/other/hd720p.png differ
diff --git a/other/sd576i.png b/other/sd576i.png
new file mode 100644 (file)
index 0000000..ddedc19
Binary files /dev/null and b/other/sd576i.png differ
diff --git a/other/txtoff.png b/other/txtoff.png
new file mode 100644 (file)
index 0000000..0e37e99
Binary files /dev/null and b/other/txtoff.png differ
diff --git a/other/txton.png b/other/txton.png
new file mode 100644 (file)
index 0000000..4e692f8
Binary files /dev/null and b/other/txton.png differ
index 0f212e496f16b363c3e12f6aa12c172e9868c626..dd7ebdcc9f4031c092d817d3d319501c077afde7 100644 (file)
 #define STATIC_ARTWORK_H
 
 #define EXTERNAL_PICTS \
-       EXTERNALPICTURE(vdrlogo, vdrhires, png) \
-       EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) \
-       EXTERNALPICTURE(properties, properties, png) \
-       EXTERNALPICTURE(radio, radio, png) \
-       EXTERNALPICTURE(recordings, recordings, png) \
-       EXTERNALPICTURE(restart, restart, png) \
-       EXTERNALPICTURE(timers, timers, png) \
-       EXTERNALPICTURE(tv, tv, png)
+               EXTERNALPICTURE(vdrlogo, vdrhires, png) \
+               EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) \
+               EXTERNALPICTURE(properties, properties, png) \
+               EXTERNALPICTURE(radio, radio, png) \
+               EXTERNALPICTURE(recordings, recordings, png) \
+               EXTERNALPICTURE(restart, restart, png) \
+               EXTERNALPICTURE(timers, timers, png) \
+               EXTERNALPICTURE(hd1080i, hd1080i, png) \
+               EXTERNALPICTURE(hd720p, hd720p, png) \
+               EXTERNALPICTURE(sd576i,sd576i, png) \
+               EXTERNALPICTURE(txtoff,txtoff, png) \
+               EXTERNALPICTURE(txton, txton, png) \
+               EXTERNALPICTURE(dolbyoff,dolbyoff, png) \
+               EXTERNALPICTURE(dolbyon, dolbyon, png) \
+               EXTERNALPICTURE(tv, tv, png)
 
 
 #define EXTERNALPICTURE(name, fname, fileextension)  sa_ ## name,
index 91ac9bba46b060ec8afd00d9920839b84202a775..e009f388d3bdc6f262a8124fb69ae01240ed2dce 100644 (file)
@@ -44,6 +44,8 @@
 #include "vteletextview.h"
 #include "vepgsummary.h"
 #include "vepglistadvanced.h"
+#include "staticartwork.h"
+#include "demuxer.h"
 
 #include <sstream>
 
@@ -152,6 +154,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   add(&osd);
   
   int channellogomove=0;
+  int boxdiff=166;
   if (osdv) {
          osdChannelLogo.setBackgroundColour(DrawStyle::OSDBACKGROUND);
          osdChannelLogo.setPosition(30,5);
@@ -159,8 +162,10 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
          osdChannelLogo.setTVMedia(info, WTVMedia::ZoomVertical);
          osd.add(&osdChannelLogo);
          channellogomove=30-5;
+         boxdiff=145;
   }
 
+
   clock.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   clock.setPosition(osd.getWidth() - 100, 4);
   clock.setSize(90, 30);
@@ -177,22 +182,22 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   osd.add(&osdChanName);
   
   boxRed.setBackgroundColour(DrawStyle::RED);
-  boxRed.setPosition(54, 104);
+  boxRed.setPosition(54+0*boxdiff, 104);
   boxRed.setSize(18, 16);
   osd.add(&boxRed);
 
   boxGreen.setBackgroundColour(DrawStyle::GREEN);
-  boxGreen.setPosition(220, 104);
+  boxGreen.setPosition(54+1*boxdiff, 104);
   boxGreen.setSize(18, 16);
   osd.add(&boxGreen);
 
   boxYellow.setBackgroundColour(DrawStyle::YELLOW);
-  boxYellow.setPosition(390, 104);
+  boxYellow.setPosition(54+2*boxdiff, 104);
   boxYellow.setSize(18, 16);
   osd.add(&boxYellow);
 
   boxBlue.setBackgroundColour(DrawStyle::BLUE);
-  boxBlue.setPosition(560, 104);
+  boxBlue.setPosition(54+3*boxdiff, 104);
   boxBlue.setSize(18, 16);
   osd.add(&boxBlue);  
   
@@ -229,21 +234,50 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   osd.add(&sl);
   
   
-  sAspectRatio.setPosition(osd.getWidth() - 90, 40);
-  sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS;
-  sAspectRatio.setVisible(false);
-  osd.add(&sAspectRatio);
-  
+
   bufferBar.setPosition(osd.getWidth() - 90, 70);
   bufferBar.setSize(40, 20);
   bufferBar.setVisible(true);
   osd.add(&bufferBar);
+
+  if (!osdv) {
+         sAspectRatio.setPosition(osd.getWidth() - 90, 40);
+         sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS;
+         sAspectRatio.setVisible(false);
+         osd.add(&sAspectRatio);
   
-  sAudioChannels.setPosition(osd.getWidth() - 130, 40);
-  sAudioChannels.nextColour = DrawStyle::LIVETVSYMBOLS;
-  sAudioChannels.setVisible(false);
-  osd.add(&sAudioChannels);
+         sAudioChannels.setPosition(osd.getWidth() - 130, 40);
+         sAudioChannels.nextColour = DrawStyle::LIVETVSYMBOLS;
+         sAudioChannels.setVisible(false);
+         osd.add(&sAudioChannels);
+  }
   
+  if (osdv) {
+         TVMediaInfo ninfo;
+         ninfo.setStaticArtwork(sa_txtoff);
+         txtlogo.setPosition(54+4*boxdiff,104);
+         txtlogo.setSize(22,20);
+         txtlogo.setTVMedia(ninfo, WTVMedia::ZoomVertical);
+         osd.add(&txtlogo);
+
+         ninfo.setStaticArtwork(sa_dolbyoff);
+         dolbylogo.setPosition(54+4*boxdiff+15,104);
+         dolbylogo.setSize(22,20);
+         dolbylogo.setTVMedia(ninfo, WTVMedia::ZoomVertical);
+         osd.add(&dolbylogo);
+
+         ninfo.setStaticArtwork(sa_sd576i);
+         reslogo.setPosition(54+4*boxdiff+30,104);
+         reslogo.setSize(22,20);
+         reslogo.setTVMedia(ninfo, WTVMedia::ZoomVertical);
+         osd.add(&reslogo);
+
+         reslogo.setVisible(false);
+         dolbylogo.setVisible(false);
+         txtlogo.setVisible(false);
+  }
+
+
   textUnavailable.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   textUnavailable.setPosition(60, 30);
   textUnavailable.setSize(osd.getWidth() - 120, 30);
@@ -258,6 +292,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   vdisplay.y=0;
   vdisplay.width=0;
   vdisplay.height=0;
+
 }
 
 void VVideoLiveTV::preDelete()
@@ -946,17 +981,26 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData)
   Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Done Set player to channel %u", currentChannelIndex);
 
   // Blank out the symbols
-  sAspectRatio.setVisible(false);
+  OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+
   bufferBar.setPercent(0);
-  sAudioChannels.setVisible(false);
   
+  if (!osdv) {
+         sAudioChannels.setVisible(false);
+         sAspectRatio.setVisible(false);
+  } else {
+         reslogo.setVisible(false);
+         dolbylogo.setVisible(false);
+         txtlogo.setVisible(false);
+  }
+
   // Remove other stuff
   if (textUnavailable.getVisible())
   {
     textUnavailable.setVisible(false);
     
   }
-  OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+
   if (osdv) {
          TVMediaInfo info;
          Channel* currentChannel = (*chanList)[currentChannelIndex];
@@ -1154,6 +1198,7 @@ void VVideoLiveTV::processMessage(Message* m)
 
 void VVideoLiveTV::doAudioChannelSymbol()
 {
+  OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
   // get the doobery
   Channel* currentChannel = (*chanList)[osdChannelIndex];
     
@@ -1164,10 +1209,51 @@ void VVideoLiveTV::doAudioChannelSymbol()
   if (currentChannel->numAPids > 1) multiAudio = true;
   
   // draw the doobery
-  
-  if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO;
-  else            sAudioChannels.nextSymbol = WSymbol::SINGLEAUDIO;
-  sAudioChannels.setVisible(true);
+  if (!osdv) {
+         if (multiAudio) sAudioChannels.nextSymbol = WSymbol::MULTIAUDIO;
+         else            sAudioChannels.nextSymbol = WSymbol::SINGLEAUDIO;
+         sAudioChannels.setVisible(true);
+  }
+  if (osdv)
+  {
+         dolbylogo.setVisible(true);
+         txtlogo.setVisible(true);
+         TVMediaInfo info;
+         if (currentChannel->tpid!=0) info.setStaticArtwork(sa_txton);
+         else info.setStaticArtwork(sa_txtoff);
+         txtlogo.setTVMedia(info, WTVMedia::ZoomVertical);
+
+
+         if (Audio::getInstance()->supportsAc3() && currentChannel->numDPids>1)
+                 info.setStaticArtwork(sa_dolbyon);
+         else info.setStaticArtwork(sa_dolbyoff);
+         dolbylogo.setTVMedia(info, WTVMedia::ZoomVertical);
+
+        Demuxer* demux=Demuxer::getInstance();
+        if (demux) {
+                int vertical_size=demux->getVerticalSize();
+                Log::getInstance()->log("VVideoRec", Log::DEBUG, "TVMedia vertical size %d", vertical_size);
+                reslogo.setVisible(true);
+                switch (vertical_size) {
+                case 576:
+                        info.setStaticArtwork(sa_sd576i);
+                        reslogo.setTVMedia(info, WTVMedia::ZoomVertical);break;
+                case 720:
+                        info.setStaticArtwork(sa_hd720p);
+                        reslogo.setTVMedia(info, WTVMedia::ZoomVertical);break;
+                case 1080:
+                        info.setStaticArtwork(sa_hd1080i);
+                        reslogo.setTVMedia(info, WTVMedia::ZoomVertical);break;
+                default: // we assume sd
+                        reslogo.setVisible(false);
+                };
+
+        } else {
+                reslogo.setVisible(false);
+        }
+
+
+  }
   
   if (osd.getVisible())
   {
index 3639cd44875d99588372399039c4ff3437b20bc2..bdf4b39f67748dd02e1e086895a1005a6a6dd35c 100644 (file)
@@ -144,14 +144,20 @@ class VVideoLiveTV : public Boxx, public TimerReceiver, public OSDReceiver
     WTextbox textGreen;
     WTextbox textYellow;
     WTextbox textBlue;
-    WSymbol sAspectRatio;
     WProgressBar bufferBar;
+    WSymbol sAspectRatio;
     WSymbol sAudioChannels;
+
+
     WTextbox textUnavailable;
     WTVMedia osdposterbanner;
     WTVMedia radioChannelLogo;
     WTVMedia osdChannelLogo;
     
+    WTVMedia txtlogo;
+    WTVMedia dolbylogo;
+    WTVMedia reslogo;
+