Merge pull request #114 from Taapat/translation
authortechnl <tech@openpli.org>
Sat, 5 Dec 2015 16:53:58 +0000 (17:53 +0100)
committertechnl <tech@openpli.org>
Sat, 5 Dec 2015 16:53:58 +0000 (17:53 +0100)
Update Latvian translation

lib/driver/rcinput.cpp
lib/dvb/volume.cpp
lib/gdi/fb.cpp
lib/gdi/fb.h
lib/gdi/fblcd.cpp
lib/gdi/fblcd.h
lib/python/Components/InputDevice.py
lib/service/servicemp3.cpp
lib/service/servicemp3.h

index 9b332f9..2518408 100644 (file)
@@ -169,7 +169,8 @@ public:
                {
                        char filename[32];
                        sprintf(filename, "/dev/input/event%d", i);
-                       if (::access(filename, R_OK) < 0) break;
+                       if (::access(filename, R_OK) < 0)
+                               break;
                        add(filename);
                        ++i;
                }
@@ -187,6 +188,7 @@ public:
 
        void add(const char* filename)
        {
+               eDebug("[eInputDeviceInit] adding device %s", filename);
                eRCInputEventDriver *p = new eRCInputEventDriver(filename);
                items.push_back(new element(filename, p, new eRCDeviceInputDev(p, consoleFd)));
        }
index 648c878..380751c 100644 (file)
 #include <linux/dvb/video.h>
 #endif
 
+#ifdef HAVE_ALSA
+# ifndef ALSA_VOLUME_MIXER
+#  define ALSA_VOLUME_MIXER "Master"
+# endif
+# ifndef ALSA_CARD
+#  define ALSA_CARD "default"
+# endif
+#endif
+
 eDVBVolumecontrol* eDVBVolumecontrol::instance = NULL;
 
 eDVBVolumecontrol* eDVBVolumecontrol::getInstance()
@@ -44,8 +53,9 @@ int eDVBVolumecontrol::openMixer()
        if (!mainVolume)
        {
                int err;
-               char *card = "default";
+               char *card = ALSA_CARD;
 
+               eDebug("[eDVBVolumecontrol] Setup ALSA Mixer %s - %s", ALSA_CARD, ALSA_VOLUME_MIXER);
                /* Perform the necessary pre-amble to start up ALSA Mixer */
                err = snd_mixer_open(&alsaMixerHandle, 0);
                if (err < 0)
@@ -126,7 +136,9 @@ void eDVBVolumecontrol::setVolume(int left, int right)
        rightVol = checkVolume(right);
 
 #ifdef HAVE_ALSA
-       if (mainVolume) snd_mixer_selem_set_playback_volume_all(mainVolume, muted ? 0 : leftVol);
+       eDebug("[eDVBVolumecontrol] Setvolume: ALSA leftVol=%d", leftVol);
+       if (mainVolume)
+               snd_mixer_selem_set_playback_volume_all(mainVolume, muted ? 0 : leftVol);
 #else
                /* convert to -1dB steps */
        left = 63 - leftVol * 63 / 100;
@@ -174,7 +186,9 @@ bool eDVBVolumecontrol::isMuted()
 void eDVBVolumecontrol::volumeMute()
 {
 #ifdef HAVE_ALSA
-       if (mainVolume) snd_mixer_selem_set_playback_volume_all(mainVolume, 0);
+       eDebug("[eDVBVolumecontrol] Setvolume: ALSA Mute");
+       if (mainVolume)
+               snd_mixer_selem_set_playback_volume_all(mainVolume, 0);
        muted = true;
 #else
        int fd = openMixer();
@@ -195,6 +209,7 @@ void eDVBVolumecontrol::volumeMute()
 void eDVBVolumecontrol::volumeUnMute()
 {
 #ifdef HAVE_ALSA
+       eDebug("[eDVBVolumecontrol] Setvolume: ALSA unMute to %d", leftVol);
        if (mainVolume)
                snd_mixer_selem_set_playback_volume_all(mainVolume, leftVol);
        muted = false;
index ac5265b..4ee922e 100644 (file)
@@ -62,7 +62,7 @@ fbClass::fbClass(const char *fb)
 
        available=fix.smem_len;
        m_phys_mem = fix.smem_start;
-       eDebug("[fb] %dk video mem", available/1024);
+       eDebug("[fb] %s: %dk video mem", fb, available/1024);
        lfb=(unsigned char*)mmap(0, available, PROT_WRITE|PROT_READ, MAP_SHARED, fbFd, 0);
        if (!lfb)
        {
@@ -80,7 +80,7 @@ nolfb:
                ::close(fbFd);
                fbFd = -1;
        }
-       eDebug("[fb] framebuffer not available");
+       eDebug("[fb] framebuffer %s not available", fb);
        return;
 }
 
index 42dd37b..0eb0491 100644 (file)
@@ -4,6 +4,10 @@
 #include <lib/base/eerror.h>
 #include <linux/fb.h>
 
+#ifndef FB_DEV
+# define FB_DEV "/dev/fb0"
+#endif
+
 class fbClass
 {
        int fbFd;
@@ -19,7 +23,7 @@ class fbClass
        int m_number_of_pages;
        int m_phys_mem;
 #ifdef SWIG
-       fbClass(const char *fb="/dev/fb0");
+       fbClass(const char *fb=FB_DEV);
        ~fbClass();
 public:
 #else
@@ -42,7 +46,7 @@ public:
        unsigned int Stride() { return stride; }
        fb_cmap *CMAP() { return &cmap; }
 
-       fbClass(const char *fb="/dev/fb0");
+       fbClass(const char *fb=FB_DEV);
        ~fbClass();
 
                        // low level gfx stuff
index 566d5dd..a801fb5 100644 (file)
@@ -53,7 +53,7 @@ eFbLCD::eFbLCD(const char *fb)
 
        m_available = fix.smem_len;
        m_phys_mem = fix.smem_start;
-       eDebug("[eFbLCD] %dk video mem", m_available / 1024);
+       eDebug("[eFbLCD] %s %dk video mem", fb, m_available / 1024);
        _buffer=(unsigned char*)mmap(0, m_available, PROT_WRITE|PROT_READ, MAP_SHARED, lcdfd, 0);
        if (!_buffer)
        {
@@ -74,7 +74,7 @@ nolfb:
                ::close(lcdfd);
                lcdfd = -1;
        }
-       eDebug("[eFbLCD] framebuffer not available");
+       eDebug("[eFbLCD] framebuffer %s not available", fb);
        return;
 }
 
index 5b75226..215020b 100644 (file)
@@ -6,6 +6,10 @@
 #include <lib/gdi/lcd.h>
 #include "gpixmap.h"
 
+#ifndef LCD_DEV
+# define LCD_DEV "/dev/fb1"
+#endif
+
 class eFbLCD: public eLCD
 {
        int m_xRes, m_yRes, m_bpp;
@@ -26,7 +30,7 @@ class eFbLCD: public eLCD
                        // low level gfx stuff
        int putCMAP();
 public:
-       eFbLCD(const char *fb="/dev/fb1");
+       eFbLCD(const char *fb=LCD_DEV);
        ~eFbLCD();
        bool detected() { return m_available; }
        eSize size() { return eSize(m_xRes, m_yRes); }
index 9d511d9..c191eb7 100644 (file)
@@ -40,7 +40,7 @@ class inputDevices:
                                self.name = self.name[:self.name.find("\0")]
                                os_close(self.fd)
                        except (IOError,OSError), err:
-                               print '[iInputDevices] getInputDevices " + evdev + " <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >'
+                               print '[iInputDevices] getInputDevices ' + evdev + ' <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >'
                                self.name = None
 
                        if self.name:
index 5000224..b180476 100644 (file)
@@ -403,7 +403,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        m_subtitle_sync_timer = eTimer::create(eApp);
        m_streamingsrc_timeout = 0;
        m_stream_tags = 0;
-       m_bitrate = 0;
        m_currentAudioStream = -1;
        m_currentSubtitleStream = -1;
        m_cachedSubtitleStream = 0; /* report the first subtitle stream to be 'cached'. TODO: use an actual cache. */
@@ -1868,22 +1867,6 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                if (m_stream_tags)
                                        gst_tag_list_free(m_stream_tags);
                                m_stream_tags = result;
-
-                               /* send evUpdatedInfo only when bitrate changes from 0 in order to reduce events */
-                               guint value;
-                               if(gst_tag_list_get_uint(m_stream_tags, GST_TAG_BITRATE, &value))
-                               {
-                                       if(!m_bitrate && value)
-                                       {
-                                               m_bitrate = value;
-                                       }
-                                       else
-                                       {
-                                               m_bitrate = value;
-                                               gst_tag_list_free(tags);
-                                               break;
-                                       }
-                               }
                        }
 
                        const GValue *gv_image = gst_tag_list_get_value_index(tags, GST_TAG_IMAGE, 0);
index 55df3f7..ef243bc 100644 (file)
@@ -322,7 +322,6 @@ private:
        int m_state;
        GstElement *m_gst_playbin, *audioSink, *videoSink;
        GstTagList *m_stream_tags;
-       guint m_bitrate;
 
        eFixedMessagePump<ePtr<GstMessageContainer> > m_pump;