Revision: 23277
http://xbmc.svn.sourceforge.net/xbmc/?rev=23277&view=rev
Author: alwinus
Date: 2009-09-30 20:49:46 +0000 (Wed, 30 Sep 2009)
Log Message:
-----------
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Modified Paths:
--------------
trunk/guilib/Key.h
trunk/language/English/strings.xml
trunk/language/German/strings.xml
trunk/project/VS2008Express/XBMC.vcproj
trunk/skin/PM3.HD/720p/VideoOSD.xml
trunk/skin/PM3.HD/720p/custom_SkinSetting_1111.xml
trunk/skin/PM3.HD/language/English/strings.xml
trunk/skin/PM3.HD/language/German/strings.xml
trunk/system/Lircmap.xml
trunk/system/keymaps/keyboard.xml
trunk/system/keymaps/remote.xml
trunk/xbmc/Application.cpp
trunk/xbmc/ButtonTranslator.cpp
trunk/xbmc/GUISettings.cpp
trunk/xbmc/GUIWindowFullScreen.cpp
trunk/xbmc/GUIWindowOSD.cpp
trunk/xbmc/Makefile
trunk/xbmc/XBIRRemote.h
trunk/xbmc/cores/IPlayer.h
trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h
trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c
trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp
trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
trunk/xbmc/cores/dvdplayer/DVDMessageQueue.cpp
trunk/xbmc/cores/dvdplayer/DVDPlayer.cpp
trunk/xbmc/cores/dvdplayer/DVDPlayer.h
trunk/xbmc/cores/dvdplayer/Makefile
trunk/xbmc/cores/ffmpeg/avcodec.h
trunk/xbmc/cores/paplayer/MPCCodec/include/config.h.in
trunk/xbmc/utils/GUIInfoManager.cpp
trunk/xbmc/utils/GUIInfoManager.h
trunk/xbmc/utils/Makefile
Added Paths:
-----------
trunk/media/Fonts/teletext.ttf
trunk/xbmc/GUIDialogTeletext.cpp
trunk/xbmc/GUIDialogTeletext.h
trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp
trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.h
trunk/xbmc/utils/Teletext.cpp
trunk/xbmc/utils/Teletext.h
trunk/xbmc/utils/TeletextDefines.h
Modified: trunk/guilib/Key.h
===================================================================
--- trunk/guilib/Key.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/guilib/Key.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -276,6 +276,11 @@
#define ACTION_RELOAD_KEYMAPS 203 // reloads CButtonTranslator's keymaps
#define ACTION_GUIPROFILE_BEGIN 204 // start the GUIControlProfiler running
+#define ACTION_TELETEXT_RED 215 // Teletext Color buttons to control TopText
+#define ACTION_TELETEXT_GREEN 216 // " " " " " "
+#define ACTION_TELETEXT_YELLOW 217 // " " " " " "
+#define ACTION_TELETEXT_BLUE 218 // " " " " " "
+
// Window ID defines to make the code a bit more readable
#define WINDOW_INVALID 9999
#define WINDOW_HOME 10000
@@ -354,6 +359,8 @@
#define WINDOW_MUSIC_NAV 10502
#define WINDOW_MUSIC_PLAYLIST_EDITOR 10503
+#define WINDOW_DIALOG_OSD_TELETEXT 10600
+
//#define WINDOW_VIRTUAL_KEYBOARD 11000
#define WINDOW_DIALOG_SELECT 12000
#define WINDOW_MUSIC_INFO 12001
Modified: trunk/language/English/strings.xml
===================================================================
--- trunk/language/English/strings.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/language/English/strings.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -2110,6 +2110,8 @@
<string id="23000">Weather plugin</string>
<string id="23001">- Plugin settings</string>
+ <string id="23050">Activate Teletext</string>
+
<!-- strings 23100 thru 23150 reserved for external player -->
<string id="23100">External Player Active</string>
<string id="23101">Click OK to terminate the player</string>
Modified: trunk/language/German/strings.xml
===================================================================
--- trunk/language/German/strings.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/language/German/strings.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -1954,6 +1954,7 @@
<string id="22043">schwarz/weiß</string>
<string id="23000">Wetter-Plugin</string>
<string id="23001">- Plugin Einstellungen</string>
+ <string id="23050">Videotext aktivtieren</string>
<string id="29800">Datenbankmodus</string>
<string id="29801">QWERTY Tastatur</string>
<string id="29999">Automatische Videofilter-Korrektur für Spiele</string>
Added: trunk/media/Fonts/teletext.ttf
===================================================================
(Binary files differ)
Property changes on: trunk/media/Fonts/teletext.ttf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/project/VS2008Express/XBMC.vcproj
===================================================================
--- trunk/project/VS2008Express/XBMC.vcproj 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/project/VS2008Express/XBMC.vcproj 2009-09-30 20:49:46 UTC (rev 23277)
@@ -235,7 +235,7 @@
InlineFunctionExpansion="0"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\xbmc\cores\dvdplayer;..\..\xbmc\win32;..\..\xbmc\cores;..\..\xbmc\;..\..\xbmc\utils;..\..\guilib\;..\..\;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\xbmc\lib\libUPnP\Platinum\Source\Core;..\..\xbmc\lib\libUPnP\Platinum\Thirdparty\Neptune\Source\Core;..\..\xbmc\lib\libUPnP\Platinum\Thirdparty\Neptune\Source\System\Win32;..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay;..\..\xbmc\FileSystem;..\..\xbmc\lib\libRTMP;..\..\xbmc\lib\boost;"..\..\xbmc\lib\libSDL-WIN32\include";..\..\xbmc\lib\libPython\Python\PC;..\..\xbmc\lib\libsamplerate\src;..\..\xbmc\lib"
+ AdditionalIncludeDirectories="..\..\xbmc\cores\dvdplayer;..\..\xbmc\win32;..\..\xbmc\cores;..\..\xbmc\;..\..\xbmc\utils;..\..\guilib\;..\..\;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaRenderer;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaConnect;..\..\xbmc\lib\libUPnP\Platinum\Source\Devices\MediaServer;..\..\xbmc\lib\libUPnP\Platinum\Source\Core;..\..\xbmc\lib\libUPnP\Platinum\Thirdparty\Neptune\Source\Core;..\..\xbmc\lib\libUPnP\Platinum\Thirdparty\Neptune\Source\System\Win32;..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay;..\..\xbmc\FileSystem;..\..\xbmc\lib\libRTMP;..\..\xbmc\lib\boost;"..\..\xbmc\lib\libSDL-WIN32\include";..\..\xbmc\lib\libPython\Python\PC;..\..\xbmc\lib\libsamplerate\src;..\..\xbmc\lib;..\..\guilib\freetype2\include"
PreprocessorDefinitions="_WINDOWS;_MSVC;WIN32;NDEBUG;_WIN32_WINNT=0x0501;WINVER=0x0500;NOMINMAX;_USE_32BIT_TIME_T;HAS_DX"
StringPooling="false"
MinimalRebuild="false"
@@ -714,6 +714,14 @@
>
</File>
<File
+ RelativePath="..\..\xbmc\cores\dvdplayer\DVDPlayerTeletext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\xbmc\cores\dvdplayer\DVDPlayerTeletext.h"
+ >
+ </File>
+ <File
RelativePath="..\..\xbmc\cores\dvdplayer\DVDPlayerVideo.cpp"
>
</File>
@@ -3158,6 +3166,14 @@
>
</File>
<File
+ RelativePath="..\..\xbmc\utils\Teletext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\xbmc\utils\Teletext.h"
+ >
+ </File>
+ <File
RelativePath="..\..\xbmc\Temperature.cpp"
>
</File>
@@ -3506,6 +3522,14 @@
>
</File>
<File
+ RelativePath="..\..\xbmc\GUIDialogTeletext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\xbmc\GUIDialogTeletext.h"
+ >
+ </File>
+ <File
RelativePath="..\..\xbmc\GUIDialogVideoBookmarks.cpp"
>
</File>
@@ -5759,6 +5783,10 @@
>
</File>
<File
+ RelativePath="..\..\xbmc\utils\TeletextDefines.h"
+ >
+ </File>
+ <File
RelativePath="..\..\xbmc\Temperature.h"
>
</File>
Modified: trunk/skin/PM3.HD/720p/VideoOSD.xml
===================================================================
--- trunk/skin/PM3.HD/720p/VideoOSD.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/skin/PM3.HD/720p/VideoOSD.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -116,6 +116,15 @@
<texture>osd_panel.png</texture>
<visible>yes</visible>
</control>
+ <control type="image">
+ <description>Teletext Button</description>
+ <posx>138</posx>
+ <posy>15</posy>
+ <width>74</width>
+ <height>66</height>
+ <texture>osd_button_lyrics.png</texture>
+ <visible>VideoPlayer.HasTeletext + Skin.HasSetting(Player_Show_Teletext_Button)</visible>
+ </control>
<control type="button" id="210">
<description>Skip Bwd</description>
<posx>32</posx>
@@ -223,7 +232,25 @@
<onright>215</onright>
<onup>919</onup>
<ondown>921</ondown>
+ <visible>![VideoPlayer.HasTeletext] | ![Skin.HasSetting(Player_Show_Teletext_Button)]</visible>
</control>
+ <control type="button" id="918">
+ <description>Teletext Button</description>
+ <posx>138</posx>
+ <posy>15</posy>
+ <width>74</width>
+ <height>66</height>
+ <texturefocus>osd_button_lyricsFO.png</texturefocus>
+ <texturenofocus>osd_button_lyrics.png</texturenofocus>
+ <onclick>XBMC.ActivateWindow(Teletext)</onclick>
+ <label>-</label>
+ <font>-</font>
+ <onleft>208</onleft>
+ <onright>215</onright>
+ <onup>919</onup>
+ <ondown>921</ondown>
+ <visible>VideoPlayer.HasTeletext + Skin.HasSetting(Player_Show_Teletext_Button)</visible>
+ </control>
<control type="togglebutton" id="921">
<description>Video Menu</description>
<posx>147</posx>
@@ -280,4 +307,4 @@
</control>
</control>
</controls>
-</window>
\ No newline at end of file
+</window>
Modified: trunk/skin/PM3.HD/720p/custom_SkinSetting_1111.xml
===================================================================
--- trunk/skin/PM3.HD/720p/custom_SkinSetting_1111.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/skin/PM3.HD/720p/custom_SkinSetting_1111.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -144,6 +144,24 @@
<texturenofocus>-</texturenofocus>
<enable>Skin.HasSetting(Use_Startup_Playlist)</enable>
</control>
+ <control type="image" id="112">
+ <width>950</width>
+ <height>2</height>
+ <texture>separator.png</texture>
+ </control>
+ <control type="radiobutton" id="113">
+ <width>950</width>
+ <height>35</height>
+ <font>font12</font>
+ <label>31115</label>
+ <textcolor>grey2</textcolor>
+ <focusedcolor>white</focusedcolor>
+ <texturefocus border="7">list-focus.png</texturefocus>
+ <texturenofocus>-</texturenofocus>
+ <textureradiofocus>radiobutton-focus-2.png</textureradiofocus>
+ <onclick>Skin.ToggleSetting(Player_Show_Teletext_Button)</onclick>
+ <selected>Skin.HasSetting(Player_Show_Teletext_Button)</selected>
+ </control>
</control>
<control type="grouplist" id="9002">
<visible>Skin.String(SkinSettings,2)</visible>
Modified: trunk/skin/PM3.HD/language/English/strings.xml
===================================================================
--- trunk/skin/PM3.HD/language/English/strings.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/skin/PM3.HD/language/English/strings.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -80,6 +80,7 @@
<string id="31112">Show media titles in "Wide icons" view</string>
<string id="31113">Single Image</string>
<string id="31114">Multi Image</string>
+ <string id="31115">Replace Audio Settings Button with Teletext</string>
<!-- Script Settings labels -->
<string id="31200">Custom script options</string>
Modified: trunk/skin/PM3.HD/language/German/strings.xml
===================================================================
--- trunk/skin/PM3.HD/language/German/strings.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/skin/PM3.HD/language/German/strings.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -82,6 +82,7 @@
<string id="31109">Home Screen Hintergr\xFCnde</string>
<string id="31110">button - Aktiviere eigene Hintergr\xFCnde</string>
<string id="31111">Immer Musik Infos anzeigen w\xE4hrend der Liedtexte</string>
+ <string id="31115">Ersetzte Taste f\xFCr Audio Einstellungen mit Videotext</string>
<!-- Script Settings labels -->
<string id="31200">Eigene Script Optionen</string>
Modified: trunk/system/Lircmap.xml
===================================================================
--- trunk/system/Lircmap.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/system/Lircmap.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -48,10 +48,10 @@
<eight>Eight</eight>
<nine>Nine</nine>
<zero>Zero</zero>
- <mytv>Red</mytv>
- <mymusic>Green</mymusic>
- <mypictures>Yellow</mypictures>
- <myvideo>Blue</myvideo>
+ <red>Red</red>
+ <green>Green</green>
+ <yellow>Yellow</yellow>
+ <blue>Blue</blue>
</remote>
<remote device="XboxDVDDongle">
@@ -183,9 +183,9 @@
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
- <mytv>red</mytv>
- <mymusic>green</mymusic>
- <mypictures>yellow</mypictures>
- <myvideo>blue</myvideo>
+ <red>red</red>
+ <green>green</green>
+ <yellow>yellow</yellow>
+ <blue>blue</blue>
</remote>
</lircmap>
Modified: trunk/system/keymaps/keyboard.xml
===================================================================
--- trunk/system/keymaps/keyboard.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/system/keymaps/keyboard.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -163,6 +163,7 @@
<down>BigStepBack</down>
<a>AudioDelay</a>
<escape>Fullscreen</escape>
+ <v>XBMC.ActivateWindow(Teletext)</v>
</keyboard>
</FullscreenVideo>
<FullscreenInfo>
@@ -489,6 +490,13 @@
<space>Pause</space>
</keyboard>
</PictureInfo>
+ <Teletext>
+ <keyboard>
+ <backspace>Close</backspace>
+ <escape>Close</escape>
+ <v>Close</v>
+ </keyboard>
+ </Teletext>
<Favourites>
<keyboard>
<backspace>Close</backspace>
Modified: trunk/system/keymaps/remote.xml
===================================================================
--- trunk/system/keymaps/remote.xml 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/system/keymaps/remote.xml 2009-09-30 20:49:46 UTC (rev 23277)
@@ -67,6 +67,10 @@
<mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
<mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
<mytv>XBMC.ActivateWindow(Home)</mytv>
+ <red>XBMC.ActivateWindow(Home)</red>
+ <green>XBMC.ActivateWindow(MyVideos)</green>
+ <yellow>XBMC.ActivateWindow(MyMusic)</yellow>
+ <blue>XBMC.ActivateWindow(MyPictures)</blue>
<zero>Number0</zero>
<one>Number1</one>
<two>JumpSMS2</two>
@@ -138,6 +142,7 @@
<info>Info</info>
<enter>AspectRatio</enter>
<select>AspectRatio</select>
+ <teletext>XBMC.ActivateWindow(Teletext)</teletext>
</remote>
</FullscreenVideo>
<FullscreenInfo>
@@ -445,6 +450,29 @@
<back>Close</back>
</remote>
</PictureInfo>
+ <Teletext>
+ <remote>
+ <zero>number0</zero>
+ <one>number1</one>
+ <two>number2</two>
+ <three>number3</three>
+ <four>number4</four>
+ <five>number5</five>
+ <six>number6</six>
+ <seven>number7</seven>
+ <eight>number8</eight>
+ <nine>number9</nine>
+ <red>Red</red>
+ <green>Green</green>
+ <yellow>Yellow</yellow>
+ <blue>Blue</blue>
+ <info>Info</info>
+ <back>Close</back>
+ <menu>Close</menu>
+ <start>Close</start>
+ <teletext>Close</teletext>
+ </remote>
+ </Teletext>
<Favourites>
<remote>
<back>Close</back>
Modified: trunk/xbmc/Application.cpp
===================================================================
--- trunk/xbmc/Application.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/Application.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -210,6 +210,7 @@
#include "GUIDialogAccessPoints.h"
#endif
#include "GUIDialogFullScreenInfo.h"
+#include "GUIDialogTeletext.h"
#include "GUIDialogSlider.h"
#include "cores/dlgcache.h"
@@ -1149,6 +1150,7 @@
#ifdef HAS_DX
m_gWindowManager.Add(new CGUIWindowTestPatternDX); // window id = 8
#endif
+ m_gWindowManager.Add(new CGUIDialogTeletext); // window id =
m_gWindowManager.Add(new CGUIWindowSettingsScreenCalibration); // window id = 11
m_gWindowManager.Add(new CGUIWindowSettingsCategory); // window id = 12 slideshow:window id 2007
m_gWindowManager.Add(new CGUIWindowScripts); // window id = 20
@@ -3325,6 +3327,8 @@
m_gWindowManager.Delete(WINDOW_DIALOG_ACCESS_POINTS);
m_gWindowManager.Delete(WINDOW_DIALOG_SLIDER);
+ m_gWindowManager.Delete(WINDOW_DIALOG_OSD_TELETEXT);
+
m_gWindowManager.Delete(WINDOW_STARTUP);
m_gWindowManager.Delete(WINDOW_LOGIN_SCREEN);
m_gWindowManager.Delete(WINDOW_VISUALISATION);
Modified: trunk/xbmc/ButtonTranslator.cpp
===================================================================
--- trunk/xbmc/ButtonTranslator.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/ButtonTranslator.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -44,7 +44,7 @@
int action;
} ActionMapping;
-static const ActionMapping actions[] =
+static const ActionMapping actions[] =
{{"left" , ACTION_MOVE_LEFT },
{"right" , ACTION_MOVE_RIGHT},
{"up" , ACTION_MOVE_UP },
@@ -185,7 +185,11 @@
{"filtersms9" , ACTION_FILTER_SMS9},
{"firstpage" , ACTION_FIRST_PAGE},
{"lastpage" , ACTION_LAST_PAGE},
- {"guiprofile" , ACTION_GUIPROFILE_BEGIN}};
+ {"guiprofile" , ACTION_GUIPROFILE_BEGIN},
+ {"red" , ACTION_TELETEXT_RED},
+ {"green" , ACTION_TELETEXT_GREEN},
+ {"yellow" , ACTION_TELETEXT_YELLOW},
+ {"blue" , ACTION_TELETEXT_BLUE}};
CButtonTranslator& CButtonTranslator::GetInstance()
{
@@ -821,7 +825,7 @@
if (strAction.Equals("noop"))
return true;
-
+
for (unsigned int index=0;index < sizeof(actions)/sizeof(actions[0]);++index)
{
if (strAction.Equals(actions[index].name))
@@ -880,6 +884,7 @@
else if (strWindow.Equals("videolibrary")) windowID = WINDOW_VIDEO_NAV;
else if (strWindow.Equals("videoplaylist")) windowID = WINDOW_VIDEO_PLAYLIST;
else if (strWindow.Equals("systeminfo")) windowID = WINDOW_SYSTEM_INFORMATION;
+ else if (strWindow.Equals("teletext")) windowID = WINDOW_DIALOG_OSD_TELETEXT;
else if (strWindow.Equals("guicalibration")) windowID = WINDOW_SCREEN_CALIBRATION;
else if (strWindow.Equals("screencalibration")) windowID = WINDOW_SCREEN_CALIBRATION;
else if (strWindow.Equals("testpattern")) windowID = WINDOW_TEST_PATTERN;
@@ -1047,6 +1052,11 @@
else if (strButton.Equals("clear")) buttonCode = XINPUT_IR_REMOTE_CLEAR;
else if (strButton.Equals("enter")) buttonCode = XINPUT_IR_REMOTE_SELECT; // same as select
else if (strButton.Equals("xbox")) buttonCode = XINPUT_IR_REMOTE_DISPLAY; // same as display
+ else if (strButton.Equals("teletext")) buttonCode = XINPUT_IR_REMOTE_TELETEXT;
+ else if (strButton.Equals("red")) buttonCode = XINPUT_IR_REMOTE_RED;
+ else if (strButton.Equals("green")) buttonCode = XINPUT_IR_REMOTE_GREEN;
+ else if (strButton.Equals("yellow")) buttonCode = XINPUT_IR_REMOTE_YELLOW;
+ else if (strButton.Equals("blue")) buttonCode = XINPUT_IR_REMOTE_BLUE;
else CLog::Log(LOGERROR, "Remote Translator: Can't find button %s", strButton.c_str());
return buttonCode;
}
Added: trunk/xbmc/GUIDialogTeletext.cpp
===================================================================
--- trunk/xbmc/GUIDialogTeletext.cpp (rev 0)
+++ trunk/xbmc/GUIDialogTeletext.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2005-2009 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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 General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "GUIDialogTeletext.h"
+#include "utils/log.h"
+#include "GUIWindowManager.h"
+#include "GUISettings.h"
+#include "Application.h"
+#include "GUITexture.h"
+#include "Texture.h"
+#include "Settings.h"
+
+using namespace std;
+
+static int teletextFadeAmount = 0;
+
+CGUIDialogTeletext::CGUIDialogTeletext()
+ : CGUIDialog(WINDOW_DIALOG_OSD_TELETEXT, "")
+{
+ m_isDialog = false;
+ m_pTxtTexture = NULL;
+}
+
+CGUIDialogTeletext::~CGUIDialogTeletext()
+{
+}
+
+bool CGUIDialogTeletext::OnAction(const CAction& action)
+{
+ if (action.id == ACTION_PREVIOUS_MENU || action.id == ACTION_CLOSE_DIALOG)
+ {
+ m_bClose = true;
+ return true;
+ }
+
+ if (m_TextDecoder.HandleAction(action))
+ return true;
+
+ return CGUIDialog::OnAction(action);
+}
+
+bool CGUIDialogTeletext::OnMessage(CGUIMessage& message)
+{
+ if (message.GetMessage() == GUI_MSG_WINDOW_INIT)
+ {
+ /* Do not open if no teletext is available */
+ if (!g_application.m_pPlayer->GetTeletextCache())
+ {
+ Close();
+ return true;
+ }
+ }
+ return CGUIDialog::OnMessage(message);
+}
+
+void CGUIDialogTeletext::Render()
+{
+ // Do not render if we have no texture
+ if (!m_pTxtTexture)
+ {
+ CLog::Log(LOGERROR, "CGUITeletextBox::Render called without texture");
+ return;
+ }
+
+ m_TextDecoder.RenderPage();
+
+ if (!m_bClose)
+ {
+ if (teletextFadeAmount < 100)
+ teletextFadeAmount = std::min(100, teletextFadeAmount + 5);
+ }
+ else
+ {
+ if (teletextFadeAmount > 0)
+ teletextFadeAmount = std::max(0, teletextFadeAmount - 10);
+
+ if (teletextFadeAmount == 0)
+ Close();
+ }
+
+ unsigned char* textureBuffer = (unsigned char*)m_TextDecoder.GetTextureBuffer();
+ if (!m_bClose && m_TextDecoder.NeedRendering() && textureBuffer)
+ {
+ m_pTxtTexture->Update(m_TextDecoder.GetWidth(), m_TextDecoder.GetHeight(), m_TextDecoder.GetWidth()*4, XB_FMT_B8G8R8A8, textureBuffer, false);
+ m_TextDecoder.RenderingDone();
+ }
+
+ color_t color = ((color_t)(teletextFadeAmount * 2.55f) & 0xff) << 24 | 0xFFFFFF;
+ CGUITexture::DrawQuad(m_vertCoords, color, m_pTxtTexture);
+
+ CGUIDialog::Render();
+}
+
+void CGUIDialogTeletext::OnInitWindow()
+{
+ teletextFadeAmount = 0;
+ m_bClose = false;
+ m_windowLoaded = true;
+
+ RESOLUTION res = g_graphicsContext.GetVideoResolution();
+ m_vertCoords.SetRect((float)g_settings.m_ResInfo[res].Overscan.left,
+ (float)g_settings.m_ResInfo[res].Overscan.top,
+ (float)g_settings.m_ResInfo[res].Overscan.right,
+ (float)g_settings.m_ResInfo[res].Overscan.bottom);
+
+ if (!m_TextDecoder.InitDecoder())
+ {
+ CLog::Log(LOGERROR, "%s: failed to init teletext decoder", __FUNCTION__);
+ Close();
+ }
+
+ m_pTxtTexture = new CTexture(m_TextDecoder.GetWidth(), m_TextDecoder.GetHeight(), 32, XB_FMT_B8G8R8A8);
+ if (!m_pTxtTexture)
+ {
+ CLog::Log(LOGERROR, "%s: failed to create texture", __FUNCTION__);
+ Close();
+ }
+
+ CGUIDialog::OnInitWindow();
+}
+
+void CGUIDialogTeletext::OnDeinitWindow(int nextWindowID)
+{
+ m_windowLoaded = false;
+ m_TextDecoder.EndDecoder();
+
+ delete m_pTxtTexture;
+ m_pTxtTexture = NULL;
+
+ CGUIDialog::OnDeinitWindow(nextWindowID);
+}
Property changes on: trunk/xbmc/GUIDialogTeletext.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/xbmc/GUIDialogTeletext.h
===================================================================
--- trunk/xbmc/GUIDialogTeletext.h (rev 0)
+++ trunk/xbmc/GUIDialogTeletext.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ * Copyright (C) 2005-2009 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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 General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "GUIDialog.h"
+#include "utils/Teletext.h"
+
+class CBaseTexture;
+
+class CGUIDialogTeletext : public CGUIDialog
+{
+public:
+ CGUIDialogTeletext(void);
+ virtual ~CGUIDialogTeletext(void);
+ virtual bool OnMessage(CGUIMessage& message);
+ virtual bool OnAction(const CAction& action);
+ virtual void Render();
+ virtual void OnInitWindow();
+ virtual void OnDeinitWindow(int nextWindowID);
+
+protected:
+ bool m_bClose; /* Close sendet, needed for fade out */
+ CBaseTexture* m_pTxtTexture; /* Texture info class to render to screen */
+ CRect m_vertCoords; /* Coordinates of teletext field on screen */
+ CTeletextDecoder m_TextDecoder; /* Decoding class for teletext code */
+};
Property changes on: trunk/xbmc/GUIDialogTeletext.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/xbmc/GUISettings.cpp
===================================================================
--- trunk/xbmc/GUISettings.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/GUISettings.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -484,6 +484,9 @@
AddFloat(21, "videoplayer.maxspeedadjust", 13504, 5.0f, 0.0f, 0.1f, 10.0f);
AddInt(22, "videoplayer.resamplequality", 13505, RESAMPLE_MID, RESAMPLE_LOW, 1, RESAMPLE_REALLYHIGH, SPIN_CONTROL_TEXT);
+ AddSeparator(23, "videoplayer.sep5");
+ AddBool(24, "videoplayer.teletextenabled", 23050, true);
+
AddCategory(5, "subtitles", 287);
AddString(1, "subtitles.font", 288, "arial.ttf", SPIN_CONTROL_TEXT);
AddInt(2, "subtitles.height", 289, 28, 16, 2, 74, SPIN_CONTROL_TEXT); // use text as there is a disk based lookup needed
Modified: trunk/xbmc/GUIWindowFullScreen.cpp
===================================================================
--- trunk/xbmc/GUIWindowFullScreen.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/GUIWindowFullScreen.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -502,9 +502,11 @@
{
CGUIWindow::OnMessage(message);
+ CGUIDialog *pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_DIALOG_OSD_TELETEXT);
+ if (pDialog) pDialog->Close(true);
CGUIDialogSlider *slider = (CGUIDialogSlider *)m_gWindowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (slider) slider->Close(true);
- CGUIDialog *pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_OSD);
+ pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_OSD);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog) pDialog->Close(true);
Modified: trunk/xbmc/GUIWindowOSD.cpp
===================================================================
--- trunk/xbmc/GUIWindowOSD.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/GUIWindowOSD.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -47,7 +47,8 @@
// check for movement of mouse or a submenu open
if (g_Mouse.HasMoved() || m_gWindowManager.IsWindowActive(WINDOW_DIALOG_AUDIO_OSD_SETTINGS)
|| m_gWindowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_OSD_SETTINGS)
- || m_gWindowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_BOOKMARKS))
+ || m_gWindowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_BOOKMARKS)
+ || m_gWindowManager.IsWindowActive(WINDOW_DIALOG_OSD_TELETEXT))
SetAutoClose(3000);
}
CGUIDialog::Render();
@@ -108,6 +109,8 @@
if (pDialog && pDialog->IsDialogRunning()) pDialog->Close(true);
pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_DIALOG_VIDEO_BOOKMARKS);
if (pDialog && pDialog->IsDialogRunning()) pDialog->Close(true);
+ pDialog = (CGUIDialog *)m_gWindowManager.GetWindow(WINDOW_DIALOG_OSD_TELETEXT);
+ if (pDialog && pDialog->IsDialogRunning()) pDialog->Close(true);
}
break;
}
Modified: trunk/xbmc/Makefile
===================================================================
--- trunk/xbmc/Makefile 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/Makefile 2009-09-30 20:49:46 UTC (rev 23277)
@@ -1,4 +1,4 @@
-INCLUDES+=-I. -Ilinux -Icores -I../guilib -Iutils -IFileSystem
+INCLUDES+=-I. -Ilinux -Icores -I../guilib -Iutils -IFileSystem -I/usr/include/freetype2
INCLUDES+=-Ilib/libUPnP/Platinum/ThirdParty/Neptune/Source/Core \
-Ilib/libUPnP/Platinum/Source/Core \
@@ -133,6 +133,7 @@
GUIDialogSelect.cpp \
GUIDialogSettings.cpp \
GUIDialogSubMenu.cpp \
+ GUIDialogTeletext.cpp \
GUIDialogVideoBookmarks.cpp \
GUIDialogVideoSettings.cpp \
GUIDialogVisualisationPresetList.cpp \
Modified: trunk/xbmc/XBIRRemote.h
===================================================================
--- trunk/xbmc/XBIRRemote.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/XBIRRemote.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -58,6 +58,13 @@
#define XINPUT_IR_REMOTE_HASH 41
#define XINPUT_IR_REMOTE_CLEAR 249
+// additional keys not defined by xbox remotes but present on generic remotes
+#define XINPUT_IR_REMOTE_TELETEXT 250
+#define XINPUT_IR_REMOTE_RED 251
+#define XINPUT_IR_REMOTE_GREEN 252
+#define XINPUT_IR_REMOTE_YELLOW 253
+#define XINPUT_IR_REMOTE_BLUE 254
+
typedef struct _XINPUT_IR_REMOTE
{
BYTE wButtons;
Modified: trunk/xbmc/cores/IPlayer.h
===================================================================
--- trunk/xbmc/cores/IPlayer.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/IPlayer.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -24,6 +24,7 @@
#include "IAudioCallback.h"
#include "Key.h"
+struct TextCacheStruct_t;
class TiXmlElement;
class CStreamDetails;
@@ -68,7 +69,7 @@
virtual bool QueueNextFile(const CFileItem &file) { return false; }
virtual void OnNothingToQueueNotify() {}
virtual bool CloseFile(){ return true;}
- virtual bool IsPlaying() const { return false;}
+ virtual bool IsPlaying() const { return false;}
virtual void Pause() = 0;
virtual bool IsPaused() const = 0;
virtual bool HasVideo() const = 0;
@@ -110,6 +111,9 @@
virtual void GetAudioStreamName(int iStream, CStdString &strStreamName){};
virtual void SetAudioStream(int iStream){};
+ virtual TextCacheStruct_t* GetTeletextCache() { return NULL; };
+ virtual void LoadPage(int p, int sp, unsigned char* buffer) {};
+
virtual int GetChapterCount() { return 0; }
virtual int GetChapter() { return -1; }
virtual void GetChapterName(CStdString& strChapterName) { return; }
@@ -138,7 +142,7 @@
//Returns true if not playback (paused or stopped beeing filled)
virtual bool IsCaching() const {return false;};
//Cache filled in Percent
- virtual int GetCacheLevel() const {return -1;};
+ virtual int GetCacheLevel() const {return -1;};
virtual bool IsInMenu() const {return false;};
virtual bool HasMenu() { return false; };
@@ -151,6 +155,8 @@
virtual CStdString GetPlayerState() { return ""; };
virtual bool SetPlayerState(CStdString state) { return false;};
+ virtual CStdString GetPlayingTitle() { return ""; };
+
protected:
IPlayerCallback& m_callback;
};
Modified: trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h
===================================================================
--- trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavcodec/avcodec.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -329,6 +329,11 @@
CODEC_ID_SSA,
CODEC_ID_MOV_TEXT,
+ /* data codecs */
+ CODEC_ID_VBI_DATA= 0x17500,
+ CODEC_ID_VBI_TELETEXT,
+ CODEC_ID_EBU_TELETEXT,
+
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000,
Modified: trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c
===================================================================
--- trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/mpegts.c 2009-09-30 20:49:46 UTC (rev 23277)
@@ -542,7 +542,9 @@
{ 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
{ 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
{ 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
- { 0x56, CODEC_TYPE_DATA, CODEC_ID_NONE }, /* VBI descriptor */
+ { 0x45, CODEC_TYPE_DATA, CODEC_ID_VBI_DATA }, /* VBI Data descriptor */
+ { 0x46, CODEC_TYPE_DATA, CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */
+ { 0x56, CODEC_TYPE_DATA, CODEC_ID_EBU_TELETEXT }, /* EBU Teletext descriptor */
{ 0 },
};
Modified: trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -23,6 +23,11 @@
#include "DVDCodecs/DVDCodecs.h"
#include "../../../LangCodeExpander.h"
+void CDemuxStreamTeletext::GetStreamInfo(std::string& strInfo)
+{
+ strInfo = "Teletext Data Stream";
+}
+
void CDemuxStreamAudio::GetStreamType(std::string& strInfo)
{
char sInfo[64];
@@ -83,6 +88,19 @@
return iCounter;
}
+int CDVDDemux::GetNrOfTeletextStreams()
+{
+ int iCounter = 0;
+
+ for (int i = 0; i < GetNrOfStreams(); i++)
+ {
+ CDemuxStream* pStream = GetStream(i);
+ if (pStream->type == STREAM_TELETEXT) iCounter++;
+ }
+
+ return iCounter;
+}
+
CDemuxStreamAudio* CDVDDemux::GetStreamFromAudioId(int iAudioIndex)
{
int counter = -1;
@@ -125,6 +143,20 @@
return NULL;
}
+CDemuxStreamTeletext* CDVDDemux::GetStreamFromTeletextId(int iTeletextIndex)
+{
+ int counter = -1;
+ for (int i = 0; i < GetNrOfStreams(); i++)
+ {
+ CDemuxStream* pStream = GetStream(i);
+
+ if (pStream->type == STREAM_TELETEXT) counter++;
+ if (iTeletextIndex == counter)
+ return (CDemuxStreamTeletext*)pStream;
+ }
+ return NULL;
+}
+
void CDemuxStream::GetStreamName( std::string& strInfo )
{
if( language[0] == 0 )
Modified: trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -52,7 +52,8 @@
STREAM_AUDIO, // audio stream
STREAM_VIDEO, // video stream
STREAM_DATA, // data stream
- STREAM_SUBTITLE // subtitle stream
+ STREAM_SUBTITLE,// subtitle stream
+ STREAM_TELETEXT // Teletext data stream
};
enum StreamSource {
@@ -175,6 +176,16 @@
int identifier;
};
+class CDemuxStreamTeletext : public CDemuxStream
+{
+public:
+ CDemuxStreamTeletext() : CDemuxStream()
+ {
+ type = STREAM_TELETEXT;
+ }
+ virtual void GetStreamInfo(std::string& strInfo);
+};
+
typedef struct DemuxPacket
{
BYTE* pData; // data
@@ -285,6 +296,11 @@
int GetNrOfSubtitleStreams();
/*
+ * return nr of teletext streams, 0 if none
+ */
+ int GetNrOfTeletextStreams();
+
+ /*
* return the audio stream, or NULL if it does not exist
*/
CDemuxStreamAudio* GetStreamFromAudioId(int iAudioIndex);
@@ -300,6 +316,11 @@
CDemuxStreamSubtitle* GetStreamFromSubtitleId(int iSubtitleIndex);
/*
+ * return the teletext stream, or NULL if it does not exist
+ */
+ CDemuxStreamTeletext* GetStreamFromTeletextId(int iTeletextIndex);
+
+ /*
* return a user-presentable codec name of the given stream
*/
virtual void GetStreamCodecName(int iStreamId, CStdString &strName) {};
Modified: trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -42,6 +42,7 @@
#include "DVDClock.h" // for DVD_TIME_BASE
#include "utils/Win32Exception.h"
#include "AdvancedSettings.h"
+#include "GUISettings.h"
#include "FileSystem/File.h"
#include "utils/log.h"
#include "Thread.h"
@@ -998,9 +999,21 @@
}
case CODEC_TYPE_DATA:
{
- m_streams[iId] = new CDemuxStream();
- m_streams[iId]->type = STREAM_DATA;
- break;
+#if (! defined USE_EXTERNAL_FFMPEG)
+ if (pStream->codec->codec_id == CODEC_ID_EBU_TELETEXT && g_guiSettings.GetBool("videoplayer.teletextenabled"))
+ {
+ CDemuxStreamTeletext* st = new CDemuxStreamTeletext();
+ m_streams[iId] = st;
+ m_streams[iId]->type = STREAM_TELETEXT;
+ break;
+ }
+ else
+#endif
+ {
+ m_streams[iId] = new CDemuxStream();
+ m_streams[iId]->type = STREAM_DATA;
+ break;
+ }
}
case CODEC_TYPE_SUBTITLE:
{
Modified: trunk/xbmc/cores/dvdplayer/DVDMessageQueue.cpp
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDMessageQueue.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDMessageQueue.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -224,7 +224,7 @@
m_iDataSize -= pMsgDemuxerPacket->GetPacketSize();
if(m_iDataSize == 0)
{
- if(!m_bEmptied)
+ if(!m_bEmptied && m_owner != "teletext") // Prevent log flooding
CLog::Log(LOGWARNING, "CDVDMessageQueue(%s)::Get - retrieved last data packet of queue", m_owner.c_str());
m_bEmptied = true;
}
Modified: trunk/xbmc/cores/dvdplayer/DVDPlayer.cpp
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDPlayer.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDPlayer.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -143,6 +143,8 @@
return IndexOf(type, p.m_CurrentVideo.source, p.m_CurrentVideo.id);
else if(type == STREAM_SUBTITLE)
return IndexOf(type, p.m_CurrentSubtitle.source, p.m_CurrentSubtitle.id);
+ else if(type == STREAM_TELETEXT)
+ return IndexOf(type, p.m_CurrentTeletext.source, p.m_CurrentTeletext.id);
return -1;
}
@@ -255,10 +257,12 @@
m_CurrentAudio(STREAM_AUDIO),
m_CurrentVideo(STREAM_VIDEO),
m_CurrentSubtitle(STREAM_SUBTITLE),
+ m_CurrentTeletext(STREAM_TELETEXT),
m_messenger("player"),
m_dvdPlayerVideo(&m_clock, &m_overlayContainer, m_messenger),
m_dvdPlayerAudio(&m_clock),
- m_dvdPlayerSubtitle(&m_overlayContainer)
+ m_dvdPlayerSubtitle(&m_overlayContainer),
+ m_dvdPlayerTeletext()
{
m_pDemuxer = NULL;
m_pSubtitleDemuxer = NULL;
@@ -399,6 +403,7 @@
m_CurrentVideo.Clear();
m_CurrentAudio.Clear();
m_CurrentSubtitle.Clear();
+ m_CurrentTeletext.Clear();
m_messenger.Init();
@@ -577,6 +582,17 @@
else
m_dvdPlayerVideo.EnableSubtitle(false);
+ // open teletext data stream
+ count = m_SelectionStreams.Count(STREAM_TELETEXT);
+ valid = false;
+ for(int i = 0;i<count && !valid;i++)
+ {
+ SelectionStream& s = m_SelectionStreams.Get(STREAM_TELETEXT, i);
+ if(OpenTeletextStream(s.id, s.source))
+ valid = true;
+ }
+ if(!valid)
+ CloseTeletextStream(true);
}
bool CDVDPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream)
@@ -729,6 +745,9 @@
if(current.type == STREAM_SUBTITLE)
return false;
+ if(current.type == STREAM_TELETEXT)
+ return false;
+
if(current.id < 0)
return true;
}
@@ -978,9 +997,12 @@
m_dvdPlayerVideo.SendMessage (new CDVDMsg(CDVDMsg::GENERAL_EOF));
if(m_CurrentSubtitle.inited)
m_dvdPlayerSubtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_EOF));
+ if(m_CurrentTeletext.inited)
+ m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_EOF));
m_CurrentAudio.inited = false;
m_CurrentVideo.inited = false;
m_CurrentSubtitle.inited = false;
+ m_CurrentTeletext.inited = false;
// if we are caching, start playing it again
if (m_caching && !m_bAbortRequest)
@@ -1018,6 +1040,7 @@
if (!IsValidStream(m_CurrentAudio)) CloseAudioStream(true);
if (!IsValidStream(m_CurrentVideo)) CloseVideoStream(true);
if (!IsValidStream(m_CurrentSubtitle)) CloseSubtitleStream(true);
+ if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true);
}
// check if there is any better stream to use (normally for dvd's)
@@ -1026,6 +1049,7 @@
// Do not reopen non-video streams if we're in video-only mode
if (IsBetterStream(m_CurrentAudio, pStream)) OpenAudioStream(pStream->iId, pStream->source);
if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source);
+ if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
}
if (IsBetterStream(m_CurrentVideo, pStream)) OpenVideoStream(pStream->iId, pStream->source);
@@ -1057,6 +1081,8 @@
ProcessVideoData(pStream, pPacket);
else if (pPacket->iStreamId == m_CurrentSubtitle.id && pStream->source == m_CurrentSubtitle.source && pStream->type == STREAM_SUBTITLE)
ProcessSubData(pStream, pPacket);
+ else if (pPacket->iStreamId == m_CurrentTeletext.id && pStream->source == m_CurrentTeletext.source && pStream->type == STREAM_TELETEXT)
+ ProcessTeletextData(pStream, pPacket);
else
{
pStream->SetDiscard(AVDISCARD_ALL);
@@ -1182,6 +1208,39 @@
m_dvdPlayerSubtitle.UpdateOverlayInfo((CDVDInputStreamNavigator*)m_pInputStream, LIBDVDNAV_BUTTON_NORMAL);
}
+void CDVDPlayer::ProcessTeletextData(CDemuxStream* pStream, DemuxPacket* pPacket)
+{
+ if (m_CurrentTeletext.stream != (void*)pStream)
+ {
+ /* check so that dmuxer hints or extra data hasn't changed */
+ /* if they have, reopen stream */
+
+ if (m_CurrentTeletext.hint != CDVDStreamInfo(*pStream, true))
+ {
+ // we don't actually have to close audiostream here first, as
+ // we could send it as a stream message. only problem
+ // is how to notify player if a stream change failed.
+ CloseTeletextStream( true );
+ OpenTeletextStream( pPacket->iStreamId, pStream->source );
+ }
+
+ m_CurrentTeletext.stream = (void*)pStream;
+ }
+ if(pPacket->dts != DVD_NOPTS_VALUE)
+ m_CurrentTeletext.dts = pPacket->dts;
+ else if(pPacket->pts != DVD_NOPTS_VALUE)
+ m_CurrentTeletext.dts = pPacket->pts;
+
+ bool drop = false;
+ if (CheckPlayerInit(m_CurrentTeletext, DVDPLAYER_TELETEXT))
+ drop = true;
+
+ if (CheckSceneSkip(m_CurrentTeletext))
+ drop = true;
+
+ m_dvdPlayerTeletext.SendMessage(new CDVDMsgDemuxerPacket(pPacket, drop));
+}
+
void CDVDPlayer::HandlePlaySpeed()
{
if(GetPlaySpeed() != DVD_PLAYSPEED_NORMAL && GetPlaySpeed() != DVD_PLAYSPEED_PAUSE)
@@ -1252,6 +1311,8 @@
m_CurrentVideo.startpts = current.dts;
if(m_CurrentSubtitle.startpts != DVD_NOPTS_VALUE)
m_CurrentSubtitle.startpts = current.dts;
+ if(m_CurrentTeletext.startpts != DVD_NOPTS_VALUE)
+ m_CurrentTeletext.startpts = current.dts;
}
}
@@ -1381,6 +1442,7 @@
m_CurrentAudio.inited = false;
m_CurrentVideo.inited = false;
m_CurrentSubtitle.inited = false;
+ m_CurrentTeletext.inited = false;
}
/* stream jump forward */
@@ -1394,6 +1456,7 @@
m_CurrentAudio.inited = false;
m_CurrentVideo.inited = false;
m_CurrentSubtitle.inited = false;
+ m_CurrentTeletext.inited = false;
}
}
@@ -1525,7 +1588,8 @@
/* if we are awaiting a start sync, we can't sync here or we could deadlock */
if(m_CurrentAudio.startsync
|| m_CurrentVideo.startsync
- || m_CurrentSubtitle.startsync)
+ || m_CurrentSubtitle.startsync
+ || m_CurrentTeletext.startsync)
{
CLog::Log(LOGDEBUG, "%s - can't sync since we are already awaiting a sync", __FUNCTION__);
return;
@@ -1571,6 +1635,8 @@
m_dvdPlayerVideo.SendMessage(pMsg);
if(target == DVDPLAYER_SUBTITLE)
m_dvdPlayerSubtitle.SendMessage(pMsg);
+ if(target == DVDPLAYER_TELETEXT)
+ m_dvdPlayerTeletext.SendMessage(pMsg);
}
void CDVDPlayer::OnExit()
@@ -1613,6 +1679,11 @@
CLog::Log(LOGNOTICE, "DVDPlayer: closing video stream");
CloseSubtitleStream(!m_bAbortRequest);
}
+ if (m_CurrentTeletext.id >= 0)
+ {
+ CLog::Log(LOGNOTICE, "DVDPlayer: closing teletext stream");
+ CloseTeletextStream(!m_bAbortRequest);
+ }
// destroy the demuxer
if (m_pDemuxer)
{
@@ -2237,6 +2308,22 @@
SyncronizeDemuxer(100);
}
+TextCacheStruct_t* CDVDPlayer::GetTeletextCache()
+{
+ if (m_CurrentTeletext.id < 0)
+ return 0;
+
+ return m_dvdPlayerTeletext.GetTeletextCache();
+}
+
+void CDVDPlayer::LoadPage(int p, int sp, unsigned char* buffer)
+{
+ if (m_CurrentTeletext.id < 0)
+ return;
+
+ return m_dvdPlayerTeletext.LoadPage(p, sp, buffer);
+}
+
void CDVDPlayer::SeekTime(__int64 iTime)
{
m_messenger.Put(new CDVDMsgPlayerSeek((int)iTime, true, true, true));
@@ -2489,6 +2576,52 @@
return true;
}
+bool CDVDPlayer::OpenTeletextStream(int iStream, int source)
+{
+ if (!m_pDemuxer)
+ return false;
+
+ CDemuxStream* pStream = m_pDemuxer->GetStream(iStream);
+ if(!pStream || pStream->disabled)
+ return false;
+
+ CDVDStreamInfo hint(*pStream, true);
+
+ if (!m_dvdPlayerTeletext.CheckStream(hint))
+ return false;
+
+ CLog::Log(LOGNOTICE, "Opening teletext stream: %i source: %i", iStream, source);
+
+ if(m_CurrentTeletext.id < 0
+ || m_CurrentTeletext.hint != hint)
+ {
+ if(m_CurrentTeletext.id >= 0)
+ {
+ CLog::Log(LOGDEBUG, " - teletext codecs hints have changed, must close previous stream");
+ CloseTeletextStream(true);
+ }
+
+ if (!m_dvdPlayerTeletext.OpenStream(hint))
+ {
+ /* mark stream as disabled, to disallaw further attempts*/
+ CLog::Log(LOGWARNING, "%s - Unsupported teletext stream %d. Stream disabled.", __FUNCTION__, iStream);
+ pStream->disabled = true;
+ pStream->SetDiscard(AVDISCARD_ALL);
+ return false;
+ }
+ }
+ else
+ m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
+
+ /* store information about stream */
+ m_CurrentTeletext.id = iStream;
+ m_CurrentTeletext.source = source;
+ m_CurrentTeletext.hint = hint;
+ m_CurrentTeletext.stream = (void*)pStream;
+
+ return true;
+}
+
bool CDVDPlayer::CloseAudioStream(bool bWaitForBuffers)
{
if (m_CurrentAudio.id < 0)
@@ -2528,6 +2661,19 @@
return true;
}
+bool CDVDPlayer::CloseTeletextStream(bool bWaitForBuffers)
+{
+ if (m_CurrentTeletext.id < 0)
+ return false;
+
+ CLog::Log(LOGNOTICE, "Closing teletext stream");
+
+ m_dvdPlayerTeletext.CloseStream(bWaitForBuffers);
+
+ m_CurrentTeletext.Clear();
+ return true;
+}
+
void CDVDPlayer::FlushBuffers(bool queued)
{
if(queued)
@@ -2536,6 +2682,7 @@
m_dvdPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
m_dvdPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::VIDEO_NOSKIP));
m_dvdPlayerSubtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
+ m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
SyncronizePlayers(SYNCSOURCE_ALL);
}
else
@@ -2543,6 +2690,7 @@
m_dvdPlayerAudio.Flush();
m_dvdPlayerVideo.Flush();
m_dvdPlayerSubtitle.Flush();
+ m_dvdPlayerTeletext.Flush();
// clear subtitle and menu overlays
m_overlayContainer.Clear();
@@ -2550,6 +2698,7 @@
m_CurrentAudio.inited = false;
m_CurrentVideo.inited = false;
m_CurrentSubtitle.inited = false;
+ m_CurrentTeletext.inited = false;
}
// since we call ffmpeg functions to decode, this is being called in the same thread as ::Process() is
@@ -3266,6 +3415,16 @@
return false;
}
+CStdString CDVDPlayer::GetPlayingTitle()
+{
+ /* Currently we support only Title Name from Teletext line 30 */
+ TextCacheStruct_t* ttcache = m_dvdPlayerTeletext.GetTeletextCache();
+ if (ttcache && !ttcache->line30.empty())
+ return ttcache->line30;
+
+ return "";
+}
+
CDVDPlayer::CPlayerSeek::CPlayerSeek(CDVDPlayer* player)
: m_player(*player)
{
Modified: trunk/xbmc/cores/dvdplayer/DVDPlayer.h
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDPlayer.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/DVDPlayer.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -31,6 +31,7 @@
#include "DVDPlayerAudio.h"
#include "DVDPlayerVideo.h"
#include "DVDPlayerSubtitle.h"
+#include "DVDPlayerTeletext.h"
//#include "DVDChapterReader.h"
#include "DVDSubtitles/DVDFactorySubtitle.h"
@@ -127,6 +128,7 @@
#define DVDPLAYER_AUDIO 1
#define DVDPLAYER_VIDEO 2
#define DVDPLAYER_SUBTITLE 3
+#define DVDPLAYER_TELETEXT 4
class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer
{
@@ -178,6 +180,9 @@
virtual void GetAudioStreamName(int iStream, CStdString &strStreamName);
virtual void SetAudioStream(int iStream);
+ virtual TextCacheStruct_t* GetTeletextCache();
+ virtual void LoadPage(int p, int sp, unsigned char* buffer);
+
virtual int GetChapterCount();
virtual int GetChapter();
virtual void GetChapterName(CStdString& strChapterName);
@@ -202,6 +207,8 @@
virtual CStdString GetPlayerState();
virtual bool SetPlayerState(CStdString state);
+
+ virtual CStdString GetPlayingTitle();
virtual bool IsCaching() const { return m_caching; }
virtual int GetCacheLevel() const ;
@@ -219,14 +226,17 @@
bool OpenAudioStream(int iStream, int source);
bool OpenVideoStream(int iStream, int source);
bool OpenSubtitleStream(int iStream, int source);
+ bool OpenTeletextStream(int iStream, int source);
bool CloseAudioStream(bool bWaitForBuffers);
bool CloseVideoStream(bool bWaitForBuffers);
bool CloseSubtitleStream(bool bKeepOverlays);
+ bool CloseTeletextStream(bool bWaitForBuffers);
void ProcessPacket(CDemuxStream* pStream, DemuxPacket* pPacket);
void ProcessAudioData(CDemuxStream* pStream, DemuxPacket* pPacket);
void ProcessVideoData(CDemuxStream* pStream, DemuxPacket* pPacket);
void ProcessSubData(CDemuxStream* pStream, DemuxPacket* pPacket);
+ void ProcessTeletextData(CDemuxStream* pStream, DemuxPacket* pPacket);
bool AddSubtitleFile(const std::string& filename);
/**
@@ -275,6 +285,7 @@
CCurrentStream m_CurrentAudio;
CCurrentStream m_CurrentVideo;
CCurrentStream m_CurrentSubtitle;
+ CCurrentStream m_CurrentTeletext;
CSelectionStreams m_SelectionStreams;
@@ -293,6 +304,7 @@
CDVDPlayerVideo m_dvdPlayerVideo; // video part
CDVDPlayerAudio m_dvdPlayerAudio; // audio part
CDVDPlayerSubtitle m_dvdPlayerSubtitle; // subtitle part
+ CDVDTeletextData m_dvdPlayerTeletext; // teletext part
CDVDClock m_clock; // master clock
CDVDOverlayContainer m_overlayContainer;
Added: trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp (rev 0)
+++ trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -0,0 +1,781 @@
+/*
+ * Copyright (C) 2005-2009 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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 General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "Settings.h"
+#include "DVDPlayer.h"
+#include "DVDStreamInfo.h"
+#include "DVDPlayerTeletext.h"
+#include "Application.h"
+#include "DVDCodecs/DVDCodecs.h"
+#include "utils/log.h"
+
+using namespace std;
+
+const uint8_t rev_lut[32] =
+{
+ 0x00,0x08,0x04,0x0c, /* upper nibble */
+ 0x02,0x0a,0x06,0x0e,
+ 0x01,0x09,0x05,0x0d,
+ 0x03,0x0b,0x07,0x0f,
+ 0x00,0x80,0x40,0xc0, /* lower nibble */
+ 0x20,0xa0,0x60,0xe0,
+ 0x10,0x90,0x50,0xd0,
+ 0x30,0xb0,0x70,0xf0
+};
+
+void CDVDTeletextTools::NextDec(int *i) /* skip to next decimal */
+{
+ (*i)++;
+
+ if ((*i & 0x0F) > 0x09)
+ *i += 0x06;
+
+ if ((*i & 0xF0) > 0x90)
+ *i += 0x60;
+
+ if (*i > 0x899)
+ *i = 0x100;
+}
+
+void CDVDTeletextTools::PrevDec(int *i) /* counting down */
+{
+ (*i)--;
+
+ if ((*i & 0x0F) > 0x09)
+ *i -= 0x06;
+
+ if ((*i & 0xF0) > 0x90)
+ *i -= 0x60;
+
+ if (*i < 0x100)
+ *i = 0x899;
+}
+
+/* print hex-number into string, s points to last digit, caller has to provide enough space, no termination */
+void CDVDTeletextTools::Hex2Str(char *s, unsigned int n)
+{
+ do {
+ char c = (n & 0xF);
+ *s-- = number2char(c);
+ n >>= 4;
+ } while (n);
+}
+
+signed int CDVDTeletextTools::deh24(unsigned char *p)
+{
+ int e = hamm24par[0][p[0]]
+ ^ hamm24par[1][p[1]]
+ ^ hamm24par[2][p[2]];
+
+ int x = hamm24val[p[0]]
+ + (p[1] & 127) * 16
+ + (p[2] & 127) * 2048;
+
+ return (x ^ hamm24cor[e]) | hamm24err[e];
+}
+
+
+CDVDTeletextData::CDVDTeletextData()
+: CThread()
+, m_messageQueue("teletext")
+{
+ m_speed = DVD_PLAYSPEED_NORMAL;
+
+ m_messageQueue.SetMaxDataSize(40 * 256 * 1024);
+
+ /* Initialize Data structures */
+ memset(&m_TXTCache.astCachetable, 0, sizeof(m_TXTCache.astCachetable));
+ memset(&m_TXTCache.astP29, 0, sizeof(m_TXTCache.astP29));
+ ResetTeletextCache();
+}
+
+CDVDTeletextData::~CDVDTeletextData()
+{
+ StopThread();
+ ResetTeletextCache();
+}
+
+bool CDVDTeletextData::CheckStream(CDVDStreamInfo &hints)
+{
+#if (! defined USE_EXTERNAL_FFMPEG)
+ if (hints.codec == CODEC_ID_EBU_TELETEXT)
+ return true;
+#endif
+
+ return false;
+}
+
+bool CDVDTeletextData::OpenStream(CDVDStreamInfo &hints)
+{
+ m_messageQueue.Init();
+
+#if (! defined USE_EXTERNAL_FFMPEG)
+ if (hints.codec == CODEC_ID_EBU_TELETEXT)
+ {
+ CLog::Log(LOGNOTICE, "Creating teletext data thread");
+ Create();
+ return true;
+ }
+#endif
+
+ return false;
+}
+
+void CDVDTeletextData::CloseStream(bool bWaitForBuffers)
+{
+ // wait until buffers are empty
+ if (bWaitForBuffers && m_speed > 0) m_messageQueue.WaitUntilEmpty();
+
+ m_messageQueue.Abort();
+
+ // wait for decode_video thread to end
+ CLog::Log(LOGNOTICE, "waiting for teletext data thread to exit");
+
+ StopThread(); // will set this->m_bStop to true
+
+ m_messageQueue.End();
+ ResetTeletextCache();
+}
+
+
+void CDVDTeletextData::ResetTeletextCache()
+{
+ CSingleLock lock(m_critSection);
+
+ /* Reset Data structures */
+ for (int i = 0; i < 0x900; i++)
+ {
+ for (int j = 0; j < 0x80; j++)
+ {
+ if (m_TXTCache.astCachetable[i][j])
+ {
+ TextPageinfo_t *p = &(m_TXTCache.astCachetable[i][j]->pageinfo);
+ if (p->p24)
+ free(p->p24);
+
+ if (p->ext)
+ {
+ if (p->ext->p27)
+ free(p->ext->p27);
+
+ for (int d26 = 0; d26 < 16; d26++)
+ {
+ if (p->ext->p26[d26])
+ free(p->ext->p26[d26]);
+ }
+ free(p->ext);
+ }
+ delete m_TXTCache.astCachetable[i][j];
+ m_TXTCache.astCachetable[i][j] = 0;
+ }
+ }
+ }
+
+ for (int i = 0; i < 9; i++)
+ {
+ if (m_TXTCache.astP29[i])
+ {
+ if (m_TXTCache.astP29[i]->p27)
+ free(m_TXTCache.astP29[i]->p27);
+
+ for (int d26 = 0; d26 < 16; d26++)
+ {
+ if (m_TXTCache.astP29[i]->p26[d26])
+ free(m_TXTCache.astP29[i]->p26[d26]);
+ }
+ free(m_TXTCache.astP29[i]);
+ m_TXTCache.astP29[i] = 0;
+ }
+ m_TXTCache.CurrentPage[i] = -1;
+ m_TXTCache.CurrentSubPage[i] = -1;
+ }
+
+ memset(&m_TXTCache.SubPageTable, 0xFF, sizeof(m_TXTCache.SubPageTable));
+ memset(&m_TXTCache.astP29, 0, sizeof(m_TXTCache.astP29));
+ memset(&m_TXTCache.BasicTop, 0, sizeof(m_TXTCache.BasicTop));
+ memset(&m_TXTCache.ADIPTable, 0, sizeof(m_TXTCache.ADIPTable));
+ memset(&m_TXTCache.FlofPages, 0, sizeof(m_TXTCache.FlofPages));
+ memset(&m_TXTCache.SubtitlePages, 0, sizeof(m_TXTCache.SubtitlePages));
+ memset(&m_TXTCache.astCachetable, 0, sizeof(m_TXTCache.astCachetable));
+ memset(&m_TXTCache.TimeString, 0x20, 8);
+
+ m_TXTCache.NationalSubset = NAT_DEFAULT;/* default */
+ m_TXTCache.NationalSubsetSecondary = NAT_DEFAULT;
+ m_TXTCache.ZapSubpageManual = false;
+ m_TXTCache.PageUpdate = false;
+ m_TXTCache.ADIP_PgMax = -1;
+ m_TXTCache.BTTok = false;
+ m_TXTCache.CachedPages = 0;
+ m_TXTCache.PageReceiving = -1;
+ m_TXTCache.Page = 0x100;
+ m_TXTCache.SubPage = m_TXTCache.SubPageTable[m_TXTCache.Page];
+ m_TXTCache.line30 = "";
+ if (m_TXTCache.SubPage == 0xff)
+ m_TXTCache.SubPage = 0;
+}
+
+void CDVDTeletextData::OnStartup()
+{
+ CThread::SetName("CDVDTeletextData");
+}
+
+void CDVDTeletextData::Process()
+{
+ int b1, b2, b3, b4;
+ int packet_number;
+ TextPageinfo_t *pageinfo_thread;
+ unsigned char vtxt_row[42];
+ unsigned char pagedata[9][23*40];
+ unsigned char magazine = 0xff;
+ int doupdate = 0;
+
+ CLog::Log(LOGNOTICE, "running thread: CDVDTeletextData");
+
+ while (!m_bStop)
+ {
+ CDVDMsg* pMsg;
+ int iPriority = (m_speed == DVD_PLAYSPEED_PAUSE) ? 1 : 0;
+ MsgQueueReturnCode ret = m_messageQueue.Get(&pMsg, 2000, iPriority);
+
+ if (ret == MSGQ_TIMEOUT)
+ {
+ /* Timeout for Teletext is not a bad thing, so we continue without error */
+ continue;
+ }
+
+ if (MSGQ_IS_ERROR(ret) || ret == MSGQ_ABORT)
+ {
+ CLog::Log(LOGERROR, "Got MSGQ_ABORT or MSGO_IS_ERROR return true (%i)", ret);
+ break;
+ }
+
+ if (pMsg->IsType(CDVDMsg::DEMUXER_PACKET))
+ {
+ CSingleLock lock(m_critSection);
+
+ DemuxPacket* pPacket = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacket();
+ bool bPacketDrop = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacketDrop();
+ uint8_t *Datai = pPacket->pData;
+ int rows = (pPacket->iSize - 1) / 46;
+
+ /* Is it a ITU-R System B Teletext stream in acc. to EN 300 472 */
+ if (Datai[0] >= 0x10 && Datai[0] <= 0x1F) /* Check we have a valid data identifier */
+ {
+ /* Go thru the pages stored inside this frame */
+ for (int row=0; row < rows; row++)
+ {
+ uint8_t *vtx_rowbyte = &Datai[(row*46)+1];
+ int err = 0;
+
+ /* Check for valid data_unit_id */
+ if ((vtx_rowbyte[0] == 0x02 || vtx_rowbyte[0] == 0x03) && (vtx_rowbyte[1] == 0x2C))
+ {
+ /* clear rowbuffer */
+ /* convert row from lsb to msb (begin with magazin number) */
+ for (int i = 4; i < 46; i++)
+ {
+ uint8_t upper = (vtx_rowbyte[i] >> 4) & 0xf;
+ uint8_t lower = vtx_rowbyte[i] & 0xf;
+ vtxt_row[i-4] = (rev_lut[upper]) | (rev_lut[lower+16]);
+ }
+
+ /* get packet number */
+ b1 = dehamming[vtxt_row[0]];
+ b2 = dehamming[vtxt_row[1]];
+
+ if (b1 == 0xFF || b2 == 0xFF)
+ continue;
+
+ b1 &= 8;
+
+ /* get packet and magazine number */
+ packet_number = b1>>3 | b2<<1;
+ magazine = dehamming[vtxt_row[0]] & 7;
+ if (!magazine) magazine = 8;
+
+ if (packet_number == 0 && m_TXTCache.CurrentPage[magazine] != -1 && m_TXTCache.CurrentSubPage[magazine] != -1)
+ SavePage(m_TXTCache.CurrentPage[magazine], m_TXTCache.CurrentSubPage[magazine], pagedata[magazine]);
+
+ /* analyze row */
+ if (packet_number == 0)
+ {
+ /* get pagenumber */
+ b2 = dehamming[vtxt_row[3]];
+ b3 = dehamming[vtxt_row[2]];
+
+ if (b2 == 0xFF || b3 == 0xFF)
+ {
+ m_TXTCache.CurrentPage[magazine] = m_TXTCache.PageReceiving = -1;
+ continue;
+ }
+
+ m_TXTCache.CurrentPage[magazine] = m_TXTCache.PageReceiving = magazine<<8 | b2<<4 | b3;
+
+ if (b2 == 0x0f && b3 == 0x0f)
+ {
+ m_TXTCache.CurrentSubPage[magazine] = -1; /* ?ff: ignore data transmissions */
+ continue;
+ }
+
+ /* get subpagenumber */
+ b1 = dehamming[vtxt_row[7]];
+ b2 = dehamming[vtxt_row[6]];
+ b3 = dehamming[vtxt_row[5]];
+ b4 = dehamming[vtxt_row[4]];
+
+ if (b1 == 0xFF || b2 == 0xFF || b3 == 0xFF || b4 == 0xFF)
+ {
+ m_TXTCache.CurrentSubPage[magazine] = -1;
+ continue;
+ }
+
+ b1 &= 3;
+ b3 &= 7;
+
+ if (IsDec(m_TXTCache.PageReceiving)) /* ignore other subpage bits for hex pages */
+ m_TXTCache.CurrentSubPage[magazine] = b3<<4 | b4;
+ else
+ m_TXTCache.CurrentSubPage[magazine] = b4; /* max 16 subpages for hex pages */
+
+ /* store current subpage for this page */
+ m_TXTCache.SubPageTable[m_TXTCache.CurrentPage[magazine]] = m_TXTCache.CurrentSubPage[magazine];
+
+ AllocateCache(magazine);
+ LoadPage(m_TXTCache.CurrentPage[magazine], m_TXTCache.CurrentSubPage[magazine], pagedata[magazine]);
+ pageinfo_thread = &(m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]]->pageinfo);
+ if (!pageinfo_thread)
+ continue;
+
+ if ((m_TXTCache.PageReceiving & 0xff) == 0xfe) /* ?fe: magazine organization table (MOT) */
+ pageinfo_thread->function = FUNC_MOT;
+
+ /* check controlbits */
+ if (dehamming[vtxt_row[5]] & 8) /* C4 -> erase page */
+ {
+ memset(m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]]->data, ' ', 23*40);
+ memset(pagedata[magazine],' ', 23*40);
+ }
+ if (dehamming[vtxt_row[9]] & 8) /* C8 -> update page */
+ doupdate = m_TXTCache.PageReceiving;
+
+ pageinfo_thread->boxed = !!(dehamming[vtxt_row[7]] & 0x0c);
+
+ /* get country control bits */
+ b1 = dehamming[vtxt_row[9]];
+ if (b1 != 0xFF)
+ {
+ pageinfo_thread->nationalvalid = 1;
+ pageinfo_thread->national = rev_lut[b1] & 0x07;
+ }
+
+ if (dehamming[vtxt_row[7]] & 0x08)// subtitle page
+ {
+ int i = 0, found = -1, use = -1;
+ for (; i < 8; i++)
+ {
+ if (use == -1 && !m_TXTCache.SubtitlePages[i].page)
+ use = i;
+ else if (m_TXTCache.SubtitlePages[i].page == m_TXTCache.PageReceiving)
+ {
+ found = i;
+ use = i;
+ break;
+ }
+ }
+ if (found == -1 && use != -1)
+ m_TXTCache.SubtitlePages[use].page = m_TXTCache.PageReceiving;
+ if (use != -1)
+ m_TXTCache.SubtitlePages[use].language = CountryConversionTable[pageinfo_thread->national];
+ }
+
+ /* check parity, copy line 0 to cache (start and end 8 bytes are not needed and used otherwise) */
+ unsigned char *p = m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]]->p0;
+ for (int i = 10; i < 42-8; i++)
+ *p++ = deparity[vtxt_row[i]];
+
+ if (!IsDec(m_TXTCache.PageReceiving))
+ continue; /* valid hex page number: just copy headline, ignore TimeString */
+
+ /* copy TimeString */
+ p = m_TXTCache.TimeString;
+ for (int i = 42-8; i < 42; i++)
+ *p++ = deparity[vtxt_row[i]];
+ }
+ else if (packet_number == 29 && dehamming[vtxt_row[2]]== 0) /* packet 29/0 replaces 28/0 for a whole magazine */
+ {
+ Decode_p2829(vtxt_row, &(m_TXTCache.astP29[magazine]));
+ }
+ else if (m_TXTCache.CurrentPage[magazine] != -1 && m_TXTCache.CurrentSubPage[magazine] != -1)
+ /* packet>0, 0 has been correctly received, buffer allocated */
+ {
+ pageinfo_thread = &(m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]]->pageinfo);
+ if (!pageinfo_thread)
+ continue;
+
+ /* pointer to current info struct */
+ if (packet_number <= 25)
+ {
+ unsigned char *p = NULL;
+ if (packet_number < 24)
+ {
+ p = pagedata[magazine] + 40*(packet_number-1);
+ }
+ else
+ {
+ if (!(pageinfo_thread->p24))
+ pageinfo_thread->p24 = (unsigned char*) calloc(2, 40);
+ if (pageinfo_thread->p24)
+ p = pageinfo_thread->p24 + (packet_number - 24) * 40;
+ }
+ if (p)
+ {
+ if (IsDec(m_TXTCache.CurrentPage[magazine]))
+ {
+ for (int i = 2; i < 42; i++)
+ {
+ *p++ = vtxt_row[i] & 0x7f; /* allow values with parity errors as some channels don't care :( */
+ }
+ }
+ else if ((m_TXTCache.CurrentPage[magazine] & 0xff) == 0xfe)
+ {
+ for (int i = 2; i < 42; i++)
+ {
+ *p++ = dehamming[vtxt_row[i]]; /* decode hamming 8/4 */
+ }
+ }
+ else /* other hex page: no parity check, just copy */
+ memcpy(p, &vtxt_row[2], 40);
+ }
+ }
+ else if (packet_number == 27)
+ {
+ int descode = dehamming[vtxt_row[2]]; /* designation code (0..15) */
+ if (descode == 0xff)
+ continue;
+
+ if (descode == 0) // reading FLOF-Pagelinks
+ {
+ b1 = dehamming[vtxt_row[0]];
+ if (b1 != 0xff)
+ {
+ b1 &= 7;
+
+ for (int i = 0; i < FLOFSIZE; i++)
+ {
+ b2 = dehamming[vtxt_row[4+i*6]];
+ b3 = dehamming[vtxt_row[3+i*6]];
+
+ if (b2 != 0xff && b3 != 0xff)
+ {
+ b4 = ((b1 ^ (dehamming[vtxt_row[8+i*6]]>>1)) & 6) | ((b1 ^ (dehamming[vtxt_row[6+i*6]]>>3)) & 1);
+ if (b4 == 0)
+ b4 = 8;
+ if (b2 <= 9 && b3 <= 9)
+ m_TXTCache.FlofPages[m_TXTCache.CurrentPage[magazine] ][i] = b4<<8 | b2<<4 | b3;
+ }
+ }
+
+ /* copy last 2 links to ADIPTable for TOP-Index */
+ if (pageinfo_thread->p24) /* packet 24 received */
+ {
+ int a, a1, e=39, l=3;
+ unsigned char *p = pageinfo_thread->p24;
+ do
+ {
+ for (;
+ l >= 2 && 0 == m_TXTCache.FlofPages[m_TXTCache.CurrentPage[magazine]][l];
+ l--)
+ ; /* find used linkindex */
+ for (;
+ e >= 1 && !isalnum(p[e]);
+ e--)
+ ; /* find end */
+ for (a = a1 = e - 1;
+ a >= 0 && p[a] >= ' ';
+ a--) /* find start */
+ if (p[a] > ' ')
+ a1 = a; /* first non-space */
+ if (a >= 0 && l >= 2)
+ {
+ strncpy(m_TXTCache.ADIPTable[m_TXTCache.FlofPages[m_TXTCache.CurrentPage[magazine]][l]], (const char*) &p[a1], 12);
+ if (e-a1 < 11)
+ m_TXTCache.ADIPTable[m_TXTCache.FlofPages[m_TXTCache.CurrentPage[magazine]][l]][e-a1+1] = '\0';
+ }
+ e = a - 1;
+ l--;
+ } while (l >= 2);
+ }
+ }
+ }
+ else if (descode == 4) /* level 2.5 links (ignore level 3.5 links of /4 and /5) */
+ {
+ int i;
+ Textp27_t *p;
+
+ if (!pageinfo_thread->ext)
+ pageinfo_thread->ext = (TextExtData_t*) calloc(1, sizeof(TextExtData_t));
+ if (!pageinfo_thread->ext)
+ continue;
+ if (!(pageinfo_thread->ext->p27))
+ pageinfo_thread->ext->p27 = (Textp27_t*) calloc(4, sizeof(Textp27_t));
+ if (!(pageinfo_thread->ext->p27))
+ continue;
+ p = pageinfo_thread->ext->p27;
+ for (i = 0; i < 4; i++)
+ {
+ int d1 = CDVDTeletextTools::deh24(&vtxt_row[6*i + 3]);
+ int d2 = CDVDTeletextTools::deh24(&vtxt_row[6*i + 6]);
+ if (d1 < 0 || d2 < 0)
+ continue;
+
+ p->local = i & 0x01;
+ p->drcs = !!(i & 0x02);
+ p->l25 = !!(d1 & 0x04);
+ p->l35 = !!(d1 & 0x08);
+ p->page =
+ (((d1 & 0x000003c0) >> 6) |
+ ((d1 & 0x0003c000) >> (14-4)) |
+ ((d1 & 0x00003800) >> (11-8))) ^
+ (dehamming[vtxt_row[0]] << 8);
+ if (p->page < 0x100)
+ p->page += 0x800;
+ p->subpage = d2 >> 2;
+ if ((p->page & 0xff) == 0xff)
+ p->page = 0;
+ else if (p->page > 0x899)
+ {
+ // workaround for crash on RTL Shop ...
+ // sorry.. i dont understand whats going wrong here :)
+ continue;
+ }
+ else if (m_TXTCache.astCachetable[p->page][0]) /* link valid && linked page cached */
+ {
+ TextPageinfo_t *pageinfo_link = &(m_TXTCache.astCachetable[p->page][0]->pageinfo);
+ if (p->local)
+ pageinfo_link->function = p->drcs ? FUNC_DRCS : FUNC_POP;
+ else
+ pageinfo_link->function = p->drcs ? FUNC_GDRCS : FUNC_GPOP;
+ }
+ p++; /* */
+ }
+ }
+ }
+ else if (packet_number == 26)
+ {
+ int descode = dehamming[vtxt_row[2]]; /* designation code (0..15) */
+ if (descode == 0xff)
+ continue;
+
+ if (!pageinfo_thread->ext)
+ pageinfo_thread->ext = (TextExtData_t*) calloc(1, sizeof(TextExtData_t));
+ if (!pageinfo_thread->ext)
+ continue;
+ if (!(pageinfo_thread->ext->p26[descode]))
+ pageinfo_thread->ext->p26[descode] = (unsigned char*) malloc(13 * 3);
+ if (pageinfo_thread->ext->p26[descode])
+ memcpy(pageinfo_thread->ext->p26[descode], &vtxt_row[3], 13 * 3);
+ }
+ else if (packet_number == 28)
+ {
+ int descode = dehamming[vtxt_row[2]]; /* designation code (0..15) */
+
+ if (descode == 0xff)
+ continue;
+
+ if (descode != 2)
+ {
+ int t1 = CDVDTeletextTools::deh24(&vtxt_row[7-4]);
+ pageinfo_thread->function = t1 & 0x0f;
+ if (!pageinfo_thread->nationalvalid)
+ {
+ pageinfo_thread->nationalvalid = 1;
+ pageinfo_thread->national = (t1>>4) & 0x07;
+ }
+ }
+
+ switch (descode) /* designation code */
+ {
+ case 0: /* basic level 1 page */
+ Decode_p2829(vtxt_row, &(pageinfo_thread->ext));
+ break;
+ case 1: /* G0/G1 designation for older decoders, level 3.5: DCLUT4/16, colors for multicolored bitmaps */
+ break; /* ignore */
+ case 2: /* page key */
+ break; /* ignore */
+ case 3: /* types of PTUs in DRCS */
+ break; /* TODO */
+ case 4: /* CLUTs 0/1, only level 3.5 */
+ break; /* ignore */
+ default:
+ break; /* invalid, ignore */
+ } /* switch designation code */
+ }
+ else if (packet_number == 30)
+ {
+ m_TXTCache.line30 = "";
+ for (int i=26-4; i <= 45-4; i++) /* station ID */
+ m_TXTCache.line30.append(1, deparity[vtxt_row[i]]);
+ }
+ }
+
+ /* set update flag */
+ if (m_TXTCache.CurrentPage[magazine] == m_TXTCache.Page && m_TXTCache.CurrentSubPage[magazine] != -1)
+ {
+ SavePage(m_TXTCache.CurrentPage[magazine], m_TXTCache.CurrentSubPage[magazine], pagedata[magazine]);
+ m_TXTCache.PageUpdate = true;
+ doupdate = 0;
+ if (!m_TXTCache.ZapSubpageManual)
+ m_TXTCache.SubPage = m_TXTCache.CurrentSubPage[magazine];
+ }
+ }
+ }
+ }
+ }
+ else if (pMsg->IsType(CDVDMsg::PLAYER_SETSPEED))
+ {
+ m_speed = static_cast<CDVDMsgInt*>(pMsg)->m_value;
+ }
+ else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (CDVDTeletextData::Flush())
+ {
+ ResetTeletextCache();
+ }
+ pMsg->Release();
+ }
+}
+
+void CDVDTeletextData::OnExit()
+{
+ CLog::Log(LOGNOTICE, "thread end: data_thread");
+}
+
+void CDVDTeletextData::Flush()
+{
+ /* flush using message as this get's called from dvdplayer thread */
+ /* and any demux packet that has been taken out of queue need to */
+ /* be disposed of before we flush */
+ m_messageQueue.Flush();
+ m_messageQueue.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
+}
+
+void CDVDTeletextData::Decode_p2829(unsigned char *vtxt_row, TextExtData_t **ptExtData)
+{
+ int bitsleft, colorindex;
+ unsigned char *p;
+ int t1 = CDVDTeletextTools::deh24(&vtxt_row[7-4]);
+ int t2 = CDVDTeletextTools::deh24(&vtxt_row[10-4]);
+
+ if (t1 < 0 || t2 < 0)
+ return;
+
+ if (!(*ptExtData))
+ (*ptExtData) = (TextExtData_t*) calloc(1, sizeof(TextExtData_t));
+ if (!(*ptExtData))
+ return;
+
+ (*ptExtData)->p28Received = 1;
+ (*ptExtData)->DefaultCharset = (t1>>7) & 0x7f;
+ (*ptExtData)->SecondCharset = ((t1>>14) & 0x0f) | ((t2<<4) & 0x70);
+ (*ptExtData)->LSP = !!(t2 & 0x08);
+ (*ptExtData)->RSP = !!(t2 & 0x10);
+ (*ptExtData)->SPL25 = !!(t2 & 0x20);
+ (*ptExtData)->LSPColumns = (t2>>6) & 0x0f;
+
+ bitsleft = 8; /* # of bits not evaluated in val */
+ t2 >>= 10; /* current data */
+ p = &vtxt_row[13-4]; /* pointer to next data triplet */
+ for (colorindex = 0; colorindex < 16; colorindex++)
+ {
+ if (bitsleft < 12)
+ {
+ t2 |= CDVDTeletextTools::deh24(p) << bitsleft;
+ if (t2 < 0) /* hamming error */
+ break;
+ p += 3;
+ bitsleft += 18;
+ }
+ (*ptExtData)->bgr[colorindex] = t2 & 0x0fff;
+ bitsleft -= 12;
+ t2 >>= 12;
+ }
+ if (t2 < 0 || bitsleft != 14)
+ {
+ (*ptExtData)->p28Received = 0;
+ return;
+ }
+ (*ptExtData)->DefScreenColor = t2 & 0x1f;
+ t2 >>= 5;
+ (*ptExtData)->DefRowColor = t2 & 0x1f;
+ (*ptExtData)->BlackBgSubst = !!(t2 & 0x20);
+ t2 >>= 6;
+ (*ptExtData)->ColorTableRemapping = t2 & 0x07;
+}
+
+void CDVDTeletextData::SavePage(int p, int sp, unsigned char* buffer)
+{
+ CSingleLock lock(m_critSection);
+ TextCachedPage_t* pg = m_TXTCache.astCachetable[p][sp];
+ if (!pg)
+ {
+ CLog::Log(LOGERROR, "CDVDTeletextData: trying to save a not allocated page!!");
+ return;
+ }
+
+ memcpy(pg->data, buffer, 23*40);
+}
+
+void CDVDTeletextData::LoadPage(int p, int sp, unsigned char* buffer)
+{
+ CSingleLock lock(m_critSection);
+ TextCachedPage_t* pg = m_TXTCache.astCachetable[p][sp];
+ if (!pg)
+ {
+ CLog::Log(LOGERROR, "CDVDTeletextData: trying to load a not allocated page!!");
+ return;
+ }
+
+ memcpy(buffer, pg->data, 23*40);
+}
+
+void CDVDTeletextData::ErasePage(int magazine)
+{
+ CSingleLock lock(m_critSection);
+ TextCachedPage_t* pg = m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]];
+ if (pg)
+ {
+ memset(&(pg->pageinfo), 0, sizeof(TextPageinfo_t)); /* struct pageinfo */
+ memset(pg->p0, ' ', 24);
+ memset(pg->data, ' ', 23*40);
+ }
+}
+
+void CDVDTeletextData::AllocateCache(int magazine)
+{
+ /* check cachetable and allocate memory if needed */
+ if (m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]] == 0)
+ {
+ m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]] = new TextCachedPage_t;
+ if (m_TXTCache.astCachetable[m_TXTCache.CurrentPage[magazine]][m_TXTCache.CurrentSubPage[magazine]] )
+ {
+ ErasePage(magazine);
+ m_TXTCache.CachedPages++;
+ }
+ }
+}
Property changes on: trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.h
===================================================================
--- trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.h (rev 0)
+++ trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -0,0 +1,67 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2009 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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 General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "../../utils/Thread.h"
+#include "DVDMessageQueue.h"
+#include "utils/TeletextDefines.h"
+
+class CDVDStreamInfo;
+
+class CDVDTeletextData : public CThread
+{
+public:
+ CDVDTeletextData();
+ ~CDVDTeletextData();
+
+ bool CheckStream(CDVDStreamInfo &hints);
+ bool OpenStream(CDVDStreamInfo &hints);
+ void CloseStream(bool bWaitForBuffers);
+ void Flush();
+
+ // waits until all available data has been rendered
+ void WaitForBuffers() { m_messageQueue.WaitUntilEmpty(); }
+ bool AcceptsData() { return !m_messageQueue.IsFull(); }
+ void SendMessage(CDVDMsg* pMsg) { m_messageQueue.Put(pMsg); }
+
+ TextCacheStruct_t* GetTeletextCache() { return &m_TXTCache; }
+ void LoadPage(int p, int sp, unsigned char* buffer);
+
+ CDVDMessageQueue m_messageQueue;
+
+protected:
+ virtual void OnStartup();
+ virtual void OnExit();
+ virtual void Process();
+
+private:
+ void ResetTeletextCache();
+ void Decode_p2829(unsigned char *vtxt_row, TextExtData_t **ptExtData);
+ void SavePage(int p, int sp, unsigned char* buffer);
+ void ErasePage(int magazine);
+ void AllocateCache(int magazine);
+
+ int m_speed;
+ TextCacheStruct_t m_TXTCache;
+ CCriticalSection m_critSection;
+};
+
Property changes on: trunk/xbmc/cores/dvdplayer/DVDPlayerTeletext.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/xbmc/cores/dvdplayer/Makefile
===================================================================
--- trunk/xbmc/cores/dvdplayer/Makefile 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/dvdplayer/Makefile 2009-09-30 20:49:46 UTC (rev 23277)
@@ -15,6 +15,7 @@
DVDPlayer.cpp \
DVDPlayerSubtitle.cpp \
DVDPlayerVideo.cpp \
+ DVDPlayerTeletext.cpp \
DVDStreamInfo.cpp \
DVDFileInfo.cpp \
DVDPlayerAudioResampler.cpp \
Modified: trunk/xbmc/cores/ffmpeg/avcodec.h
===================================================================
--- trunk/xbmc/cores/ffmpeg/avcodec.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/ffmpeg/avcodec.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -329,6 +329,11 @@
CODEC_ID_SSA,
CODEC_ID_MOV_TEXT,
+ /* data codecs */
+ CODEC_ID_VBI_DATA= 0x17500,
+ CODEC_ID_VBI_TELETEXT,
+ CODEC_ID_EBU_TELETEXT,
+
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000,
Modified: trunk/xbmc/cores/paplayer/MPCCodec/include/config.h.in
===================================================================
--- trunk/xbmc/cores/paplayer/MPCCodec/include/config.h.in 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/cores/paplayer/MPCCodec/include/config.h.in 2009-09-30 20:49:46 UTC (rev 23277)
@@ -1,5 +1,8 @@
/* include/config.h.in. Generated from configure.ac by autoheader. */
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -84,9 +87,17 @@
/* Version number of package */
#undef VERSION
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
Modified: trunk/xbmc/utils/GUIInfoManager.cpp
===================================================================
--- trunk/xbmc/utils/GUIInfoManager.cpp 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/utils/GUIInfoManager.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -64,6 +64,7 @@
#include "LocalizeStrings.h"
#include "CPUInfo.h"
#include "StringUtils.h"
+#include "TeletextDefines.h"
// stuff for current song
#include "MusicInfoTagLoaderFactory.h"
@@ -543,6 +544,7 @@
else if (strTest.Equals("videoplayer.videoaspect")) return VIDEOPLAYER_VIDEO_ASPECT;
else if (strTest.Equals("videoplayer.audiocodec")) return VIDEOPLAYER_AUDIO_CODEC;
else if (strTest.Equals("videoplayer.audiochannels")) return VIDEOPLAYER_AUDIO_CHANNELS;
+ else if (strTest.Equals("videoplayer.hasteletext")) return VIDEOPLAYER_HASTELETEXT;
}
else if (strCategory.Equals("playlist"))
{
@@ -1937,6 +1939,10 @@
case PLAYER_HASDURATION:
bReturn = g_application.GetTotalTime() > 0;
break;
+ case VIDEOPLAYER_HASTELETEXT:
+ if (g_application.m_pPlayer->GetTeletextCache())
+ bReturn = true;
+ break;
case VISUALISATION_LOCKED:
{
CGUIMessage msg(GUI_MSG_GET_VISUALISATION, 0, 0);
@@ -2926,7 +2932,9 @@
{
if (m_currentFile->HasVideoInfoTag() && !m_currentFile->GetVideoInfoTag()->m_strTitle.IsEmpty())
return m_currentFile->GetVideoInfoTag()->m_strTitle;
- // don't have the title, so use label, or drop down to title from path
+ // don't have the title, so use dvdplayer, label, or drop down to title from path
+ if (!g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
+ return g_application.m_pPlayer->GetPlayingTitle();
if (!m_currentFile->GetLabel().IsEmpty())
return m_currentFile->GetLabel();
return CUtil::GetTitleFromPath(m_currentFile->m_strPath);
Modified: trunk/xbmc/utils/GUIInfoManager.h
===================================================================
--- trunk/xbmc/utils/GUIInfoManager.h 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/utils/GUIInfoManager.h 2009-09-30 20:49:46 UTC (rev 23277)
@@ -245,6 +245,7 @@
#define VIDEOPLAYER_AUDIO_CODEC 288
#define VIDEOPLAYER_AUDIO_CHANNELS 289
#define VIDEOPLAYER_VIDEO_ASPECT 290
+#define VIDEOPLAYER_HASTELETEXT 291
#define AUDIOSCROBBLER_ENABLED 300
#define AUDIOSCROBBLER_CONN_STATE 301
Modified: trunk/xbmc/utils/Makefile
===================================================================
--- trunk/xbmc/utils/Makefile 2009-09-30 20:25:35 UTC (rev 23276)
+++ trunk/xbmc/utils/Makefile 2009-09-30 20:49:46 UTC (rev 23277)
@@ -1,4 +1,4 @@
-INCLUDES=-I. -I.. -I../../ -I../linux -I../../guilib
+INCLUDES=-I. -I.. -I../../ -I../linux -I../../guilib -I/usr/include/freetype2
SRCS=AlarmClock.cpp \
Archive.cpp \
@@ -55,7 +55,8 @@
LockFree.cpp \
StreamDetails.cpp \
TimeUtils.cpp \
- JobManager.cpp
+ JobManager.cpp \
+ Teletext.cpp
LIB=utils.a
Added: trunk/xbmc/utils/Teletext.cpp
===================================================================
--- trunk/xbmc/utils/Teletext.cpp (rev 0)
+++ trunk/xbmc/utils/Teletext.cpp 2009-09-30 20:49:46 UTC (rev 23277)
@@ -0,0 +1,4010 @@
+/*
+ * Copyright (C) 2005-2009 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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 General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/*
+ * Most Codeparts are taken from the TuxBox Teletext plugin which is based
+ * upon videotext-0.6.19991029 and written by Thomas Loewe (LazyT),
+ * Roland Meier and DBLuelle. See http://www.tuxtxt.net/ for more information.
+ * Many thanks to the TuxBox Teletext Team for this great work.
+ */
+
+#include "Teletext.h"
+#include "GUISettings.h"
+#include "Application.h"
+#include "utils/log.h"
+#include "FileSystem/SpecialProtocol.h"
+#include "Settings.h"
+
+using namespace std;
+
+static const char *TeletextFont = "special://xbmc/media/Fonts/teletext.ttf";
+
+/* spacing attributes */
+#define alpha_black 0x00
+#define alpha_red 0x01
+#define alpha_green 0x02
+#define alpha_yellow 0x03
+#define alpha_blue 0x04
+#define alpha_magenta 0x05
+#define alpha_cyan 0x06
+#define alpha_white 0x07
+#define flash 0x08
+#define steady 0x09
+#define end_box 0x0A
+#define start_box 0x0B
+#define normal_size 0x0C
+#define double_height 0x0D
+#define double_width 0x0E
+#define double_size 0x0F
+#define mosaic_black 0x10
+#define mosaic_red 0x11
+#define mosaic_green 0x12
+#define mosaic_yellow 0x13
+#define mosaic_blue 0x14
+#define mosaic_magenta 0x15
+#define mosaic_cyan 0x16
+#define mosaic_white 0x17
+#define conceal 0x18
+#define contiguous_mosaic 0x19
+#define separated_mosaic 0x1A
+#define esc 0x1B
+#define black_background 0x1C
+#define new_background 0x1D
+#define hold_mosaic 0x1E
+#define release_mosaic 0x1F
+
+#define RowAddress2Row(row) ((row == 40) ? 24 : (row - 40))
+
+// G2 Set as defined in ETS 300 706
+const unsigned short int G2table[4][6*16] =
+{
+ // Latin G2 Supplementary Set
+ { 0x0020, 0x00A1, 0x00A2, 0x00A3, 0x0024, 0x00A5, 0x0023, 0x00A7, 0x00A4, 0x2018, 0x201C, 0x00AB, 0x2190, 0x2191, 0x2192, 0x2193,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x00B5, 0x00B6, 0x00B7, 0x00F7, 0x2019, 0x201D, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x0020, 0x0300, 0x0301, 0x02C6, 0x0303, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
+ 0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x0020, 0x0020, 0x0020, 0x215B, 0x215C, 0x215D, 0x215E,
+ 0x2126, 0x00C6, 0x00D0, 0x00AA, 0x0126, 0x0020, 0x0132, 0x013F, 0x0141, 0x00D8, 0x0152, 0x00BA, 0x00DE, 0x0166, 0x014A, 0x0149,
+ 0x0138, 0x00E6, 0x0111, 0x00F0, 0x0127, 0x0131, 0x0133, 0x0140, 0x0142, 0x00F8, 0x0153, 0x00DF, 0x00FE, 0x0167, 0x014B, 0x25A0},
+ // Cyrillic G2 Supplementary Set
+ { 0x0020, 0x00A1, 0x00A2, 0x00A3, 0x0024, 0x00A5, 0x0020, 0x00A7, 0x0020, 0x2018, 0x201C, 0x00AB, 0x2190, 0x2191, 0x2192, 0x2193,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x00B5, 0x00B6, 0x00B7, 0x00F7, 0x2019, 0x201D, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x0020, 0x0300, 0x0301, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
+ 0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x0141, 0x0142, 0x00DF, 0x215B, 0x215C, 0x215D, 0x215E,
+ 0x0044, 0x0045, 0x0046, 0x0047, 0x0049, 0x004A, 0x004B, 0x004C, 0x004E, 0x0051, 0x0052, 0x0053, 0x0055, 0x0056, 0x0057, 0x005A,
+ 0x0064, 0x0065, 0x0066, 0x0067, 0x0069, 0x006A, 0x006B, 0x006C, 0x006E, 0x0071, 0x0072, 0x0073, 0x0075, 0x0076, 0x0077, 0x007A},
+ // Greek G2 Supplementary Set
+ { 0x0020, 0x0061, 0x0062, 0x00A3, 0x0065, 0x0068, 0x0069, 0x00A7, 0x003A, 0x2018, 0x201C, 0x006B, 0x2190, 0x2191, 0x2192, 0x2193,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00D7, 0x006D, 0x006E, 0x0070, 0x00F7, 0x2019, 0x201D, 0x0074, 0x00BC, 0x00BD, 0x00BE, 0x0078,
+ 0x0020, 0x0300, 0x0301, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x00B8, 0x005F, 0x02DD, 0x02DB, 0x02C7,
+ 0x003F, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20AC, 0x2030, 0x03B1, 0x038A, 0x038E, 0x038F, 0x215B, 0x215C, 0x215D, 0x215E,
+ 0x0043, 0x0044, 0x0046, 0x0047, 0x004A, 0x004C, 0x0051, 0x0052, 0x0053, 0x0055, 0x0056, 0x0057, 0x0059, 0x005A, 0x0386, 0x0389,
+ 0x0063, 0x0064, 0x0066, 0x0067, 0x006A, 0x006C, 0x0071, 0x0072, 0x0073, 0x0075, 0x0076, 0x0077, 0x0079, 0x007A, 0x0388, 0x25A0},
+ // Arabic G2 Set
+ { 0x0020, 0x0639, 0xFEC9, 0xFE83, 0xFE85, 0xFE87, 0xFE8B, 0xFE89, 0xFB7C, 0xFB7D, 0xFB7A, 0xFB58, 0xFB59, 0xFB56, 0xFB6D, 0xFB8E,
+ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0xFECE, 0xFECD, 0xFEFC, 0xFEEC, 0xFEEA, 0xFEE9,
+ 0x00E0, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00EB, 0x00EA, 0x00F9, 0x00EE, 0xFECA,
+ 0x00E9, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00E2, 0x00F4, 0x00FB, 0x00E7, 0x25A0}
+};
+
+//const (avoid warnings :<)
+TextPageAttr_t Text_AtrTable[] =
+{
+ { TXT_ColorWhite , TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_WB */
+ { TXT_ColorWhite , TXT_ColorBlack , C_G0P, 0, 0, 1 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_PassiveDefault */
+ { TXT_ColorWhite , TXT_ColorRed , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_L250 */
+ { TXT_ColorBlack , TXT_ColorYellow, C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_L252 */
+ { TXT_ColorBlack , TXT_ColorGreen , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_L251 */
+ { TXT_ColorWhite , TXT_ColorBlue , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_L253 */
+ { TXT_ColorMagenta, TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_TOPMENU0 */
+ { TXT_ColorGreen , TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_TOPMENU1 */
+ { TXT_ColorYellow , TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_TOPMENU2 */
+ { TXT_ColorCyan , TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_TOPMENU3 */
+ { TXT_ColorMenu2 , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSG0 */
+ { TXT_ColorYellow , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSG1 */
+ { TXT_ColorMenu2 , TXT_ColorTransp, C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSG2 */
+ { TXT_ColorWhite , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSG3 */
+ { TXT_ColorMenu2 , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSGDRM0 */
+ { TXT_ColorYellow , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSGDRM1 */
+ { TXT_ColorMenu2 , TXT_ColorBlack , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSGDRM2 */
+ { TXT_ColorWhite , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MSGDRM3 */
+ { TXT_ColorMenu1 , TXT_ColorBlue , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENUHIL0 5a Z */
+ { TXT_ColorWhite , TXT_ColorBlue , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENUHIL1 58 X */
+ { TXT_ColorMenu2 , TXT_ColorTransp, C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENUHIL2 9b \x9B */
+ { TXT_ColorMenu2 , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU0 ab \xAB */
+ { TXT_ColorYellow , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU1 a4 \xA4 */
+ { TXT_ColorMenu2 , TXT_ColorTransp, C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU2 9b \x9B */
+ { TXT_ColorMenu2 , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU3 cb \xCB */
+ { TXT_ColorCyan , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU4 c7 \xC7 */
+ { TXT_ColorWhite , TXT_ColorMenu3 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU5 c8 \xC8 */
+ { TXT_ColorWhite , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_MENU6 a8 \xA8 */
+ { TXT_ColorYellow , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f}, /* ATR_CATCHMENU0 a4 \xA4 */
+ { TXT_ColorWhite , TXT_ColorMenu1 , C_G0P, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0x3f} /* ATR_CATCHMENU1 a8 \xA8 */
+};
+
+/* shapes */
+enum
+{
+ S_END = 0,
+ S_FHL, /* full horizontal line: y-offset */
+ S_FVL, /* full vertical line: x-offset */
+ S_BOX, /* rectangle: x-offset, y-offset, width, height */
+ S_TRA, /* trapez: x0, y0, l0, x1, y1, l1 */
+ S_BTR, /* trapez in bgcolor: x0, y0, l0, x1, y1, l1 */
+ S_INV, /* invert */
+ S_LNK, /* call other shape: shapenumber */
+ S_CHR, /* Character from freetype hibyte, lowbyte */
+ S_ADT, /* Character 2F alternating raster */
+ S_FLH, /* flip horizontal */
+ S_FLV /* flip vertical */
+};
+
+/* shape coordinates */
+enum
+{
+ S_W13 = 5, /* width*1/3 */
+ S_W12, /* width*1/2 */
+ S_W23, /* width*2/3 */
+ S_W11, /* width */
+ S_WM3, /* width-3 */
+ S_H13, /* height*1/3 */
+ S_H12, /* height*1/2 */
+ S_H23, /* height*2/3 */
+ S_H11, /* height */
+ S_NrShCoord
+};
+
+/* G3 characters */
+unsigned char aG3_20[] = { S_TRA, 0, S_H23, 1, 0, S_H11, S_W12, S_END };
+unsigned char aG3_21[] = { S_TRA, 0, S_H23, 1, 0, S_H11, S_W11, S_END };
+unsigned char aG3_22[] = { S_TRA, 0, S_H12, 1, 0, S_H11, S_W12, S_END };
+unsigned char aG3_23[] = { S_TRA, 0, S_H12, 1, 0, S_H11, S_W11, S_END };
+unsigned char aG3_24[] = { S_TRA, 0, 0, 1, 0, S_H11, S_W12, S_END };
+unsigned char aG3_25[] = { S_TRA, 0, 0, 1, 0, S_H11, S_W11, S_END };
+unsigned char aG3_26[] = { S_INV, S_LNK, 0x66, S_END };
+unsigned char aG3_27[] = { S_INV, S_LNK, 0x67, S_END };
+unsigned char aG3_28[] = { S_INV, S_LNK, 0x68, S_END };
+unsigned char aG3_29[] = { S_INV, S_LNK, 0x69, S_END };
+unsigned char aG3_2a[] = { S_INV, S_LNK, 0x6a, S_END };
+unsigned char aG3_2b[] = { S_INV, S_LNK, 0x6b, S_END };
+unsigned char aG3_2c[] = { S_INV, S_LNK, 0x6c, S_END };
+unsigned char aG3_2d[] = { S_INV, S_LNK, 0x6d, S_END };
+unsigned char aG3_2e[] = { S_BOX, 2, 0, 3, S_H11, S_END };
+unsigned char aG3_2f[] = { S_ADT };
+unsigned char aG3_30[] = { S_LNK, 0x20, S_FLH, S_END };
+unsigned char aG3_31[] = { S_LNK, 0x21, S_FLH, S_END };
+unsigned char aG3_32[] = { S_LNK, 0x22, S_FLH, S_END };
+unsigned char aG3_33[] = { S_LNK, 0x23, S_FLH, S_END };
+unsigned char aG3_34[] = { S_LNK, 0x24, S_FLH, S_END };
+unsigned char aG3_35[] = { S_LNK, 0x25, S_FLH, S_END };
+unsigned char aG3_36[] = { S_INV, S_LNK, 0x76, S_END };
+unsigned char aG3_37[] = { S_INV, S_LNK, 0x77, S_END };
+unsigned char aG3_38[] = { S_INV, S_LNK, 0x78, S_END };
+unsigned char aG3_39[] = { S_INV, S_LNK, 0x79, S_END };
+unsigned char aG3_3a[] = { S_INV, S_LNK, 0x7a, S_END };
+unsigned char aG3_3b[] = { S_INV, S_LNK, 0x7b, S_END };
+unsigned char aG3_3c[] = { S_INV, S_LNK, 0x7c, S_END };
+unsigned char aG3_3d[] = { S_INV, S_LNK, 0x7d, S_END };
+unsigned char aG3_3e[] = { S_LNK, 0x2e, S_FLH, S_END };
+unsigned char aG3_3f[] = { S_BOX, 0, 0, S_W11, S_H11, S_END };
+unsigned char aG3_40[] = { S_BOX, 0, S_H13, S_W11, S_H13, S_LNK, 0x7e, S_END };
+unsigned char aG3_41[] = { S_BOX, 0, S_H13, S_W11, S_H13, S_LNK, 0x7e, S_FLV, S_END };
+unsigned char aG3_42[] = { S_LNK, 0x50, S_BOX, S_W12, S_H13, S_W12, S_H13, S_END };
+unsigned char aG3_43[] = { S_LNK, 0x50, S_BOX, 0, S_H13, S_W12, S_H13, S_END };
+unsigned char aG3_44[] = { S_LNK, 0x48, S_FLV, S_LNK, 0x48, S_END };
+unsigned char aG3_45[] = { S_LNK, 0x44, S_FLH, S_END };
+unsigned char aG3_46[] = { S_LNK, 0x47, S_FLV, S_END };
+unsigned char aG3_47[] = { S_LNK, 0x48, S_FLH, S_LNK, 0x48, S_END };
+unsigned char aG3_48[] = { S_TRA, 0, 0, S_W23, 0, S_H23, 0, S_BTR, 0, 0, S_W13, 0, S_H13, 0, S_END };
+unsigned char aG3_49[] = { S_LNK, 0x48, S_FLH, S_END };
+unsigned char aG3_4a[] = { S_LNK, 0x48, S_FLV, S_END };
+unsigned char aG3_4b[] = { S_LNK, 0x48, S_FLH, S_FLV, S_END };
+unsigned char aG3_4c[] = { S_LNK, 0x50, S_BOX, 0, S_H13, S_W11, S_H13, S_END };
+unsigned char aG3_4d[] = { S_CHR, 0x25, 0xE6 };
+unsigned char aG3_4e[] = { S_CHR, 0x25, 0xCF };
+unsigned char aG3_4f[] = { S_CHR, 0x25, 0xCB };
+unsigned char aG3_50[] = { S_BOX, S_W12, 0, 2, S_H11, S_FLH, S_BOX, S_W12, 0, 2, S_H11,S_END };
+unsigned char aG3_51[] = { S_BOX, 0, S_H12, S_W11, 2, S_FLV, S_BOX, 0, S_H12, S_W11, 2,S_END };
+unsigned char aG3_52[] = { S_LNK, 0x55, S_FLH, S_FLV, S_END };
+unsigned char aG3_53[] = { S_LNK, 0x55, S_FLV, S_END };
+unsigned char aG3_54[] = { S_LNK, 0x55, S_FLH, S_END };
+unsigned char aG3_55[] = { S_LNK, 0x7e, S_FLV, S_BOX, 0, S_H12, S_W12, 2, S_FLV, S_BOX, 0, S_H12, S_W12, 2, S_END };
+unsigned char aG3_56[] = { S_LNK, 0x57, S_FLH, S_END};
+unsigned char aG3_57[] = { S_LNK, 0x55, S_LNK, 0x50 , S_END};
+unsigned char aG3_58[] = { S_LNK, 0x59, S_FLV, S_END};
+unsigned char aG3_59[] = { S_LNK, 0x7e, S_LNK, 0x51 , S_END};
+unsigned char aG3_5a[] = { S_LNK, 0x50, S_LNK, 0x51 , S_END};
+unsigned char aG3_5b[] = { S_CHR, 0x21, 0x92};
+unsigned char aG3_5c[] = { S_CHR, 0x21, 0x90};
+unsigned char aG3_5d[] = { S_CHR, 0x21, 0x91};
+unsigned char aG3_5e[] = { S_CHR, 0x21, 0x93};
+unsigned char aG3_5f[] = { S_CHR, 0x00, 0x20};
+unsigned char aG3_60[] = { S_INV, S_LNK, 0x20, S_END };
+unsigned char aG3_61[] = { S_INV, S_LNK, 0x21, S_END };
+unsigned char aG3_62[] = { S_INV, S_LNK, 0x22, S_END };
+unsigned char aG3_63[] = { S_INV, S_LNK, 0x23, S_END };
+unsigned char aG3_64[] = { S_INV, S_LNK, 0x24, S_END };
+unsigned char aG3_65[] = { S_INV, S_LNK, 0x25, S_END };
+unsigned char aG3_66[] = { S_LNK, 0x20, S_FLV, S_END };
+unsigned char aG3_67[] = { S_LNK, 0x21, S_FLV, S_END };
+unsigned char aG3_68[] = { S_LNK, 0x22, S_FLV, S_END };
+unsigned char aG3_69[] = { S_LNK, 0x23, S_FLV, S_END };
+unsigned char aG3_6a[] = { S_LNK, 0x24, S_FLV, S_END };
+unsigned char aG3_6b[] = { S_BOX, 0, 0, S_W11, S_H13, S_TRA, 0, S_H13, S_W11, 0, S_H23, 1, S_END };
+unsigned char aG3_6c[] = { S_TRA, 0, 0, 1, 0, S_H12, S_W12, S_FLV, S_TRA, 0, 0, 1, 0, S_H12, S_W12, S_BOX, 0, S_H12, S_W12,1, S_END };
+unsigned char aG3_6d[] = { S_TRA, 0, 0, S_W12, S_W12, S_H12, 0, S_FLH, S_TRA, 0, 0, S_W12, S_W12, S_H12, 0, S_END };
+unsigned char aG3_6e[] = { S_CHR, 0x00, 0x20};
+unsigned char aG3_6f[] = { S_CHR, 0x00, 0x20};
+unsigned char aG3_70[] = { S_INV, S_LNK, 0x30, S_END };
+unsigned char aG3_71[] = { S_INV, S_LNK, 0x31, S_END };
+unsigned char aG3_72[] = { S_INV, S_LNK, 0x32, S_END };
+unsigned char aG3_73[] = { S_INV, S_LNK, 0x33, S_END };
+unsigned char aG3_74[] = { S_INV, S_LNK, 0x34, S_END };
+unsigned char aG3_75[] = { S_INV, S_LNK, 0x35, S_END };
+unsigned char aG3_76[] = { S_LNK, 0x66, S_FLH, S_END };
+unsigned char aG3_77[] = { S_LNK, 0x67, S_FLH, S_END };
+unsigned char aG3_78[] = { S_LNK, 0x68, S_FLH, S_END };
+unsigned char aG3_79[] = { S_LNK, 0x69, S_FLH, S_END };
+unsigned char aG3_7a[] = { S_LNK, 0x6a, S_FLH, S_END };
+unsigned char aG3_7b[] = { S_LNK, 0x6b, S_FLH, S_END };
+unsigned char aG3_7c[] = { S_LNK, 0x6c, S_FLH, S_END };
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|