diff options
-rw-r--r-- | HISTORY | 42 | ||||
-rw-r--r-- | dxr3.c | 283 | ||||
-rw-r--r-- | dxr3.h | 149 | ||||
-rw-r--r-- | dxr3device.c | 86 | ||||
-rw-r--r-- | dxr3i18n.c | 574 |
5 files changed, 521 insertions, 613 deletions
@@ -230,48 +230,12 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - fixed dxr3osd_subpicutre.c - thanks to Paavo Hartikainen <pahartik@sci.fi> -2005-??-??: Version 0.2.3-pre3 +2004-0?-??: Version 0.2.3-pre3 - fixed output of anamorphic video, if tv aspect is configured to 16:9 in DVB setup menu thanks Seppo Ingalsuo <seppo.ingalsuo@iki.fi> - rewrote i18n support - fixed void cDxr3Interface::SetAudioDigitalPCM() - thanks to Stephan Skrodzki <skrodzki@contcast.de> for patch - dxr3memcpy.c/h: fix to support older compilers like gcc-2.95 - Here i want to thanks Marco Schlüßler very much for run compil tests, even he - dont run the plugin :) -- dxr3memcpy.c/h (bug #1000647) - should now compile on alpha and powerpc - thanks to Paavo Hartikainen <pahartik@sci.fi> -- added many comments into source -- using doxygen for docs -- cDxr3Interface::ConfigureDevice(): we get now videomode from driver and set only a - new one, if the wanted one is different to the driver defaults one. -- added functions to read and write registers directly with the plugin -- added basic dolby digital interface -- you can configure microcode path in Makefile - thanks to Sascha Volkenandt <sascha@akv-soft.de> -- fixed DVBDIR and FFMDIR in Makefile - thanks to guys from www.vdr-wiki.de -- you can set now logpath in makefile - You should also run a linke like - # find / -name "dxr3plugin.log" | xargs rm - because the pre2 seems to put this dxr3plugin.log random in some folders - reporded by Martin Dauskardt <md001@gmx.de> -- extended cDxr3MemcpyBench::Rdtsc(uint32_t config_flags) - support for non x86 arch - support for cpu's, which dont support rdtsc timing -- logger now thread safe -- rewrote cDxr3SpuDecoder - dropped software decoder - added hardware decoder, so we make use of DVD-functions of the dxr3 -- checked Lock() and Unlock() in dxr3interface.c - hope everything is ok else contact me -- using now std:: instead of namespace std; - fixed bug #1044069 -- renamed dxr3interface_spu_encoder.h/c to dxr3spuencoder.h/c -- removed log commands in dxr3outputthread.c -- fixed #includes - moved #include "dxr3osd.h" from dxr3interface.h to dxr3interface.c - removed not needed #includes -- fixed bug #1022810: Osd gets pink -- added support for vdr-1.3.13 -- added a small patch, containing mainly Finnish translation updates but also a few other small ones - thanks Ville Skyta <ville.skytta@iki.fi> -- some little fixes in the dx3interface: if we cant open control fifo plugins retuns now correct error message -- removed -lz from makefile -- compiles now with 3.4.x gcc's -- added support for vdr-1.3.18 - thanks to Luca Olivetti <luca@ventoso.org>
\ No newline at end of file +- dxr3memcpy.c/h: should now compile on alpha and powerpc +- fixed i18n, and improved Finnish translations and some others @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * -* $Id: dxr3.c,v 1.2 2004/09/18 00:11:11 austriancoder Exp $ +* $Id: dxr3.c,v 1.1.2.1 2005/03/14 11:03:36 scop Exp $ */ @@ -12,15 +12,15 @@ #include "dxr3syncbuffer.h" #include "dxr3configdata.h" #include "dxr3interface.h" -#include "dxr3i18n.h" -#include "dxr3cpu.h" -#include "dxr3dolbydigital.h" #include "dxr3.h" +#include "dxr3i18n.h" static const char *VERSION = "0.2.3-pre3-cvs"; -static const char *DESCRIPTION = "DXR3-MPEG decoder plugin"; +static const char *DESCRIPTION = "Hardware MPEG decoder"; static const char *MAINMENUENTRY = "DXR3"; +#include "dxr3cpu.h" + // ================================== // 'message-handler' for the main screen eOSState cDxr3OsdItem::ProcessKey(eKeys Key) @@ -64,262 +64,23 @@ eOSState cDxr3OsdItem::ProcessKey(eKeys Key) } // ================================== -// special osd item to change color settings -cDxr3OsdColorItem::cDxr3OsdColorItem(const char* Name, eDxr3ColorItem item) -:cMenuEditItem(Name), m_item(item) -{ - m_value = 0; - m_min = 0; - m_max = 32; - - // get vale from setup.conf - switch (m_item) - { - case DXR3_BRIGHTNESS: - m_value = cDxr3ConfigData::Instance().GetBrightness(); - break; - - case DXR3_CONTRAST: - m_value = cDxr3ConfigData::Instance().GetContrast(); - break; - - case DXR3_SATURATION: - m_value = cDxr3ConfigData::Instance().GetSaturation(); - break; - }; - - Set(); -} - -// ================================== -// react to keypresses -eOSState cDxr3OsdColorItem::ProcessKey(eKeys Key) -{ - eOSState state = cMenuEditItem::ProcessKey(Key); - - if (state == osUnknown) - { - int newValue = m_value; - Key = NORMALKEY(Key); - switch (Key) - { - case kNone: break; - case k0 ... k9: - if (fresh) - { - m_value = 0; - fresh = false; - } - newValue = m_value * 10 + (Key - k0); - break; - case kLeft: // TODO might want to increase the delta if repeated quickly? - newValue = m_value - 1; - fresh = true; - break; - case kRight: - newValue = m_value + 1; - fresh = true; - break; - default: - if (m_value < m_min) { m_value = m_min; Set(); } - if (m_value > m_max) { m_value = m_max; Set(); } - return state; - } - if ((!fresh || m_min <= newValue) && newValue <= m_max) - { - m_value = newValue; - Set(); - } - state = osContinue; - } - return state; -} - -// ================================== -// set caption and call hardware ioctl's -void cDxr3OsdColorItem::Set() -{ - // real value with rounding - int realValue = int(m_value * 31.25); - - char buf[16]; - snprintf(buf, sizeof(buf), "%s", "Hallo"); - SetValue(buf); -} - -/* -// ================================== -// special osd item to change color settings -cDxr3OsdColorItem::cDxr3OsdColorItem(const char* Name, eDxr3ColorItem item) -:cOsdItem(Name), m_item(item) -{ - // get vale from setup.conf - switch (m_item) - { - case DXR3_BRIGHTNESS: - m_value = cDxr3ConfigData::Instance().GetBrightness(); - break; - - case DXR3_CONTRAST: - m_value = cDxr3ConfigData::Instance().GetContrast(); - break; - - case DXR3_SATURATION: - m_value = cDxr3ConfigData::Instance().GetSaturation(); - break; - }; - - // allowed values: 0 - 32 - m_min = 0; - m_max = 32; - - m_name = strdup(Name); - m_caption = NULL; - - Set(); -} - -// ================================== -// set caption and call hardware ioctl's -void cDxr3OsdColorItem::Set() -{ -/* - SetValue(SettingBar[m_value]); - - // real value with rounding - int realValue = int(m_value * 31.25); - - switch (m_item) - { - case DXR3_BRIGHTNESS: - cDxr3Interface::Instance().SetBrightness(realValue); - cDxr3ConfigData::Instance().SetBrightness(m_value); - break; - - case DXR3_CONTRAST: - cDxr3Interface::Instance().SetContrast(realValue); - cDxr3ConfigData::Instance().SetContrast(m_value); - break; - - case DXR3_SATURATION: - cDxr3Interface::Instance().SetSaturation(realValue); - cDxr3ConfigData::Instance().SetSaturation(m_value); - break; - }; -*//* -} - -// ================================== -void cDxr3OsdColorItem::SetValue(const char *Value) -{ -/* - free(m_caption); - m_caption = strdup(Value); - char *buffer = NULL; - asprintf(&buffer, "%s:\t%s", m_name, m_caption); - SetText(buffer, false); - cStatus::MsgOsdCurrentItem(buffer); -*//* -} - -// ================================== -// react to keypresses -eOSState cDxr3OsdColorItem::ProcessKey(eKeys Key) -{ -/* - eOSState state = osUnknown; - - if (state == osUnknown) - { - int newValue = m_value; - Key = NORMALKEY(Key); - - switch (Key) - { - case kNone: - break; - - case k0 ... k9: - if (fresh) - { - m_value = 0; - fresh = false; - } - newValue = m_value * 10 + (Key - k0); - break; - - case kLeft: // TODO might want to increase the delta if repeated quickly? - newValue = m_value - 1; - fresh = true; - break; - - case kRight: - newValue = m_value + 1; - fresh = true; - break; - - default: - if (m_value < m_min) { m_value = m_min; Set(); } - if (m_value > m_max) { m_value = m_max; Set(); } - return state; - } - - if ((!fresh || m_min <= newValue) && newValue <= m_max) - { - m_value = newValue; - Set(); - } - state = osContinue; - } - return state; -*/ -//} - - -// ================================== -// the main menu of the plugin -cDxr3OsdMenu::cDxr3OsdMenu() : cOsdMenu(tr("DXR3 Adjustment")) -{ - b = 0; - c = 10; - s = 0; - - Clear(); - SetHasHotkeys(); - Add(new cDxr3OsdItem(tr("Reset DXR3 Hardware"), DXR3_RESET_HARDWARE)); - Add(new cDxr3OsdItem(tr("Toggle Force LetterBox"), DXR3_FORCE_LETTER_BOX)); - - // switch between differen output modes - if (cDxr3ConfigData::Instance().GetUseDigitalOut()) - { - Add(new cDxr3OsdItem(tr("Analog Output"), DXR3_ANALOG_OUT)); - } - else - { - Add(new cDxr3OsdItem(tr("Digital Output"), DXR3_DIGITAL_OUT)); - } - - //SettingBar - Add(new cDxr3OsdColorItem(tr("Brightness"), DXR3_BRIGHTNESS)); -// Add(new cMenuEditStraItem(tr("Brightness"), &b, 33, SettingBar)); -// Add(new cMenuEditStraItem(tr("Contrast"), &c, 33, SettingBar)); -// Add(new cMenuEditStraItem(tr("Saturation"), &s, 33, SettingBar)); -} - - -// ================================== // setup menu cMenuSetupDxr3::cMenuSetupDxr3(void) { newUseDigitalOut = cDxr3ConfigData::Instance().GetUseDigitalOut(); Add(new cMenuEditBoolItem(tr("Digital audio output"), &newUseDigitalOut)); newDxr3Card = cDxr3ConfigData::Instance().GetDxr3Card(); - Add(new cMenuEditIntItem(tr("DXR3 card"), &newDxr3Card)); + Add(new cMenuEditIntItem(tr("Card number"), &newDxr3Card)); newVideoMode = (int) cDxr3ConfigData::Instance().GetVideoMode(); - Add(new cMenuEditStraItem(tr("DXR3 video mode"), &newVideoMode, 3, menuVideoModes)); + menuVideoModes[0] = tr("PAL"); + menuVideoModes[1] = tr("PAL60"); + menuVideoModes[2] = tr("NTSC"); + Add(new cMenuEditStraItem(tr("Video mode"), &newVideoMode, 3, menuVideoModes)); newDebug = (int) cDxr3ConfigData::Instance().GetDebug(); Add(new cMenuEditBoolItem(tr("Debug mode"), &newDebug)); newDebugLevel = (int) cDxr3ConfigData::Instance().GetDebugLevel(); + menuDebugModes[0] = tr("low"); + menuDebugModes[1] = tr("everything"); Add(new cMenuEditStraItem(tr("Debug level"), &newDebugLevel, 2, menuDebugModes)); } @@ -327,11 +88,11 @@ cMenuSetupDxr3::cMenuSetupDxr3(void) // save menu values void cMenuSetupDxr3::Store(void) { - SetupStore("UseDigitalOut", cDxr3ConfigData::Instance().SetUseDigitalOut(newUseDigitalOut)); - SetupStore("Dxr3Card", cDxr3ConfigData::Instance().SetDxr3Card(newDxr3Card)); - SetupStore("Dxr3VideoMode", cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) newVideoMode)); - SetupStore("Dxr3Debug", cDxr3ConfigData::Instance().SetDebug(newDebug)); - SetupStore("Dxr3DebugLevel", cDxr3ConfigData::Instance().SetDebugLevel(newDebugLevel)); + SetupStore("UseDigitalOut", cDxr3ConfigData::Instance().SetUseDigitalOut(newUseDigitalOut)); + SetupStore("Dxr3Card", cDxr3ConfigData::Instance().SetDxr3Card(newDxr3Card)); + SetupStore("Dxr3VideoMode", cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) newVideoMode)); + SetupStore("Dxr3Debug", cDxr3ConfigData::Instance().SetDebug(newDebug)); + SetupStore("Dxr3DebugLevel", cDxr3ConfigData::Instance().SetDebugLevel(newDebugLevel)); } // ================================== @@ -343,7 +104,7 @@ public: cPluginDxr3(); ~cPluginDxr3(); const char *Version() { return VERSION; } - const char *Description() { return DESCRIPTION; } + const char *Description() { return tr(DESCRIPTION); } const char *CommandLineHelp(); bool ProcessArgs(int argc, char *argv[]); bool Initialize(); @@ -384,18 +145,15 @@ bool cPluginDxr3::ProcessArgs(int argc, char *argv[]) // ================================== bool cPluginDxr3::Start() { - new cDxr3DolbyDigital(); + RegisterI18n(Phrases); return true; } // ================================== bool cPluginDxr3::Initialize() { - RegisterI18n(Phrases); - new cDxr3CPU(); cDxr3Device::Instance(); - return true; } @@ -419,9 +177,6 @@ bool cPluginDxr3::SetupParse(const char *Name, const char *Value) if (!strcasecmp(Name, "Dxr3Debug")) { cDxr3ConfigData::Instance().SetDebug(atoi(Value)); return true; } if (!strcasecmp(Name, "Dxr3VideoMode")) { cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) atoi(Value)); return true;} if (!strcasecmp(Name, "Dxr3DebugLevel")) { cDxr3ConfigData::Instance().SetDebugLevel(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Contrast")) { cDxr3ConfigData::Instance().SetContrast(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Brightness")) { cDxr3ConfigData::Instance().SetBrightness(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Saturation")) { cDxr3ConfigData::Instance().SetSaturation(atoi(Value)); return true;} return false; } @@ -1,57 +1,7 @@ #ifndef _DXR3_H_ #define _DXR3_H_ -const char* menuVideoModes[] = -{ - "PAL", - "PAL60", - "NTSC" -}; - -// debug modes -const char* menuDebugModes[] = -{ - "Low", - "Everything" -}; - -// color setting bar -static const char *SettingBar[] = -{ - "[................................]", - "[|...............................]", - "[||..............................]", - "[|||.............................]", - "[||||............................]", - "[|||||...........................]", - "[||||||..........................]", - "[|||||||.........................]", - "[||||||||........................]", - "[|||||||||.......................]", - "[||||||||||......................]", - "[|||||||||||.....................]", - "[||||||||||||....................]", - "[|||||||||||||...................]", - "[||||||||||||||..................]", - "[|||||||||||||||.................]", - "[||||||||||||||||................]", - "[|||||||||||||||||...............]", - "[||||||||||||||||||..............]", - "[|||||||||||||||||||.............]", - "[||||||||||||||||||||............]", - "[|||||||||||||||||||||...........]", - "[||||||||||||||||||||||..........]", - "[|||||||||||||||||||||||.........]", - "[||||||||||||||||||||||||........]", - "[|||||||||||||||||||||||||.......]", - "[||||||||||||||||||||||||||......]", - "[|||||||||||||||||||||||||||.....]", - "[||||||||||||||||||||||||||||....]", - "[|||||||||||||||||||||||||||||...]", - "[||||||||||||||||||||||||||||||..]", - "[|||||||||||||||||||||||||||||||.]" - "[||||||||||||||||||||||||||||||||]" // 32 x | -}; +// --- cMenuSetupDxr3 ------------------------------------------------------- // ================================== // setup screen @@ -69,6 +19,8 @@ private: int newVideoMode; int newDebug; int newDebugLevel; + const char *menuVideoModes[3]; + const char *menuDebugModes[2]; }; @@ -83,14 +35,6 @@ enum eDxr3OsdItem }; // ================================== -enum eDxr3ColorItem -{ - DXR3_BRIGHTNESS, - DXR3_CONTRAST, - DXR3_SATURATION -}; - -// ================================== // osd item class cDxr3OsdItem : public cOsdItem { @@ -105,59 +49,48 @@ protected: }; // ================================== -// used to change color settings -class cDxr3OsdColorItem : public cMenuEditItem -{ -public: - cDxr3OsdColorItem(const char* text, eDxr3ColorItem item); - virtual eOSState ProcessKey(eKeys Key); - -protected: - eDxr3ColorItem m_item; - int m_value; - int m_min; - int m_max; - - virtual void Set(); -}; - -/* -// ================================== -// used to change color settings -class cDxr3OsdColorItem : public cOsdItem//cMenuEditItem -{ -public: - cDxr3OsdColorItem(const char* text, eDxr3ColorItem item); - - cDxr3OsdColorItem::~cDxr3OsdColorItem() - { - free(m_name); - free(m_caption); - } - - eOSState ProcessKey(eKeys Key); - -protected: - eDxr3ColorItem m_item; - int m_value; - int m_min; - int m_max; - char* m_caption; - char* m_name; - - void Set(); - void SetValue(const char *Value); -}; -*/ - -// ================================== // main screen class cDxr3OsdMenu : public cOsdMenu { public: - cDxr3OsdMenu(); - - int b,c,s; + cDxr3OsdMenu(): cOsdMenu(tr("DXR3 Adjustment")) + { + Clear(); + SetHasHotkeys(); + Add(new cDxr3OsdItem(hk(tr("Reset DXR3 hardware")), DXR3_RESET_HARDWARE)); + Add(new cDxr3OsdItem(hk(tr("Toggle force letterbox")), DXR3_FORCE_LETTER_BOX)); + + if (cDxr3ConfigData::Instance().GetUseDigitalOut()) + { + Add(new cDxr3OsdItem(hk(tr("Switch to analog audio output")), DXR3_ANALOG_OUT)); + } + else + { + Add(new cDxr3OsdItem(hk(tr("Switch to digital audio output")), DXR3_DIGITAL_OUT)); + } +/* + if (cDxr3ConfigData::Instance().GetUseDigitalOut()) + { + Add(new cDxr3OsdItem(hk("Analog output"), DXR3_ANALOG_OUT)); + + if (cDxr3ConfigData::Instance().GetAc3OutPut()) + { + Add(new cDxr3OsdItem(hk(tr("AC3 output off")), DXR3_AC3_OUT)); + } + else + { + if (cDxr3Interface::Instance().IsAc3Present()) + { + Add(new cDxr3OsdItem(hk(tr("AC3 output on")), DXR3_AC3_OUT)); + } + } + } + else + { + Add(new cDxr3OsdItem(hk(tr("Switch to digital audio output")), DXR3_DIGITAL_OUT)); + } + */ + } }; #endif /*_DXR3_H_*/ diff --git a/dxr3device.c b/dxr3device.c index d4dbdb3..36f5ca7 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -1,31 +1,8 @@ -/* - * dxr3devide.c - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program 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 Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - #include "dxr3device.h" #include "dxr3configdata.h" #include "dxr3interface.h" #include "dxr3tools.h" #include "dxr3log.h" -#include "dxr3osd.h" extern "C" { @@ -33,7 +10,6 @@ extern "C" } // ================================== -//! constructor cDxr3Device::cDxr3Device() : m_DemuxDevice(cDxr3Interface::Instance()) { m_Offset = 0; @@ -62,7 +38,6 @@ void cDxr3Device::MakePrimaryDevice(bool On) // replaying // ================================== -//! does we have an mpeg2 devocer? bool cDxr3Device::HasDecoder() const { // sure we have one ;) @@ -70,7 +45,6 @@ bool cDxr3Device::HasDecoder() const } // ================================== -//! can we replay vdr recordings? bool cDxr3Device::CanReplay() const { // also sure... @@ -114,7 +88,7 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) if (PlayMode == pmExtern_THIS_SHOULD_BE_AVOIDED) { - Tools::WriteInfoToOsd(tr("DXR3: Releasing devices")); + Tools::WriteInfoToOsd(tr("DXR3: releasing devices")); cDxr3Interface::Instance().ExternalReleaseDevices(); } else @@ -235,7 +209,7 @@ void cDxr3Device::TrickSpeed(int Speed) } // ================================== -//! clear our demux buffer +// clear our demux buffer void cDxr3Device::Clear() { m_DemuxDevice.Clear(); @@ -244,17 +218,16 @@ void cDxr3Device::Clear() } // ================================== -//! play a recording +// play a recording void cDxr3Device::Play() { m_DemuxDevice.SetReplayMode(); m_Offset = 0; - ///< free buffer m_strBuf.erase(m_strBuf.begin(), m_strBuf.end()); } // ================================== -//! puts the device into "freeze frame" mode +// puts the device into "freeze frame" mode void cDxr3Device::Freeze() { m_DemuxDevice.SetTrickMode(DXR3_FREEZE); @@ -267,7 +240,7 @@ void cDxr3Device::Mute() } // ================================== -//! displays the given I-frame as a still picture. +// displays the given I-frame as a still picture. void cDxr3Device::StillPicture(const uchar *Data, int Length) { m_DemuxDevice.StillPicture(Data, Length); @@ -280,7 +253,7 @@ bool cDxr3Device::Poll(cPoller &Poller, int TimeoutMs) } // ================================== -//! actually plays the given data block as video +// actually plays the given data block as video int cDxr3Device::PlayVideo(const uchar *Data, int Length) { int retLength = 0; @@ -338,23 +311,16 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length) // ================================== // plays additional audio streams, like Dolby Digital -#if VDRVERSNUM >= 10318 - int cDxr3Device::PlayAudio(const uchar *Data, int Length) -#else - void cDxr3Device::PlayAudio(const uchar *Data, int Length) -#endif +void cDxr3Device::PlayAudio(const uchar *Data, int Length) { int retLength = 0; -#if VDRVERSNUM >= 10318 - int origLength = Length; -#endif - -#if VDRVERSNUM < 10307 + + #if VDRVERSNUM < 10307 if (!m_AC3Present) { Interface->Write(Interface->Width() / 2, 0, "AC3", clrRed); } -#endif + #endif m_AC3Present = true; @@ -362,12 +328,7 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length) m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || cDxr3Interface::Instance().IsExternalReleased()) { //usleep(1000000); - -#if VDRVERSNUM >= 10318 - return 0; -#else - return; -#endif + return; } if (m_strBuf.length()) @@ -393,15 +354,11 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length) m_strBuf.append((const char*)(Data + retLength), Length); } } - -#if VDRVERSNUM >= 10318 - return origLength; -#endif } // addition functions // ================================== -//! capture a single frame as an image +// capture a single frame as an image bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY) { int w = SizeX; @@ -418,7 +375,7 @@ bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int Si { if (Jpeg) { - ///< write JPEG file: + // write JPEG file: struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; cinfo.err = jpeg_std_error(&jerr); @@ -446,7 +403,7 @@ bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int Si } else { - ///< write PNM file: + // write PNM file: if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || fwrite(Data, w * h * 3, 1, f) < 0) { LOG_ERROR_STR(FileName); @@ -474,9 +431,13 @@ void cDxr3Device::SetVideoFormat(bool VideoFormat16_9) } // ================================== -//! sets volume for audio output +// sets volume for audio output void cDxr3Device::SetVolumeDevice(int Volume) { + if (cDxr3ConfigData::Instance().GetDebug()) + { + cLog::Instance() << "change volume to " << Volume << " \n"; + } cDxr3Interface::Instance().SetVolume(Volume); } @@ -484,8 +445,17 @@ void cDxr3Device::SetVolumeDevice(int Volume) // get spudecoder cSpuDecoder *cDxr3Device::GetSpuDecoder(void) { + if (cDxr3ConfigData::Instance().GetDebug()) + { + cLog::Instance() << "cDxr3Device::GetSpuDecoder"; + } + if (!m_spuDecoder && IsPrimaryDevice()) { + if (cDxr3ConfigData::Instance().GetDebug()) + { + cLog::Instance() << "cDxr3Device::GetSpuDecoder: ok"; + } m_spuDecoder = new cDxr3SpuDecoder(); } return m_spuDecoder; @@ -21,395 +21,669 @@ #include "dxr3i18n.h" -const char *i18n_name = 0; - const tI18nPhrase Phrases[] = { { - "DXR3", // English - "DXR3", // Deutsch + "DXR3", + "DXR3", + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "DXR3-toiminnot", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "Hardware MPEG decoder", + "", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "MPEG-purkukortti", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "DXR3 Adjustment", + "DXR3 Einstellungen", + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "DXR3-toiminnot", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "Digital audio output", + "Digitaler Audioausgang", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "DXR3", // suomi + "Digitaalinen audioulostulo", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "DXR3 Adjustment", // English - "DXR3 Einstellungen", // Deutsch + "Card number", + "Karte", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "DXR3-säätimet", // suomi + "Kortin järjestysnumero", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Digital audio output", // English - "Digitaler Audioausgang", // Deutsch + "Video mode", + "Videomodus", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Digitaalinen audio-ulostulo", // suomi + "Näyttötila", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "DXR3 card", // English - "DXR3 Karte", // Deutsch + "PAL", + "PAL", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "DXR3-kortti", // suomi + "PAL", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "DXR3 video mode", // English - "DXR3 Videomodus", // Deutsch + "PAL60", + "PAL60", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "DXR3-näyttötila", // suomi + "PAL60", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Reset DXR3 hardware", // English - "Reset DXR3 Hardware", // Deutsch + "NTSC", + "NTSC", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Alusta DXR3-laitteisto", // suomi + "NTSC", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Toggle Force Letterbox", // English - "Letterbox erzwingen", // Deutsch + "Reset DXR3 hardware", + "Reset DXR3 Hardware", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Vaihda letterbox-näyttötilan pakotus päälle/pois", // suomi + "Palauta kortti alkutilaan", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Analog Output", // English - "Analoge Ausgabe", // Deutsch + "Toggle force letterbox", + "Letterbox erzwingen", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Kytke analoginen audio-ulostulo", // suomi + "Letterbox-näyttötilan pakotus päälle/pois", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "AC3 output on", // English - "AC3 Ausgabe Ein", // Deutsch + "Switch to analog audio output", + "Analoge Ausgabe", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "AC3-ulostulo päällä", // suomi + "Kytke analoginen audioulostulo", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "AC3 output off", // English - "AC3 Ausgabe Aus", // Deutsch + "AC3 output on", + "AC3 Ausgabe Ein", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "AC3-ulostulo pois", // suomi + "AC3-ulostulo päälle", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Digital output", // English - "Digitaler Ausgang", // Deutsch + "AC3 output off", + "AC3 Ausgabe Aus", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Kytke digitaalinen audio-ulostulo", // suomi + "AC3-ulostulo pois", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "DXR3: Releasing devices", // English - "DXR3: Releasing Devices", // Deutsch + "Switch to digital audio output", + "Digitaler Ausgang", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "DXR3: vapautetaan laitteet", // suomi + "Kytke digitaalinen audioulostulo", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Color settings", // English - "Farbeinstellungen", // Deutsch + "DXR3: releasing devices", + "DXR3: Releasing Devices", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Väriasetukset", // suomi + "DXR3: vapautetaan laitteet", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Brightness", // English - "Helligkeit", // Deutsch + "Color settings", + "Farbeinstellungen", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Kirkkaus", // suomi + "Väriasetukset", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Contrast", // English - "Kontrast", // Deutsch + "Brightness", + "Helligkeit", "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Kontrasti", // suomi + "Kirkkaus", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Saturation", // English - "Sättigung", // Deutsch + "Contrast", + "Kontrast", + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Kontrasti", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "Saturation", + "Sättigung", + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Värikylläisyys", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "Debug mode", + "", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Debug-tila", + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Românã + "", // Magyar + "", // Català +#if VDRVERSNUM > 10302 + "", // ÀãááÚØÙ (Russian) +# if VDRVERSNUM > 10307 + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif +# endif +#endif + }, + { + "Debug level", + "", // Deutsch "", // Slovenski "", // Italiano "", // Nederlands "", // Português "", // Français "", // Norsk - "Värikylläisyys", // suomi + "Debug-taso", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Debug mode", // English + "low", "", // Deutsch "", // Slovenski "", // Italiano @@ -417,23 +691,29 @@ const tI18nPhrase Phrases[] = { "", // Português "", // Français "", // Norsk - "Debug-tila", // suomi + "alhainen", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, { - "Debug level", // English + "everything", "", // Deutsch "", // Slovenski "", // Italiano @@ -441,18 +721,24 @@ const tI18nPhrase Phrases[] = { "", // Português "", // Français "", // Norsk - "Debug-taso", // suomi + "kaikki", "", // Polski "", // Español - "", // Ellinika + "", // ÅëëçíéêÜ (Greek) "", // Svenska - "", // Romaneste + "", // Românã "", // Magyar - "", // Catala + "", // Català #if VDRVERSNUM > 10302 - "", // Russian + "", // ÀãááÚØÙ (Russian) # if VDRVERSNUM > 10307 - "", // Croatian + "", // Hrvatski +# if VDRVERSNUM > 10312 + "", // Eesti +# if VDRVERSNUM > 10315 + "", // Dansk +# endif +# endif # endif #endif }, |